]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/validate_never_arrays.32bit.stderr
e2f5175bf0ac98186db436187812a108781aafc4
[rustc.git] / src / test / ui / consts / validate_never_arrays.32bit.stderr
1 error[E0080]: it is undefined behavior to use this value
2 --> $DIR/validate_never_arrays.rs:4:1
3 |
4 LL | const _: &[!; 1] = unsafe { &*(1_usize as *const [!; 1]) };
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered a value of the never type `!`
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 rustc repository if you believe it should not be considered undefined behavior.
8 = note: the raw bytes of the constant (size: 4, align: 4) {
9 01 00 00 00 │ ....
10 }
11
12 error[E0080]: it is undefined behavior to use this value
13 --> $DIR/validate_never_arrays.rs:7:1
14 |
15 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 1]) };
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered a value of the never type `!`
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.
19 = note: the raw bytes of the constant (size: 8, align: 4) {
20 01 00 00 00 01 00 00 00 │ ........
21 }
22
23 error[E0080]: it is undefined behavior to use this value
24 --> $DIR/validate_never_arrays.rs:8:1
25 |
26 LL | const _: &[!] = unsafe { &*(1_usize as *const [!; 42]) };
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed at .<deref>[0]: encountered a value of the never type `!`
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.
30 = note: the raw bytes of the constant (size: 8, align: 4) {
31 01 00 00 00 2a 00 00 00 │ ....*...
32 }
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0080`.