Open
Description
In crate A:
#[non_exhaustive]
pub struct UnitType {}
In crate B:
#[repr(transparent)]
pub struct TransparentThing(i32, UnitType);
I expected that to fail in crate B, because the reason crate A put #[non_exhaustive]
on the type was to allow it to get additional fields in the future, which would no longer allow it to work in repr(transparent)
.
But this actually compiles today, creating what I would consider an accidental semver hazard.