summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr')
-rw-r--r--tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr b/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr
index 69fb1a59d..74bc6317c 100644
--- a/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr
+++ b/tests/ui/consts/const-eval/validate_uninhabited_zsts.32bit.stderr
@@ -11,7 +11,7 @@ error[E0080]: evaluation of constant value failed
--> $DIR/validate_uninhabited_zsts.rs:4:14
|
LL | unsafe { std::mem::transmute(()) }
- | ^^^^^^^^^^^^^^^^^^^^^^^ transmuting to uninhabited type
+ | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a value of the never type `!`
|
note: inside `foo`
--> $DIR/validate_uninhabited_zsts.rs:4:14
@@ -24,14 +24,11 @@ note: inside `FOO`
LL | const FOO: [empty::Empty; 3] = [foo(); 3];
| ^^^^^
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/validate_uninhabited_zsts.rs:21:1
+error[E0080]: evaluation of constant value failed
+ --> $DIR/validate_uninhabited_zsts.rs:21:42
|
LL | const BAR: [empty::Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at [0].0: encountered a value of uninhabited type empty::Void
- |
- = 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.
- = note: the raw bytes of the constant (size: 0, align: 1) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered a value of uninhabited type empty::Void
warning: the type `empty::Empty` does not permit zero-initialization
--> $DIR/validate_uninhabited_zsts.rs:21:42