diff options
| author | bors <bors@rust-lang.org> | 2023-06-16 01:55:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-16 01:55:34 +0000 |
| commit | c84d5e7078435a0ddd8770c3530fe7fdbf026ec4 (patch) | |
| tree | 5db6de1bd9e77cdd8fd93debe36d363dc1ec391e /tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff | |
| parent | 0252b4093ff19a8aaae2a1965b76b9ba4528e5c0 (diff) | |
| parent | 0a1fa411edbf6f9ad1205655d77cfda5a43aac06 (diff) | |
| download | rust-c84d5e7078435a0ddd8770c3530fe7fdbf026ec4.tar.gz rust-c84d5e7078435a0ddd8770c3530fe7fdbf026ec4.zip | |
Auto merge of #112346 - saethlin:no-comment, r=oli-obk
Remove comments from mir-opt MIR dumps See https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Line.20numbers.20in.20mir-opt.20tests/near/363849874 In https://github.com/rust-lang/rust/pull/99780 there is mention that "there has been a zulip conversation about disabling line numbers with mixed opinions" which to me means that some people opposed this. I can't find the referenced conversation so... here we go. The current situation is quite chaotic. It's not hard to find MIR diffs which contain * Absolute line numbers * Relative line numbers * Substituted line numbers (LL) For example: https://github.com/rust-lang/rust/blob/408bbd040613f6776e0a7d05d582c81f4ddc189a/tests/mir-opt/inline/inline_shims.drop.Inline.diff#L10-L17 And sometimes adding a comment at the top of a mir-opt test generates a diff in the test because a line number changed: https://github.com/rust-lang/rust/pull/98112/files#diff-b8cf4bcce95078e6a3faf075e9abf6864872fb28a64d95c04f04513b9e3bbd81 And irrelevant changes to the standard library can generate diffs in mir-opt tests: https://github.com/rust-lang/rust/pull/110694/files#diff-bf96b0e7c67b8b272814536888fd9428c314991e155beae1f0a2a67f0ac47b2c https://github.com/rust-lang/rust/commit/769886cc35ce08b76839f4cf72b8af1161c432e1 I think we should, specifically in mir-opt tests, completely remove the comments, or insert placeholders for all line and column numbers.
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff')
| -rw-r--r-- | tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff index 22bdc35d694..3946e7c7d96 100644 --- a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff +++ b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.diff @@ -2,62 +2,62 @@ + // MIR for `simple` after DataflowConstProp fn simple() -> () { - let mut _0: (); // return place in scope 0 at $DIR/enum.rs:+0:13: +0:13 - let _1: E; // in scope 0 at $DIR/enum.rs:+1:9: +1:10 - let mut _3: isize; // in scope 0 at $DIR/enum.rs:+2:23: +2:31 + let mut _0: (); + let _1: E; + let mut _3: isize; scope 1 { - debug e => _1; // in scope 1 at $DIR/enum.rs:+1:9: +1:10 - let _2: i32; // in scope 1 at $DIR/enum.rs:+2:9: +2:10 - let _4: i32; // in scope 1 at $DIR/enum.rs:+2:29: +2:30 - let _5: i32; // in scope 1 at $DIR/enum.rs:+2:44: +2:45 + debug e => _1; + let _2: i32; + let _4: i32; + let _5: i32; scope 2 { - debug x => _2; // in scope 2 at $DIR/enum.rs:+2:9: +2:10 + debug x => _2; } scope 3 { - debug x => _4; // in scope 3 at $DIR/enum.rs:+2:29: +2:30 + debug x => _4; } scope 4 { - debug x => _5; // in scope 4 at $DIR/enum.rs:+2:44: +2:45 + debug x => _5; } } bb0: { - StorageLive(_1); // scope 0 at $DIR/enum.rs:+1:9: +1:10 - _1 = E::V1(const 0_i32); // scope 0 at $DIR/enum.rs:+1:13: +1:21 - StorageLive(_2); // scope 1 at $DIR/enum.rs:+2:9: +2:10 -- _3 = discriminant(_1); // scope 1 at $DIR/enum.rs:+2:19: +2:20 -- switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2]; // scope 1 at $DIR/enum.rs:+2:13: +2:20 -+ _3 = const 0_isize; // scope 1 at $DIR/enum.rs:+2:19: +2:20 -+ switchInt(const 0_isize) -> [0: bb3, 1: bb1, otherwise: bb2]; // scope 1 at $DIR/enum.rs:+2:13: +2:20 + StorageLive(_1); + _1 = E::V1(const 0_i32); + StorageLive(_2); +- _3 = discriminant(_1); +- switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2]; ++ _3 = const 0_isize; ++ switchInt(const 0_isize) -> [0: bb3, 1: bb1, otherwise: bb2]; } bb1: { - StorageLive(_5); // scope 1 at $DIR/enum.rs:+2:44: +2:45 - _5 = ((_1 as V2).0: i32); // scope 1 at $DIR/enum.rs:+2:44: +2:45 - _2 = _5; // scope 4 at $DIR/enum.rs:+2:50: +2:51 - StorageDead(_5); // scope 1 at $DIR/enum.rs:+2:50: +2:51 - goto -> bb4; // scope 1 at $DIR/enum.rs:+2:50: +2:51 + StorageLive(_5); + _5 = ((_1 as V2).0: i32); + _2 = _5; + StorageDead(_5); + goto -> bb4; } bb2: { - unreachable; // scope 1 at $DIR/enum.rs:+2:19: +2:20 + unreachable; } bb3: { - StorageLive(_4); // scope 1 at $DIR/enum.rs:+2:29: +2:30 -- _4 = ((_1 as V1).0: i32); // scope 1 at $DIR/enum.rs:+2:29: +2:30 -- _2 = _4; // scope 3 at $DIR/enum.rs:+2:35: +2:36 -+ _4 = const 0_i32; // scope 1 at $DIR/enum.rs:+2:29: +2:30 -+ _2 = const 0_i32; // scope 3 at $DIR/enum.rs:+2:35: +2:36 - StorageDead(_4); // scope 1 at $DIR/enum.rs:+2:35: +2:36 - goto -> bb4; // scope 1 at $DIR/enum.rs:+2:35: +2:36 + StorageLive(_4); +- _4 = ((_1 as V1).0: i32); +- _2 = _4; ++ _4 = const 0_i32; ++ _2 = const 0_i32; + StorageDead(_4); + goto -> bb4; } bb4: { - _0 = const (); // scope 0 at $DIR/enum.rs:+0:13: +3:2 - StorageDead(_2); // scope 1 at $DIR/enum.rs:+3:1: +3:2 - StorageDead(_1); // scope 0 at $DIR/enum.rs:+3:1: +3:2 - return; // scope 0 at $DIR/enum.rs:+3:2: +3:2 + _0 = const (); + StorageDead(_2); + StorageDead(_1); + return; } } |
