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
Rollup merge of #147514 - RalfJung:transparent-nonexhaustive-normalize, r=lcnr
repr_transparent_external_private_fields: normalize types during traversal
Determining whether a type is a 1-ZST will internally do full normalization, so we better do the same when scanning for non-exhaustive types.
r? ``@lcnr``
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
25
25
26
26
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
27
-
--> $DIR/repr-transparent-non-exhaustive.rs:47:22
27
+
--> $DIR/repr-transparent-non-exhaustive.rs:54:23
28
+
|
29
+
LL | pub struct T6a(Sized, <i32 as Trait>::Assoc); // normalizes to `NonExhaustive`
30
+
| ^^^^^^^^^^^^^^^^^^^^^
31
+
|
32
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
33
+
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
34
+
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
35
+
36
+
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this enum contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
35
45
36
46
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this enum contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
45
55
46
56
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
65
75
66
76
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this enum contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
75
85
76
86
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this enum contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
85
95
86
96
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
105
115
106
116
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this enum contains `NonExhaustiveEnum`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
115
125
116
126
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this enum contains `NonExhaustiveVariant`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
125
135
126
136
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
135
145
136
146
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
145
155
146
156
error: zero-sized fields in `repr(transparent)` cannot contain external non-exhaustive types
= note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
164
174
= note: this struct contains `NonExhaustive`, which is marked with `#[non_exhaustive]`, and makes it not a breaking change to become non-zero-sized in the future.
0 commit comments