Skip to content

Commit 1e7ec94

Browse files
committed
Bless 32bit ui tests.
1 parent 47b8d26 commit 1e7ec94

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/test/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
warning: the type `!` does not permit zero-initialization
2+
--> $DIR/validate_uninhabited_zsts.rs:4:14
3+
|
4+
LL | unsafe { std::mem::transmute(()) }
5+
| ^^^^^^^^^^^^^^^^^^^^^^^
6+
| |
7+
| this code causes undefined behavior when executed
8+
| help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
9+
|
10+
= note: `#[warn(invalid_value)]` on by default
11+
= note: the `!` type has no valid value
12+
113
error[E0080]: evaluation of constant value failed
214
--> $DIR/validate_uninhabited_zsts.rs:4:14
315
|
@@ -19,18 +31,6 @@ LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
1931
= 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.
2032
= note: the raw bytes of the constant (size: 0, align: 1) {}
2133

22-
warning: the type `!` does not permit zero-initialization
23-
--> $DIR/validate_uninhabited_zsts.rs:4:14
24-
|
25-
LL | unsafe { std::mem::transmute(()) }
26-
| ^^^^^^^^^^^^^^^^^^^^^^^
27-
| |
28-
| this code causes undefined behavior when executed
29-
| help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
30-
|
31-
= note: `#[warn(invalid_value)]` on by default
32-
= note: the `!` type has no valid value
33-
3434
warning: the type `empty::Empty` does not permit zero-initialization
3535
--> $DIR/validate_uninhabited_zsts.rs:23:42
3636
|

0 commit comments

Comments
 (0)