@@ -61,54 +61,39 @@ error: the type `!` does not permit zero-initialization
6161 --> $DIR/invalid_value.rs:65:23
6262 |
6363LL | let _val: ! = mem::zeroed();
64- | ^^^^^^^^^^^^^
65- | |
66- | this code causes undefined behavior when executed
67- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
64+ | ^^^^^^^^^^^^^ this code causes undefined behavior when executed
6865 |
6966 = note: the `!` type has no valid value
7067
7168error: the type `!` does not permit being left uninitialized
7269 --> $DIR/invalid_value.rs:66:23
7370 |
7471LL | let _val: ! = mem::uninitialized();
75- | ^^^^^^^^^^^^^^^^^^^^
76- | |
77- | this code causes undefined behavior when executed
78- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
72+ | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
7973 |
8074 = note: the `!` type has no valid value
8175
8276error: the type `(i32, !)` does not permit zero-initialization
8377 --> $DIR/invalid_value.rs:68:30
8478 |
8579LL | let _val: (i32, !) = mem::zeroed();
86- | ^^^^^^^^^^^^^
87- | |
88- | this code causes undefined behavior when executed
89- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
80+ | ^^^^^^^^^^^^^ this code causes undefined behavior when executed
9081 |
9182 = note: the `!` type has no valid value
9283
9384error: the type `(i32, !)` does not permit being left uninitialized
9485 --> $DIR/invalid_value.rs:69:30
9586 |
9687LL | let _val: (i32, !) = mem::uninitialized();
97- | ^^^^^^^^^^^^^^^^^^^^
98- | |
99- | this code causes undefined behavior when executed
100- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
88+ | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
10189 |
10290 = note: integers must be initialized
10391
10492error: the type `Void` does not permit zero-initialization
10593 --> $DIR/invalid_value.rs:71:26
10694 |
10795LL | let _val: Void = mem::zeroed();
108- | ^^^^^^^^^^^^^
109- | |
110- | this code causes undefined behavior when executed
111- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
96+ | ^^^^^^^^^^^^^ this code causes undefined behavior when executed
11297 |
11398note: enums with no inhabited variants have no valid value
11499 --> $DIR/invalid_value.rs:12:1
@@ -120,10 +105,7 @@ error: the type `Void` does not permit being left uninitialized
120105 --> $DIR/invalid_value.rs:72:26
121106 |
122107LL | let _val: Void = mem::uninitialized();
123- | ^^^^^^^^^^^^^^^^^^^^
124- | |
125- | this code causes undefined behavior when executed
126- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
108+ | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
127109 |
128110note: enums with no inhabited variants have no valid value
129111 --> $DIR/invalid_value.rs:12:1
@@ -405,10 +387,7 @@ error: the type `TwoUninhabited` does not permit zero-initialization
405387 --> $DIR/invalid_value.rs:104:36
406388 |
407389LL | let _val: TwoUninhabited = mem::zeroed();
408- | ^^^^^^^^^^^^^
409- | |
410- | this code causes undefined behavior when executed
411- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
390+ | ^^^^^^^^^^^^^ this code causes undefined behavior when executed
412391 |
413392note: enums with no inhabited variants have no valid value
414393 --> $DIR/invalid_value.rs:42:1
@@ -420,10 +399,7 @@ error: the type `TwoUninhabited` does not permit being left uninitialized
420399 --> $DIR/invalid_value.rs:105:36
421400 |
422401LL | let _val: TwoUninhabited = mem::uninitialized();
423- | ^^^^^^^^^^^^^^^^^^^^
424- | |
425- | this code causes undefined behavior when executed
426- | help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
402+ | ^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
427403 |
428404note: enums with no inhabited variants have no valid value
429405 --> $DIR/invalid_value.rs:42:1
0 commit comments