]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/validate_never_arrays.64bit.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / consts / validate_never_arrays.64bit.stderr
CommitLineData
a1dfa0c6 1error[E0080]: it is undefined behavior to use this value
cdc7bbd5 2 --> $DIR/validate_never_arrays.rs:4:1
a1dfa0c6 3 |
dfeec247 4LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
923072b8 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a reference pointing to uninhabited type [!; 1]
a1dfa0c6 6 |
e1599b0c 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 rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5
XL
8 = note: the raw bytes of the constant (size: 8, align: 8) {
9 01 00 00 00 00 00 00 00 │ ........
10 }
a1dfa0c6 11
dfeec247 12error[E0080]: it is undefined behavior to use this value
cdc7bbd5 13 --> $DIR/validate_never_arrays.rs:7:1
dfeec247
XL
14 |
15LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
136023e0 16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered a value of the never type `!`
dfeec247
XL
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 rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5
XL
19 = note: the raw bytes of the constant (size: 16, align: 8) {
20 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
21 }
dfeec247
XL
22
23error[E0080]: it is undefined behavior to use this value
cdc7bbd5 24 --> $DIR/validate_never_arrays.rs:8:1
dfeec247
XL
25 |
26LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
136023e0 27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered a value of the never type `!`
dfeec247
XL
28 |
29 = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
cdc7bbd5
XL
30 = note: the raw bytes of the constant (size: 16, align: 8) {
31 01 00 00 00 00 00 00 00 2a 00 00 00 00 00 00 00 │ ........*.......
32 }
dfeec247
XL
33
34error: aborting due to 3 previous errors
a1dfa0c6
XL
35
36For more information about this error, try `rustc --explain E0080`.