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
error[E0080]: it is undefined behavior to use this value
2
+
--> $DIR/ub-int-array.rs:15:1
3
+
|
4
+
LL | / const UNINIT_INT_0: [u32; 3] = unsafe {
5
+
LL | |
6
+
LL | |
7
+
LL | | [
8
+
... |
9
+
LL | | ]
10
+
LL | | };
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
+
15
+
error[E0080]: it is undefined behavior to use this value
16
+
--> $DIR/ub-int-array.rs:24:1
17
+
|
18
+
LL | / const UNINIT_INT_1: [u32; 3] = unsafe {
19
+
LL | |
20
+
LL | |
21
+
LL | | mem::transmute(
22
+
... |
23
+
LL | | )
24
+
LL | | };
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
+
29
+
error[E0080]: it is undefined behavior to use this value
30
+
--> $DIR/ub-int-array.rs:44:1
31
+
|
32
+
LL | / const UNINIT_INT_2: [u32; 3] = unsafe {
33
+
LL | |
34
+
LL | |
35
+
LL | | mem::transmute(
36
+
... |
37
+
LL | | )
38
+
LL | | };
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
+
43
+
error: aborting due to 3 previous errors
44
+
45
+
For more information about this error, try `rustc --explain E0080`.
0 commit comments