Skip to content

Does the default impl of ProjectField::is_projectable permit unsound union field projection? #2941

@joshlf

Description

@joshlf

On second re-reading, I think this is actually unsound as written. Just because a union is valid doesn't mean that any particular field is valid. E.g. you could initialize a union with a field value 2u8 – that doesn't mean that another field of type bool is valid.

Originally posted by @joshlf in #2940 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions