summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/ub-enum-overwrite.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/const-eval/ub-enum-overwrite.stderr')
-rw-r--r--src/test/ui/consts/const-eval/ub-enum-overwrite.stderr13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/ui/consts/const-eval/ub-enum-overwrite.stderr b/src/test/ui/consts/const-eval/ub-enum-overwrite.stderr
index 8560112ae..5750212b4 100644
--- a/src/test/ui/consts/const-eval/ub-enum-overwrite.stderr
+++ b/src/test/ui/consts/const-eval/ub-enum-overwrite.stderr
@@ -1,13 +1,8 @@
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/ub-enum-overwrite.rs:8:1
+error[E0080]: evaluation of constant value failed
+ --> $DIR/ub-enum-overwrite.rs:13:14
|
-LL | const _: u8 = {
- | ^^^^^^^^^^^ constructing invalid value: encountered uninitialized bytes, but expected initialized bytes
- |
- = 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: 1, align: 1) {
- __ │ ░
- }
+LL | unsafe { *p }
+ | ^^ using uninitialized data, but this operation requires initialized memory
error: aborting due to previous error