summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/union-const-eval-field.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
commit17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch)
tree3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /src/test/ui/consts/const-eval/union-const-eval-field.stderr
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-17d40c6057c88f4c432b0d7bac88e1b84cb7e67f.tar.xz
rustc-17d40c6057c88f4c432b0d7bac88e1b84cb7e67f.zip
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/consts/const-eval/union-const-eval-field.stderr')
-rw-r--r--src/test/ui/consts/const-eval/union-const-eval-field.stderr13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/test/ui/consts/const-eval/union-const-eval-field.stderr b/src/test/ui/consts/const-eval/union-const-eval-field.stderr
index c512e6825..00964489e 100644
--- a/src/test/ui/consts/const-eval/union-const-eval-field.stderr
+++ b/src/test/ui/consts/const-eval/union-const-eval-field.stderr
@@ -1,16 +1,11 @@
-error[E0080]: it is undefined behavior to use this value
- --> $DIR/union-const-eval-field.rs:28:5
+error[E0080]: evaluation of constant value failed
+ --> $DIR/union-const-eval-field.rs:28:37
|
LL | const FIELD3: Field3 = unsafe { UNION.field3 };
- | ^^^^^^^^^^^^^^^^^^^^ 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: 8, align: 8) {
- __ __ __ __ __ __ __ __ │ ░░░░░░░░
- }
+ | ^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
error[E0080]: erroneous constant used
- --> $DIR/union-const-eval-field.rs:30:5
+ --> $DIR/union-const-eval-field.rs:31:5
|
LL | FIELD3
| ^^^^^^ referenced constant has errors