Skip to content

Commit

Permalink
make output bitwidth-independent
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 6, 2022
1 parent b39e4c7 commit c4a0949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/fail/transmute_fat1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// error-pattern: type validation failed: encountered a pointer
// normalize-stderr-test: "\[u8; (8|16)\]" -> "$$ARRAY"

fn main() {
#[cfg(target_pointer_width="64")]
Expand Down
2 changes: 1 addition & 1 deletion tests/fail/transmute_fat1.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error: Undefined Behavior: type validation failed: encountered a pointer, but expected plain (non-pointer) bytes
--> $DIR/transmute_fat1.rs:LL:CC
|
LL | std::mem::transmute::<&[u8], [u8; 16]>(&[1u8])
LL | std::mem::transmute::<&[u8], $ARRAY>(&[1u8])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected plain (non-pointer) bytes
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
Expand Down

0 comments on commit c4a0949

Please sign in to comment.