Skip to content

Commit b0728ab

Browse files
committed
Fix tests
1 parent d82f10a commit b0728ab

11 files changed

+61
-70
lines changed

tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
+ scope 11 {
4747
+ scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
4848
+ scope 14 {
49-
+ scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
50-
+ }
5149
+ }
5250
+ }
5351
+ }

tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
4343
scope 11 {
4444
scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
4545
scope 14 {
46-
scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
47-
}
4846
}
4947
}
5048
}

tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
+ scope 11 {
4747
+ scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
4848
+ scope 14 {
49-
+ scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
50-
+ }
5149
+ }
5250
+ }
5351
+ }

tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ fn unchecked_shr_signed_smaller(_1: i16, _2: u32) -> i16 {
4343
scope 11 {
4444
scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
4545
scope 14 {
46-
scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
47-
}
4846
}
4947
}
5048
}

tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
+ scope 3 {
1616
+ scope 5 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
1717
+ scope 6 {
18-
+ scope 7 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
19-
+ }
2018
+ }
2119
+ }
2220
+ }
@@ -40,7 +38,7 @@
4038
bb1: {
4139
- StorageDead(_2); // scope 0 at $DIR/unwrap_unchecked.rs:+1:26: +1:27
4240
- return; // scope 0 at $DIR/unwrap_unchecked.rs:+2:2: +2:2
43-
+ unreachable; // scope 6 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
41+
+ unreachable; // scope 5 at $SRC_DIR/core/src/panic.rs:LL:COL
4442
}
4543

4644
- bb2 (cleanup): {

tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
1313
scope 3 {
1414
scope 5 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
1515
scope 6 {
16-
scope 7 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
17-
}
1816
}
1917
}
2018
}
@@ -30,7 +28,7 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
3028
}
3129

3230
bb1: {
33-
unreachable; // scope 6 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
31+
unreachable; // scope 5 at $SRC_DIR/core/src/panic.rs:LL:COL
3432
}
3533

3634
bb2: {

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 "╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼" -> "╾ALLOC_ID$2╼"
56
// normalize-stderr-test "alloc\d+" -> "allocN"
67
#![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]

tests/ui/consts/const-eval/ub-slice-get-unchecked.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// ignore-debug debug assertions produce different error message
12
#![feature(const_slice_index)]
23

34
const A: [(); 5] = [(), (), (), (), ()];

tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ note: inside `<std::ops::Range<usize> as SliceIndex<[()]>>::get_unchecked`
88
note: inside `core::slice::<impl [()]>::get_unchecked::<std::ops::Range<usize>>`
99
--> $SRC_DIR/core/src/slice/mod.rs:LL:COL
1010
note: inside `B`
11-
--> $DIR/ub-slice-get-unchecked.rs:7:27
11+
--> $DIR/ub-slice-get-unchecked.rs:8:27
1212
|
1313
LL | const B: &[()] = unsafe { A.get_unchecked(3..1) };
1414
| ^^^^^^^^^^^^^^^^^^^^^

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)