fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.6 KiB45 linesraw
1error[E0080]: it is undefined behavior to use this value
2  --> $DIR/ub-int-array.rs:15:1
3   |
4LL | / const UNINIT_INT_0: [u32; 3] = unsafe {
5LL | |
6LL | |
7LL | |     [
8...  |
9LL | |     ]
10LL | | };
11   | |__^ type validation failed: encountered uninitialized bytes at [0]
12   |
13   = 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.
14
15error[E0080]: it is undefined behavior to use this value
16  --> $DIR/ub-int-array.rs:24:1
17   |
18LL | / const UNINIT_INT_1: [u32; 3] = unsafe {
19LL | |
20LL | |
21LL | |     mem::transmute(
22...  |
23LL | |     )
24LL | | };
25   | |__^ type validation failed: encountered uninitialized bytes at [1]
26   |
27   = 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.
28
29error[E0080]: it is undefined behavior to use this value
30  --> $DIR/ub-int-array.rs:44:1
31   |
32LL | / const UNINIT_INT_2: [u32; 3] = unsafe {
33LL | |
34LL | |
35LL | |     mem::transmute(
36...  |
37LL | |     )
38LL | | };
39   | |__^ type validation failed: encountered uninitialized bytes at [2]
40   |
41   = 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.
42
43error: aborting due to 3 previous errors
44
45For more information about this error, try `rustc --explain E0080`.