Skip to content

Commit 906f66f

Browse files
committed
comment out the old tests instead of adjusting them
1 parent 917dd82 commit 906f66f

9 files changed

+159
-143
lines changed

tests/coverage/closure.cov-map

+10-8
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,19 @@ Number of file 0 mappings: 6
140140
- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 10)
141141
Highest counter ID seen: c1
142142

143-
Function name: closure::main::{closure#18} (unused)
144-
Raw bytes (24): 0x[01, 01, 00, 04, 00, 19, 0d, 02, 1c, 00, 02, 1d, 02, 12, 00, 02, 11, 00, 12, 00, 01, 11, 01, 0e]
143+
Function name: closure::main::{closure#18}
144+
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 19, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]
145145
Number of files: 1
146146
- file 0 => global file 1
147-
Number of expressions: 0
147+
Number of expressions: 1
148+
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
148149
Number of file 0 mappings: 4
149-
- Code(Zero) at (prev + 25, 13) to (start + 2, 28)
150-
- Code(Zero) at (prev + 2, 29) to (start + 2, 18)
151-
- Code(Zero) at (prev + 2, 17) to (start + 0, 18)
152-
- Code(Zero) at (prev + 1, 17) to (start + 1, 14)
153-
Highest counter ID seen: (none)
150+
- Code(Counter(0)) at (prev + 25, 13) to (start + 2, 28)
151+
- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18)
152+
- Code(Expression(0, Sub)) at (prev + 2, 17) to (start + 0, 18)
153+
= (c0 - c1)
154+
- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 14)
155+
Highest counter ID seen: c1
154156

155157
Function name: closure::main::{closure#19}
156158
Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 43, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]

tests/coverage/issue-84561.cov-map

+110-95
Large diffs are not rendered by default.

tests/mir-opt/const_prop/read_immutable_static.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ static FOO: u8 = 2;
66
fn main() {
77
// CHECK-LABEL: fn main(
88
// CHECK: debug x => [[x:_.*]];
9-
// CHECK-NOT: [[x]] = const 4_u8;
9+
// Disabled due to <https://github.com/rust-lang/rust/issues/130853>
10+
// COM: CHECK: [[x]] = const 4_u8;
1011
let x = FOO + FOO;
1112
}

tests/mir-opt/const_prop/ref_deref_project.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
fn main() {
66
// CHECK-LABEL: fn main(
77
// CHECK: debug a => [[a:_.*]];
8-
// CHECK-NOT: [[a]] = const 5_i32;
8+
// Disabled due to <https://github.com/rust-lang/rust/issues/130853>
9+
// COM: CHECK: [[a]] = const 5_i32;
910
let a = *(&(4, 5).1);
1011
}

tests/mir-opt/const_prop/slice_len.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ fn main() {
88
// CHECK-LABEL: fn main(
99
// CHECK: debug a => [[a:_.*]];
1010
// CHECK: [[slice:_.*]] = copy {{.*}} as &[u32] (PointerCoercion(Unsize, AsCast));
11-
// CHECK-NOT: assert(const true,
12-
// CHECK-NOT: [[a]] = const 2_u32;
11+
// Disabled due to <https://github.com/rust-lang/rust/issues/130853>
12+
// COM: CHECK: assert(const true,
13+
// COM: CHECK: [[a]] = const 2_u32;
1314
let a = (&[1u32, 2, 3] as &[u32])[1];
1415
}

tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
let mut _3: fn(u8) -> u8;
99
let _5: ();
1010
let mut _6: fn(u8) -> u8;
11-
let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
11+
let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
1212
let _10: ();
1313
let mut _11: fn();
14-
let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
14+
let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
1515
let _14: ();
1616
let mut _15: fn();
1717
scope 1 {
1818
debug f => _1;
1919
let _4: fn(u8) -> u8;
2020
scope 2 {
2121
debug g => _4;
22-
let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
22+
let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
2323
scope 3 {
2424
debug closure => _7;
2525
let _8: fn();
@@ -62,16 +62,16 @@
6262
StorageDead(_6);
6363
StorageDead(_5);
6464
- StorageLive(_7);
65-
- _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
65+
- _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
6666
- StorageLive(_8);
6767
+ nop;
68-
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
68+
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
6969
+ nop;
7070
StorageLive(_9);
7171
- _9 = copy _7;
7272
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
73-
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
74-
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
73+
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
74+
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
7575
StorageDead(_9);
7676
StorageLive(_10);
7777
StorageLive(_11);
@@ -88,8 +88,8 @@
8888
StorageLive(_13);
8989
- _13 = copy _7;
9090
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
91-
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
92-
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
91+
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
92+
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
9393
StorageDead(_13);
9494
StorageLive(_14);
9595
StorageLive(_15);

tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
let mut _3: fn(u8) -> u8;
99
let _5: ();
1010
let mut _6: fn(u8) -> u8;
11-
let mut _9: {closure@$DIR/gvn.rs:620:19: 620:21};
11+
let mut _9: {closure@$DIR/gvn.rs:615:19: 615:21};
1212
let _10: ();
1313
let mut _11: fn();
14-
let mut _13: {closure@$DIR/gvn.rs:620:19: 620:21};
14+
let mut _13: {closure@$DIR/gvn.rs:615:19: 615:21};
1515
let _14: ();
1616
let mut _15: fn();
1717
scope 1 {
1818
debug f => _1;
1919
let _4: fn(u8) -> u8;
2020
scope 2 {
2121
debug g => _4;
22-
let _7: {closure@$DIR/gvn.rs:620:19: 620:21};
22+
let _7: {closure@$DIR/gvn.rs:615:19: 615:21};
2323
scope 3 {
2424
debug closure => _7;
2525
let _8: fn();
@@ -62,16 +62,16 @@
6262
StorageDead(_6);
6363
StorageDead(_5);
6464
- StorageLive(_7);
65-
- _7 = {closure@$DIR/gvn.rs:620:19: 620:21};
65+
- _7 = {closure@$DIR/gvn.rs:615:19: 615:21};
6666
- StorageLive(_8);
6767
+ nop;
68-
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
68+
+ _7 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
6969
+ nop;
7070
StorageLive(_9);
7171
- _9 = copy _7;
7272
- _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
73-
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
74-
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
73+
+ _9 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
74+
+ _8 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
7575
StorageDead(_9);
7676
StorageLive(_10);
7777
StorageLive(_11);
@@ -88,8 +88,8 @@
8888
StorageLive(_13);
8989
- _13 = copy _7;
9090
- _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
91-
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21};
92-
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:620:19: 620:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
91+
+ _13 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21};
92+
+ _12 = const ZeroSized: {closure@$DIR/gvn.rs:615:19: 615:21} as fn() (PointerCoercion(ClosureFnPointer(Safe), AsCast));
9393
StorageDead(_13);
9494
StorageLive(_14);
9595
StorageLive(_15);

tests/mir-opt/gvn.rs

+13-18
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,17 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
100100
opaque((x * y) - y);
101101

102102
// We cannot substitute through an immutable reference.
103+
// (Disabled due to <https://github.com/rust-lang/rust/issues/130853>)
103104
// CHECK: [[ref:_.*]] = &_3;
104105
// CHECK: [[deref:_.*]] = copy (*[[ref]]);
105-
// CHECK: [[addref:_.*]] = Add(move [[deref]], copy _1);
106-
// CHECK: opaque::<u64>(move [[addref]])
107-
// CHECK: [[deref2:_.*]] = copy (*[[ref]]);
108-
// CHECK: [[addref2:_.*]] = Add(move [[deref2]], copy _1);
109-
// CHECK: opaque::<u64>(move [[addref2]])
106+
// COM: CHECK: [[addref:_.*]] = Add(copy [[deref]], copy _1);
107+
// COM: CHECK: opaque::<u64>(copy [[addref]])
108+
// COM: CHECK: opaque::<u64>(copy [[addref]])
110109
let a = &z;
111110
opaque(*a + x);
112111
opaque(*a + x);
113112

114-
// But not through a mutable reference or a pointer.
113+
// And certainly not through a mutable reference or a pointer.
115114
// CHECK: [[mut:_.*]] = &mut _3;
116115
// CHECK: [[addmut:_.*]] = Add(
117116
// CHECK: opaque::<u64>(move [[addmut]])
@@ -143,11 +142,9 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
143142
// Important: `e` is not `a`!
144143
// CHECK: [[ref2:_.*]] = &_3;
145144
// CHECK: [[deref2:_.*]] = copy (*[[ref2]]);
146-
// CHECK: [[addref2:_.*]] = Add(move [[deref2]], copy _1);
147-
// CHECK: opaque::<u64>(move [[addref2]])
148-
// CHECK: [[deref3:_.*]] = copy (*[[ref2]]);
149-
// CHECK: [[addref3:_.*]] = Add(move [[deref3]], copy _1);
150-
// CHECK: opaque::<u64>(move [[addref3]])
145+
// COM: CHECK: [[addref2:_.*]] = Add(copy [[deref2]], copy _1);
146+
// COM: CHECK: opaque::<u64>(copy [[addref2]])
147+
// COM: CHECK: opaque::<u64>(copy [[addref2]])
151148
let e = &z;
152149
opaque(*e + x);
153150
opaque(*e + x);
@@ -502,9 +499,8 @@ fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
502499
// Do not reuse dereferences of `&Freeze`.
503500
// CHECK: [[ref:_.*]] = &(*_1);
504501
// CHECK: [[st7:_.*]] = copy (*[[ref]]);
505-
// CHECK: opaque::<u32>(move [[st7]])
506-
// CHECK: [[st8:_.*]] = copy (*[[ref]]);
507-
// CHECK: opaque::<u32>(move [[st8]])
502+
// COM: CHECK: opaque::<u32>(copy [[st7]])
503+
// COM: CHECK: opaque::<u32>(copy [[st7]])
508504
let z = &*t;
509505
opaque(*z);
510506
opaque(*z);
@@ -523,9 +519,8 @@ fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
523519

524520
// `*s` is not Copy, but `(*s).0` is, but we still cannot reuse.
525521
// CHECK: [[st10:_.*]] = copy ((*_3).0: u32);
526-
// CHECK: opaque::<u32>(move [[st10]])
527-
// CHECK: [[st11:_.*]] = copy ((*_3).0: u32);
528-
// CHECK: opaque::<u32>(move [[st11]])
522+
// COM: CHECK: opaque::<u32>(copy [[st10]])
523+
// COM: CHECK: opaque::<u32>(copy [[st10]])
529524
opaque(s.0);
530525
opaque(s.0);
531526
}
@@ -742,7 +737,7 @@ fn borrowed<T: Copy + Freeze>(x: T) {
742737
// CHECK: bb1: {
743738
// CHECK-NEXT: _0 = opaque::<T>(copy _1)
744739
// CHECK: bb2: {
745-
// CHECK-NEXT: _0 = opaque::<T>(copy (*_3))
740+
// COM: CHECK-NEXT: _0 = opaque::<T>(copy _1)
746741
mir! {
747742
{
748743
let a = x;

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

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/130853>
12
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
23

34
fn src(x: &&u8) -> bool {

0 commit comments

Comments
 (0)