Does the default impl of `ProjectField::is_projectable` permit unsound union field projection?
Open
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
> 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 https://github.com/google/zerocopy/pull/2940#discussion_r2733481797_
Contributor guide
Assessment
This issue has not been assessed yet.