about summary refs log tree commit diff
path: root/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-28 16:22:19 +0000
committerbors <bors@rust-lang.org>2022-07-28 16:22:19 +0000
commit36f4f4aa38563d0c02bbdbbc03fb20145edef567 (patch)
tree9ccd853d5a9097d70f30a26016de023231841a96 /src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
parente5682615bb4fdb90e3a37b810a1b7bded2a1199e (diff)
parent11c0280798da8f4d65dec25764237d2354e65273 (diff)
downloadrust-36f4f4aa38563d0c02bbdbbc03fb20145edef567.tar.gz
rust-36f4f4aa38563d0c02bbdbbc03fb20145edef567.zip
Auto merge of #99780 - Nilstrieb:mir-opt-test-line-no, r=oli-obk
Use line numbers relative to the function in mir-opt tests

As shown in #99770, the line numbers can be a big source of needless and confusing diffs. This PR adds a new flag `-Zmir-pretty-relative-line-numbers` to make them relative to the function declaration, which avoids most needless diffs from attribute changes.

`@JakobDegen` told me that there has been a zulip conversation about disabling line numbers with mixed opinions, so I'd like to get some feedback here, for this hopefully better solution.

r? rust-lang/wg-mir-opt
Diffstat (limited to 'src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff')
-rw-r--r--src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff b/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
index 884275430c8..57e298625f9 100644
--- a/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
+++ b/src/test/mir-opt/76803_regression.encode.SimplifyBranchSame.diff
@@ -2,28 +2,28 @@
 + // MIR for `encode` after SimplifyBranchSame
   
   fn encode(_1: Type) -> Type {
-      debug v => _1;                       // in scope 0 at $DIR/76803_regression.rs:10:15: 10:16
-      let mut _0: Type;                    // return place in scope 0 at $DIR/76803_regression.rs:10:27: 10:31
-      let mut _2: isize;                   // in scope 0 at $DIR/76803_regression.rs:12:9: 12:16
+      debug v => _1;                       // in scope 0 at $DIR/76803_regression.rs:+0:15: +0:16
+      let mut _0: Type;                    // return place in scope 0 at $DIR/76803_regression.rs:+0:27: +0:31
+      let mut _2: isize;                   // in scope 0 at $DIR/76803_regression.rs:+2:9: +2:16
   
       bb0: {
-          _2 = discriminant(_1);           // scope 0 at $DIR/76803_regression.rs:11:11: 11:12
-          switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/76803_regression.rs:11:5: 11:12
+          _2 = discriminant(_1);           // scope 0 at $DIR/76803_regression.rs:+1:11: +1:12
+          switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/76803_regression.rs:+1:5: +1:12
       }
   
       bb1: {
-          _0 = move _1;                    // scope 0 at $DIR/76803_regression.rs:13:14: 13:15
-          goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:13:14: 13:15
+          _0 = move _1;                    // scope 0 at $DIR/76803_regression.rs:+3:14: +3:15
+          goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:+3:14: +3:15
       }
   
       bb2: {
-          Deinit(_0);                      // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
-          discriminant(_0) = 1;            // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
-          goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
+          Deinit(_0);                      // scope 0 at $DIR/76803_regression.rs:+2:20: +2:27
+          discriminant(_0) = 1;            // scope 0 at $DIR/76803_regression.rs:+2:20: +2:27
+          goto -> bb3;                     // scope 0 at $DIR/76803_regression.rs:+2:20: +2:27
       }
   
       bb3: {
-          return;                          // scope 0 at $DIR/76803_regression.rs:15:2: 15:2
+          return;                          // scope 0 at $DIR/76803_regression.rs:+5:2: +5:2
       }
   }