Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/ui/consts/const-eval/union-const-eval-field.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ dont-require-annotations: NOTE
//@ normalize-stderr: "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
//@ normalize-stderr: "([[:xdigit:]]{2}\s){4}(__\s){4}\s+│\s+([?|\.]){4}\W{4}" -> "HEX_DUMP"

type Field1 = i32;
type Field2 = f32;
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/consts/const-eval/union-const-eval-field.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
error[E0080]: reading memory at ALLOC0[0x0..0x8], but memory is uninitialized at [0x4..0x8], and this operation requires initialized memory
--> $DIR/union-const-eval-field.rs:29:37
--> $DIR/union-const-eval-field.rs:30:37
|
LL | const FIELD3: Field3 = unsafe { UNION.field3 };
| ^^^^^^^^^^^^ evaluation of `read_field3::FIELD3` failed here
|
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
00 00 80 3f __ __ __ __ │ ...?░░░░
HEX_DUMP
}

note: erroneous constant encountered
--> $DIR/union-const-eval-field.rs:31:5
--> $DIR/union-const-eval-field.rs:32:5
|
LL | FIELD3
| ^^^^^^

note: erroneous constant encountered
--> $DIR/union-const-eval-field.rs:31:5
--> $DIR/union-const-eval-field.rs:32:5
|
LL | FIELD3
| ^^^^^^
Expand Down
Loading