Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Nov 16, 2023
1 parent 1b09a51 commit 500e3d3
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 114 deletions.
110 changes: 55 additions & 55 deletions tests/ui/consts/const-eval/raw-bytes.32bit.stderr

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions tests/ui/consts/const-eval/raw-bytes.64bit.stderr

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/ui/consts/const-eval/raw-bytes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// stderr-per-bitwidth
// ignore-endian-big
// ignore-tidy-linelength
// ignore-debug debug assertions catch some UB too early
// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼" -> "╾ALLOC_ID$1╼"

#![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/consts/std/alloc.32bit.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
--> $DIR/alloc.rs:11:1
--> $DIR/alloc.rs:12:1
|
LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000000, but expected a valid enum tag
Expand All @@ -10,7 +10,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
}

error[E0080]: it is undefined behavior to use this value
--> $DIR/alloc.rs:15:1
--> $DIR/alloc.rs:16:1
|
LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000003, but expected a valid enum tag
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/consts/std/alloc.64bit.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0080]: it is undefined behavior to use this value
--> $DIR/alloc.rs:11:1
--> $DIR/alloc.rs:12:1
|
LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
Expand All @@ -10,7 +10,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
}

error[E0080]: it is undefined behavior to use this value
--> $DIR/alloc.rs:15:1
--> $DIR/alloc.rs:16:1
|
LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000003, but expected a valid enum tag
Expand Down
1 change: 1 addition & 0 deletions tests/ui/consts/std/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Strip out raw byte dumps to make comparison platform-independent:
// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
// ignore-debug debug assertions catch some UB too early
use std::alloc::Layout;

// ok
Expand Down
1 change: 1 addition & 0 deletions tests/ui/print_type_sizes/niche-filling.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// compile-flags: -Z print-type-sizes --crate-type=lib
// ignore-debug debug assertions will print more types
// build-pass
// ignore-pass
// ^-- needed because `--pass check` does not emit the output needed.
Expand Down

0 comments on commit 500e3d3

Please sign in to comment.