Skip to content

Commit d4b6cff

Browse files
authored
Rollup merge of #115169 - RalfJung:do-not-ignore-debug, r=cjgillot
remove some unnecessary ignore-debug clauses ignore-debug is only needed when the debug assertions *in the standard library* somehow affect the test. This can happen with inlining but otherwise should be rare. ignore-debug is problematic since PR CI is only run with debug assertions. r? `@cjgillot` since it looks like you added most of these
2 parents adc0c91 + e4c4f9b commit d4b6cff

14 files changed

+9
-17
lines changed

tests/mir-opt/pre-codegen/chained_comparison.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
2-
// ignore-debug
32

43
#![crate_type = "lib"]
54

tests/mir-opt/pre-codegen/checked_ops.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
22
// needs-unwind
3-
// ignore-debug
43
// only-x86_64
54

65
#![crate_type = "lib"]

tests/mir-opt/pre-codegen/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
43

54
// Checks that we do not have any branches in the MIR for the two tested functions.
65

tests/mir-opt/pre-codegen/loops.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -O -Zmir-opt-level=2 -g
22
// needs-unwind
3-
// ignore-debug
43

54
#![crate_type = "lib"]
65

tests/mir-opt/pre-codegen/mem_replace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
3+
// ignore-debug the standard library debug assertions leak into this test
44

55
#![crate_type = "lib"]
66

tests/mir-opt/pre-codegen/range_iter.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
43
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
54

65
#![crate_type = "lib"]

tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
fn ezmap(_1: Option<i32>) -> Option<i32> {
44
debug x => _1;
55
let mut _0: std::option::Option<i32>;
6-
scope 1 (inlined map::<i32, i32, [closure@$DIR/simple_option_map.rs:18:12: 18:15]>) {
6+
scope 1 (inlined map::<i32, i32, [closure@$DIR/simple_option_map.rs:17:12: 17:15]>) {
77
debug slf => _1;
8-
debug f => const ZeroSized: [closure@$DIR/simple_option_map.rs:18:12: 18:15];
8+
debug f => const ZeroSized: [closure@$DIR/simple_option_map.rs:17:12: 17:15];
99
let mut _2: isize;
1010
let _3: i32;
1111
let mut _4: i32;

tests/mir-opt/pre-codegen/simple_option_map.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
43

54
#[inline(always)]
65
fn map<T, U, F>(slf: Option<T>, f: F) -> Option<U>

tests/mir-opt/pre-codegen/slice_index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
3+
// ignore-debug the standard library debug assertions leak into this test
44
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
55

66
#![crate_type = "lib"]

tests/mir-opt/pre-codegen/slice_iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
3+
// ignore-debug the standard library debug assertions leak into this test
44
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
55

66
#![crate_type = "lib"]

tests/mir-opt/pre-codegen/try_identity.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
22
// only-64bit
3-
// ignore-debug
43

54
// Track the status of MIR optimizations simplifying `Ok(res?)` for both the old and new desugarings
65
// of that syntax.

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:12:1
2+
--> $DIR/alloc.rs:11: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:16:1
13+
--> $DIR/alloc.rs:15: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:12:1
2+
--> $DIR/alloc.rs:11: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:16:1
13+
--> $DIR/alloc.rs:15: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
@@ -1,5 +1,4 @@
11
// stderr-per-bitwidth
2-
// ignore-debug (the debug assertions change the error)
32
// Strip out raw byte dumps to make comparison platform-independent:
43
// normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
54
// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"

0 commit comments

Comments
 (0)