Skip to content

Commit ece0d6e

Browse files
committed
Fix tests
1 parent 81cd49d commit ece0d6e

File tree

7 files changed

+117
-114
lines changed

7 files changed

+117
-114
lines changed

tests/ui/consts/const-eval/raw-bytes.32bit.stderr

+55-55
Large diffs are not rendered by default.

tests/ui/consts/const-eval/raw-bytes.64bit.stderr

+55-55
Large diffs are not rendered by default.

tests/ui/consts/const-eval/raw-bytes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// stderr-per-bitwidth
22
// ignore-endian-big
33
// ignore-tidy-linelength
4+
// ignore-debug debug assertions catch some UB too early
45
// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼" -> "╾ALLOC_ID$1╼"
56

67
#![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]

tests/ui/consts/std/alloc.32bit.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0080]: it is undefined behavior to use this value
2-
--> $DIR/alloc.rs:11:1
2+
--> $DIR/alloc.rs:12:1
33
|
44
LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000000, but expected a valid enum tag
@@ -10,7 +10,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
1010
}
1111

1212
error[E0080]: it is undefined behavior to use this value
13-
--> $DIR/alloc.rs:15:1
13+
--> $DIR/alloc.rs:16:1
1414
|
1515
LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x00000003, but expected a valid enum tag

tests/ui/consts/std/alloc.64bit.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0080]: it is undefined behavior to use this value
2-
--> $DIR/alloc.rs:11:1
2+
--> $DIR/alloc.rs:12:1
33
|
44
LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchecked(0x1000, 0x00) };
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000000, but expected a valid enum tag
@@ -10,7 +10,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
1010
}
1111

1212
error[E0080]: it is undefined behavior to use this value
13-
--> $DIR/alloc.rs:15:1
13+
--> $DIR/alloc.rs:16:1
1414
|
1515
LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unchecked(9, 3) };
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .align.0.<enum-tag>: encountered 0x0000000000000003, but expected a valid enum tag

tests/ui/consts/std/alloc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Strip out raw byte dumps to make comparison platform-independent:
33
// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
44
// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
5+
// ignore-debug debug assertions catch some UB too early
56
use std::alloc::Layout;
67

78
// ok

tests/ui/print_type_sizes/niche-filling.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -Z print-type-sizes --crate-type=lib
2+
// ignore-debug debug assertions will print more types
23
// build-pass
34
// ignore-pass
45
// ^-- needed because `--pass check` does not emit the output needed.

0 commit comments

Comments
 (0)