about summary refs log tree commit diff
path: root/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
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/while_storage.while_loop.PreCodegen.after.mir
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/while_storage.while_loop.PreCodegen.after.mir')
-rw-r--r--src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
index f1c5d95df19..a5e7d6afdf3 100644
--- a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
+++ b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
@@ -1,56 +1,56 @@
 // MIR for `while_loop` after PreCodegen
 
 fn while_loop(_1: bool) -> () {
-    debug c => _1;                       // in scope 0 at $DIR/while-storage.rs:9:15: 9:16
-    let mut _0: ();                      // return place in scope 0 at $DIR/while-storage.rs:9:24: 9:24
-    let mut _2: bool;                    // in scope 0 at $DIR/while-storage.rs:10:11: 10:22
-    let mut _3: bool;                    // in scope 0 at $DIR/while-storage.rs:10:20: 10:21
-    let mut _4: bool;                    // in scope 0 at $DIR/while-storage.rs:11:12: 11:23
-    let mut _5: bool;                    // in scope 0 at $DIR/while-storage.rs:11:21: 11:22
+    debug c => _1;                       // in scope 0 at $DIR/while-storage.rs:+0:15: +0:16
+    let mut _0: ();                      // return place in scope 0 at $DIR/while-storage.rs:+0:24: +0:24
+    let mut _2: bool;                    // in scope 0 at $DIR/while-storage.rs:+1:11: +1:22
+    let mut _3: bool;                    // in scope 0 at $DIR/while-storage.rs:+1:20: +1:21
+    let mut _4: bool;                    // in scope 0 at $DIR/while-storage.rs:+2:12: +2:23
+    let mut _5: bool;                    // in scope 0 at $DIR/while-storage.rs:+2:21: +2:22
 
     bb0: {
-        goto -> bb1;                     // scope 0 at $DIR/while-storage.rs:10:5: 14:6
+        goto -> bb1;                     // scope 0 at $DIR/while-storage.rs:+1:5: +5:6
     }
 
     bb1: {
-        StorageLive(_2);                 // scope 0 at $DIR/while-storage.rs:10:11: 10:22
-        StorageLive(_3);                 // scope 0 at $DIR/while-storage.rs:10:20: 10:21
-        _3 = _1;                         // scope 0 at $DIR/while-storage.rs:10:20: 10:21
-        _2 = get_bool(move _3) -> bb2;   // scope 0 at $DIR/while-storage.rs:10:11: 10:22
+        StorageLive(_2);                 // scope 0 at $DIR/while-storage.rs:+1:11: +1:22
+        StorageLive(_3);                 // scope 0 at $DIR/while-storage.rs:+1:20: +1:21
+        _3 = _1;                         // scope 0 at $DIR/while-storage.rs:+1:20: +1:21
+        _2 = get_bool(move _3) -> bb2;   // scope 0 at $DIR/while-storage.rs:+1:11: +1:22
                                          // mir::Constant
                                          // + span: $DIR/while-storage.rs:10:11: 10:19
                                          // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 0 at $DIR/while-storage.rs:10:21: 10:22
-        switchInt(move _2) -> [false: bb7, otherwise: bb3]; // scope 0 at $DIR/while-storage.rs:10:11: 10:22
+        StorageDead(_3);                 // scope 0 at $DIR/while-storage.rs:+1:21: +1:22
+        switchInt(move _2) -> [false: bb7, otherwise: bb3]; // scope 0 at $DIR/while-storage.rs:+1:11: +1:22
     }
 
     bb3: {
-        StorageLive(_4);                 // scope 0 at $DIR/while-storage.rs:11:12: 11:23
-        StorageLive(_5);                 // scope 0 at $DIR/while-storage.rs:11:21: 11:22
-        _5 = _1;                         // scope 0 at $DIR/while-storage.rs:11:21: 11:22
-        _4 = get_bool(move _5) -> bb4;   // scope 0 at $DIR/while-storage.rs:11:12: 11:23
+        StorageLive(_4);                 // scope 0 at $DIR/while-storage.rs:+2:12: +2:23
+        StorageLive(_5);                 // scope 0 at $DIR/while-storage.rs:+2:21: +2:22
+        _5 = _1;                         // scope 0 at $DIR/while-storage.rs:+2:21: +2:22
+        _4 = get_bool(move _5) -> bb4;   // scope 0 at $DIR/while-storage.rs:+2:12: +2:23
                                          // mir::Constant
                                          // + span: $DIR/while-storage.rs:11:12: 11:20
                                          // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
     }
 
     bb4: {
-        StorageDead(_5);                 // scope 0 at $DIR/while-storage.rs:11:22: 11:23
-        switchInt(move _4) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/while-storage.rs:11:12: 11:23
+        StorageDead(_5);                 // scope 0 at $DIR/while-storage.rs:+2:22: +2:23
+        switchInt(move _4) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/while-storage.rs:+2:12: +2:23
     }
 
     bb5: {
-        StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:13:9: 13:10
+        StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:+4:9: +4:10
         goto -> bb8;                     // scope 0 at no-location
     }
 
     bb6: {
-        StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:13:9: 13:10
-        StorageDead(_2);                 // scope 0 at $DIR/while-storage.rs:14:5: 14:6
-        goto -> bb1;                     // scope 0 at $DIR/while-storage.rs:10:5: 14:6
+        StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:+4:9: +4:10
+        StorageDead(_2);                 // scope 0 at $DIR/while-storage.rs:+5:5: +5:6
+        goto -> bb1;                     // scope 0 at $DIR/while-storage.rs:+1:5: +5:6
     }
 
     bb7: {
@@ -58,7 +58,7 @@ fn while_loop(_1: bool) -> () {
     }
 
     bb8: {
-        StorageDead(_2);                 // scope 0 at $DIR/while-storage.rs:14:5: 14:6
-        return;                          // scope 0 at $DIR/while-storage.rs:15:2: 15:2
+        StorageDead(_2);                 // scope 0 at $DIR/while-storage.rs:+5:5: +5:6
+        return;                          // scope 0 at $DIR/while-storage.rs:+6:2: +6:2
     }
 }