Skip to content

Commit ea4aca1

Browse files
committed
Normalize away pairs of line:col numbers.
1 parent e0bb75e commit ea4aca1

11 files changed

+167
-167
lines changed

src/test/mir-opt/const_prop/control-flow-simplification/rustc.hello.ConstProp.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
fn hello() -> () {
55
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
66
let mut _1: bool; // in scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
7-
let mut _2: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
7+
let mut _2: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
88

99
bb0: {
1010
StorageLive(_1); // bb0[0]: scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
@@ -35,19 +35,19 @@
3535
}
3636

3737
bb2: {
38-
StorageLive(_2); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
39-
const std::rt::begin_panic::<&str>(const "explicit panic"); // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
38+
StorageLive(_2); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
39+
const std::rt::begin_panic::<&str>(const "explicit panic"); // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
4040
// ty::Const
4141
// + ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}
4242
// + val: Value(Scalar(<ZST>))
4343
// mir::Constant
44-
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 13:46
44+
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
4545
// + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar(<ZST>)) }
4646
// ty::Const
4747
// + ty: &str
4848
// + val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 })
4949
// mir::Constant
50-
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 12:45
50+
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
5151
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) }
5252
}
5353
}

src/test/mir-opt/no-drop-for-inactive-variant/rustc.unwrap.SimplifyCfg-elaborate-drops.after.mir

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn unwrap(_1: std::option::Option<T>) -> T {
55
let mut _0: T; // return place in scope 0 at $DIR/no-drop-for-inactive-variant.rs:7:33: 7:34
66
let mut _2: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:9: 9:16
77
let _3: T; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:9:14: 9:15
8-
let mut _4: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
8+
let mut _4: !; // in scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
99
let mut _5: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2
1010
let mut _6: isize; // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:12:1: 12:2
1111
scope 1 {
@@ -22,19 +22,19 @@ fn unwrap(_1: std::option::Option<T>) -> T {
2222
}
2323

2424
bb2: {
25-
StorageLive(_4); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
26-
const std::rt::begin_panic::<&str>(const "explicit panic") -> bb5; // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL: 13:52
25+
StorageLive(_4); // bb2[0]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
26+
const std::rt::begin_panic::<&str>(const "explicit panic") -> bb5; // bb2[1]: scope 0 at $SRC_DIR/libstd/macros.rs:LL:COL
2727
// ty::Const
2828
// + ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}
2929
// + val: Value(Scalar(<ZST>))
3030
// mir::Constant
31-
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 13:46
31+
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
3232
// + literal: Const { ty: fn(&str) -> ! {std::rt::begin_panic::<&str>}, val: Value(Scalar(<ZST>)) }
3333
// ty::Const
3434
// + ty: &str
3535
// + val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 })
3636
// mir::Constant
37-
// + span: $SRC_DIR/libstd/macros.rs:LL:COL: 12:45
37+
// + span: $SRC_DIR/libstd/macros.rs:LL:COL
3838
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [101, 120, 112, 108, 105, 99, 105, 116, 32, 112, 97, 110, 105, 99], relocations: Relocations(SortedMap { data: [] }), undef_mask: UndefMask { blocks: [16383], len: Size { raw: 14 } }, size: Size { raw: 14 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 14 }) }
3939
}
4040

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
// MIR for `std::intrinsics::drop_in_place` after SimplifyCfg-make_shim
22

33
fn std::intrinsics::drop_in_place(_1: *mut Test) -> () {
4-
let mut _0: (); // return place in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
5-
let mut _2: &mut Test; // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
6-
let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
4+
let mut _0: (); // return place in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
5+
let mut _2: &mut Test; // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
6+
let mut _3: (); // in scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
77

88
bb0: {
9-
Retag([raw] _1); // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
10-
_2 = &mut (*_1); // bb0[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
11-
_3 = const <Test as std::ops::Drop>::drop(move _2) -> bb1; // bb0[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
9+
Retag([raw] _1); // bb0[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
10+
_2 = &mut (*_1); // bb0[1]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
11+
_3 = const <Test as std::ops::Drop>::drop(move _2) -> bb1; // bb0[2]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
1212
// ty::Const
1313
// + ty: for<'r> fn(&'r mut Test) {<Test as std::ops::Drop>::drop}
1414
// + val: Value(Scalar(<ZST>))
1515
// mir::Constant
16-
// + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
16+
// + span: $SRC_DIR/libcore/ptr/mod.rs:LL:COL
1717
// + literal: Const { ty: for<'r> fn(&'r mut Test) {<Test as std::ops::Drop>::drop}, val: Value(Scalar(<ZST>)) }
1818
}
1919

2020
bb1: {
21-
return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL: 181:2
21+
return; // bb1[0]: scope 0 at $SRC_DIR/libcore/ptr/mod.rs:LL:COL
2222
}
2323
}

src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyArmIdentity.diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
debug err => _6; // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
2222
scope 3 {
2323
scope 7 {
24-
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL: 566:14
24+
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
2525
}
2626
scope 8 {
27-
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1555:20
27+
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
2828
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:6:14: 6:15
2929
}
3030
}
@@ -35,7 +35,7 @@
3535
}
3636
}
3737
scope 6 {
38-
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL: 1545:24
38+
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
3939
}
4040

4141
bb0: {
@@ -55,11 +55,11 @@
5555

5656
bb2: {
5757
- _6 = ((_1 as Err).0: i32); // bb2[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
58-
- ((_0 as Err).0: i32) = move _6; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
59-
- discriminant(_0) = 1; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
60-
+ _0 = move _1; // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
61-
+ nop; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
62-
+ nop; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1556:15
58+
- ((_0 as Err).0: i32) = move _6; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
59+
- discriminant(_0) = 1; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
60+
+ _0 = move _1; // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
61+
+ nop; // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
62+
+ nop; // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
6363
goto -> bb3; // bb2[3]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
6464
}
6565

src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyBranchSame.after.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
2020
debug err => _6; // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
2121
scope 3 {
2222
scope 7 {
23-
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL: 566:14
23+
debug t => _6; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
2424
}
2525
scope 8 {
26-
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1555:20
26+
debug v => _6; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
2727
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:6:14: 6:15
2828
}
2929
}
@@ -34,7 +34,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
3434
}
3535
}
3636
scope 6 {
37-
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL: 1545:24
37+
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
3838
}
3939

4040
bb0: {

src/test/mir-opt/simplify_try/rustc.try_identity.SimplifyLocals.after.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
1212
debug err => _2; // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
1313
scope 3 {
1414
scope 7 {
15-
debug t => _2; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL: 566:14
15+
debug t => _2; // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
1616
}
1717
scope 8 {
18-
debug v => _2; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL: 1555:20
18+
debug v => _2; // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
1919
}
2020
}
2121
}
@@ -25,7 +25,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
2525
}
2626
}
2727
scope 6 {
28-
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL: 1545:24
28+
debug self => _1; // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
2929
}
3030

3131
bb0: {

0 commit comments

Comments
 (0)