about summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-16 01:55:34 +0000
committerbors <bors@rust-lang.org>2023-06-16 01:55:34 +0000
commitc84d5e7078435a0ddd8770c3530fe7fdbf026ec4 (patch)
tree5db6de1bd9e77cdd8fd93debe36d363dc1ec391e /tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff
parent0252b4093ff19a8aaae2a1965b76b9ba4528e5c0 (diff)
parent0a1fa411edbf6f9ad1205655d77cfda5a43aac06 (diff)
downloadrust-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.multiple.DataflowConstProp.diff')
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff88
1 files changed, 44 insertions, 44 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff b/tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff
index c4002d65e5d..775325c4d06 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.multiple.DataflowConstProp.diff
@@ -2,81 +2,81 @@
 + // MIR for `multiple` after DataflowConstProp
   
   fn multiple(_1: bool, _2: u8) -> () {
-      debug x => _1;                       // in scope 0 at $DIR/enum.rs:+0:13: +0:14
-      debug i => _2;                       // in scope 0 at $DIR/enum.rs:+0:22: +0:23
-      let mut _0: ();                      // return place in scope 0 at $DIR/enum.rs:+0:29: +0:29
-      let _3: std::option::Option<u8>;     // in scope 0 at $DIR/enum.rs:+1:9: +1:10
-      let mut _4: bool;                    // in scope 0 at $DIR/enum.rs:+1:16: +1:17
-      let mut _5: u8;                      // in scope 0 at $DIR/enum.rs:+2:14: +2:15
-      let mut _7: isize;                   // in scope 0 at $DIR/enum.rs:+9:23: +9:30
+      debug x => _1;
+      debug i => _2;
+      let mut _0: ();
+      let _3: std::option::Option<u8>;
+      let mut _4: bool;
+      let mut _5: u8;
+      let mut _7: isize;
       scope 1 {
-          debug e => _3;                   // in scope 1 at $DIR/enum.rs:+1:9: +1:10
-          let _6: u8;                      // in scope 1 at $DIR/enum.rs:+9:9: +9:10
-          let _8: u8;                      // in scope 1 at $DIR/enum.rs:+9:28: +9:29
+          debug e => _3;
+          let _6: u8;
+          let _8: u8;
           scope 2 {
-              debug x => _6;               // in scope 2 at $DIR/enum.rs:+9:9: +9:10
-              let _9: u8;                  // in scope 2 at $DIR/enum.rs:+11:9: +11:10
+              debug x => _6;
+              let _9: u8;
               scope 4 {
-                  debug y => _9;           // in scope 4 at $DIR/enum.rs:+11:9: +11:10
+                  debug y => _9;
               }
           }
           scope 3 {
-              debug i => _8;               // in scope 3 at $DIR/enum.rs:+9:28: +9:29
+              debug i => _8;
           }
       }
   
       bb0: {
-          StorageLive(_3);                 // scope 0 at $DIR/enum.rs:+1:9: +1:10
-          StorageLive(_4);                 // scope 0 at $DIR/enum.rs:+1:16: +1:17
-          _4 = _1;                         // scope 0 at $DIR/enum.rs:+1:16: +1:17
-          switchInt(move _4) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/enum.rs:+1:16: +1:17
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = _1;
+          switchInt(move _4) -> [0: bb2, otherwise: bb1];
       }
   
       bb1: {
-          StorageLive(_5);                 // scope 0 at $DIR/enum.rs:+2:14: +2:15
-          _5 = _2;                         // scope 0 at $DIR/enum.rs:+2:14: +2:15
-          _3 = Option::<u8>::Some(move _5); // scope 0 at $DIR/enum.rs:+2:9: +2:16
-          StorageDead(_5);                 // scope 0 at $DIR/enum.rs:+2:15: +2:16
-          goto -> bb3;                     // scope 0 at $DIR/enum.rs:+1:13: +5:6
+          StorageLive(_5);
+          _5 = _2;
+          _3 = Option::<u8>::Some(move _5);
+          StorageDead(_5);
+          goto -> bb3;
       }
   
       bb2: {
-          _3 = Option::<u8>::None;         // scope 0 at $DIR/enum.rs:+4:9: +4:13
-          goto -> bb3;                     // scope 0 at $DIR/enum.rs:+1:13: +5:6
+          _3 = Option::<u8>::None;
+          goto -> bb3;
       }
   
       bb3: {
-          StorageDead(_4);                 // scope 0 at $DIR/enum.rs:+5:5: +5:6
-          StorageLive(_6);                 // scope 1 at $DIR/enum.rs:+9:9: +9:10
-          _7 = discriminant(_3);           // scope 1 at $DIR/enum.rs:+9:19: +9:20
-          switchInt(move _7) -> [0: bb4, 1: bb6, otherwise: bb5]; // scope 1 at $DIR/enum.rs:+9:13: +9:20
+          StorageDead(_4);
+          StorageLive(_6);
+          _7 = discriminant(_3);
+          switchInt(move _7) -> [0: bb4, 1: bb6, otherwise: bb5];
       }
   
       bb4: {
-          _6 = const 0_u8;                 // scope 1 at $DIR/enum.rs:+9:45: +9:46
-          goto -> bb7;                     // scope 1 at $DIR/enum.rs:+9:45: +9:46
+          _6 = const 0_u8;
+          goto -> bb7;
       }
   
       bb5: {
-          unreachable;                     // scope 1 at $DIR/enum.rs:+9:19: +9:20
+          unreachable;
       }
   
       bb6: {
-          StorageLive(_8);                 // scope 1 at $DIR/enum.rs:+9:28: +9:29
-          _8 = ((_3 as Some).0: u8);       // scope 1 at $DIR/enum.rs:+9:28: +9:29
-          _6 = _8;                         // scope 3 at $DIR/enum.rs:+9:34: +9:35
-          StorageDead(_8);                 // scope 1 at $DIR/enum.rs:+9:34: +9:35
-          goto -> bb7;                     // scope 1 at $DIR/enum.rs:+9:34: +9:35
+          StorageLive(_8);
+          _8 = ((_3 as Some).0: u8);
+          _6 = _8;
+          StorageDead(_8);
+          goto -> bb7;
       }
   
       bb7: {
-          StorageLive(_9);                 // scope 2 at $DIR/enum.rs:+11:9: +11:10
-          _9 = _6;                         // scope 2 at $DIR/enum.rs:+11:13: +11:14
-          _0 = const ();                   // scope 0 at $DIR/enum.rs:+0:29: +12:2
-          StorageDead(_9);                 // scope 2 at $DIR/enum.rs:+12:1: +12:2
-          StorageDead(_6);                 // scope 1 at $DIR/enum.rs:+12:1: +12:2
-          StorageDead(_3);                 // scope 0 at $DIR/enum.rs:+12:1: +12:2
-          return;                          // scope 0 at $DIR/enum.rs:+12:2: +12:2
+          StorageLive(_9);
+          _9 = _6;
+          _0 = const ();
+          StorageDead(_9);
+          StorageDead(_6);
+          StorageDead(_3);
+          return;
       }
   }