Skip to content

Commit 05d7a60

Browse files
committed
Changed simplify_match output query because it had become outdated
1 parent e2ab275 commit 05d7a60

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

src/test/mir-opt/simplify_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[inline(never)]
22
fn noop() {}
33

4-
// EMIT_MIR rustc.main.SimplifyBranches-after-copy-prop.diff
4+
// EMIT_MIR rustc.main.ConstProp.diff
55
fn main() {
66
match { let x = false; x } {
77
true => noop(),
+18-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
- // MIR for `main` before SimplifyBranches-after-copy-prop
2-
+ // MIR for `main` after SimplifyBranches-after-copy-prop
1+
- // MIR for `main` before ConstProp
2+
+ // MIR for `main` after ConstProp
33

44
fn main() -> () {
55
let mut _0: (); // return place in scope 0 at $DIR/simplify_match.rs:5:11: 5:11
@@ -19,15 +19,23 @@
1919
// mir::Constant
2020
// + span: $DIR/simplify_match.rs:6:21: 6:26
2121
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
22-
_1 = const false; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29
23-
// ty::Const
24-
// + ty: bool
25-
// + val: Value(Scalar(0x00))
26-
// mir::Constant
27-
// + span: $DIR/simplify_match.rs:6:28: 6:29
28-
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
22+
- _1 = _2; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29
23+
+ _1 = const false; // scope 1 at $DIR/simplify_match.rs:6:28: 6:29
24+
+ // ty::Const
25+
+ // + ty: bool
26+
+ // + val: Value(Scalar(0x00))
27+
+ // mir::Constant
28+
+ // + span: $DIR/simplify_match.rs:6:28: 6:29
29+
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
2930
StorageDead(_2); // scope 0 at $DIR/simplify_match.rs:6:30: 6:31
30-
goto -> bb1; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13
31+
- switchInt(_1) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13
32+
+ switchInt(const false) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_match.rs:7:9: 7:13
33+
+ // ty::Const
34+
+ // + ty: bool
35+
+ // + val: Value(Scalar(0x00))
36+
+ // mir::Constant
37+
+ // + span: $DIR/simplify_match.rs:7:9: 7:13
38+
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
3139
}
3240

3341
bb1: {

0 commit comments

Comments
 (0)