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
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered pointer at .TAG, but expected something in the range 0..=0
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a raw memory access tried to access part of a pointer value as raw bytes
6
6
|
7
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
7
+
= note: #[deny(const_err)] on by default
8
8
9
9
error: aborting due to previous error
10
10
11
-
For more information about this error, try `rustc --explain E0080`.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered undefined bytes
4
+
LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR cannot be used
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
6
6
|
7
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
7
+
= note: #[deny(const_err)] on by default
8
8
9
9
error: aborting due to previous error
10
10
11
-
For more information about this error, try `rustc --explain E0080`.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered undefined bytes
4
+
LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR this constant cannot be used
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes
6
6
|
7
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
7
+
= note: #[deny(const_err)] on by default
8
8
9
-
error[E0080]: this constant likely exhibits undefined behavior
LL | / const FIELD_PATH: Struct = Struct { //~ ERROR this constant cannot be used
13
13
LL | | a: 42,
14
14
LL | | b: unsafe { UNION.field3 },
15
15
LL | | };
16
-
| |__^ type validation failed: encountered undefined bytes at .b
17
-
|
18
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
16
+
| |__^ attempted to read undefined bytes
19
17
20
18
error[E0080]: this constant likely exhibits undefined behavior
0 commit comments