You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3048
3044
/// = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
3049
-
/// = note: this field contains `NonExhaustiveZst`, which is marked with `#[non_exhaustive]`, so it could become non-zero-sized in the future.
3050
-
///
3051
-
/// error: zero-sized fields in repr(transparent) cannot contain `#[repr(C)]` types
3052
-
/// --> src/main.rs:5:28
3053
-
/// |
3054
-
/// 5 | struct Baz(u32, CZst);
3055
-
/// | ^^^^
3056
-
/// = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3057
-
/// = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
3058
-
/// = note: this field contains `CZst`, which is a `#[repr(C)]` type, so it is not guaranteed to be zero-sized on all targets.
3045
+
/// = note: this struct contains `NonExhaustiveZst`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
3059
3046
/// ```
3060
3047
///
3061
3048
/// ### Explanation
3062
3049
///
3063
-
/// Previous, Rust accepted fields that contain external private zero-sized types, even though
3064
-
/// those types could gain a non-zero-sized field in a future, semver-compatible update.
3065
-
///
3066
-
/// Rust also accepted fields that contain `repr(C)` zero-sized types, even though those types
3067
-
/// are not guaranteed to be zero-sized on all targets, and even though those types can
3068
-
/// make a difference for the ABI (and therefore cannot be ignored by `repr(transparent)`).
0 commit comments