Skip to content

Commit c4a0949

Browse files
committed
make output bitwidth-independent
1 parent b39e4c7 commit c4a0949

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/fail/transmute_fat1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// error-pattern: type validation failed: encountered a pointer
2+
// normalize-stderr-test: "\[u8; (8|16)\]" -> "$$ARRAY"
23

34
fn main() {
45
#[cfg(target_pointer_width="64")]

tests/fail/transmute_fat1.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: Undefined Behavior: type validation failed: encountered a pointer, but expected plain (non-pointer) bytes
22
--> $DIR/transmute_fat1.rs:LL:CC
33
|
4-
LL | std::mem::transmute::<&[u8], [u8; 16]>(&[1u8])
4+
LL | std::mem::transmute::<&[u8], $ARRAY>(&[1u8])
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected plain (non-pointer) bytes
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior

0 commit comments

Comments
 (0)