diff options
| author | bors <bors@rust-lang.org> | 2022-07-28 16:22:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-28 16:22:19 +0000 |
| commit | 36f4f4aa38563d0c02bbdbbc03fb20145edef567 (patch) | |
| tree | 9ccd853d5a9097d70f30a26016de023231841a96 /src/test/mir-opt/inline/inline_shims.clone.Inline.diff | |
| parent | e5682615bb4fdb90e3a37b810a1b7bded2a1199e (diff) | |
| parent | 11c0280798da8f4d65dec25764237d2354e65273 (diff) | |
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/inline/inline_shims.clone.Inline.diff')
| -rw-r--r-- | src/test/mir-opt/inline/inline_shims.clone.Inline.diff | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff index d67b07b0181..e69af791622 100644 --- a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff +++ b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff @@ -2,16 +2,16 @@ + // MIR for `clone` after Inline fn clone(_1: fn(A, B)) -> fn(A, B) { - debug f => _1; // in scope 0 at $DIR/inline-shims.rs:5:20: 5:21 - let mut _0: fn(A, B); // return place in scope 0 at $DIR/inline-shims.rs:5:36: 5:44 - let mut _2: &fn(A, B); // in scope 0 at $DIR/inline-shims.rs:6:5: 6:14 + debug f => _1; // in scope 0 at $DIR/inline-shims.rs:+0:20: +0:21 + let mut _0: fn(A, B); // return place in scope 0 at $DIR/inline-shims.rs:+0:36: +0:44 + let mut _2: &fn(A, B); // in scope 0 at $DIR/inline-shims.rs:+1:5: +1:14 + scope 1 (inlined <fn(A, B) as Clone>::clone - shim(fn(A, B))) { // at $DIR/inline-shims.rs:6:5: 6:14 + } bb0: { - StorageLive(_2); // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 - _2 = &_1; // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 -- _0 = <fn(A, B) as Clone>::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 + StorageLive(_2); // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14 + _2 = &_1; // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14 +- _0 = <fn(A, B) as Clone>::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14 - // mir::Constant - // + span: $DIR/inline-shims.rs:6:7: 6:12 - // + literal: Const { ty: for<'r> fn(&'r fn(A, B)) -> fn(A, B) {<fn(A, B) as Clone>::clone}, val: Value(<ZST>) } @@ -19,12 +19,12 @@ - - bb1: { + _0 = (*_2); // scope 1 at $SRC_DIR/core/src/clone.rs:LL:COL - StorageDead(_2); // scope 0 at $DIR/inline-shims.rs:6:13: 6:14 - return; // scope 0 at $DIR/inline-shims.rs:7:2: 7:2 + StorageDead(_2); // scope 0 at $DIR/inline-shims.rs:+1:13: +1:14 + return; // scope 0 at $DIR/inline-shims.rs:+2:2: +2:2 + } + + bb1 (cleanup): { -+ resume; // scope 0 at $DIR/inline-shims.rs:5:1: 7:2 ++ resume; // scope 0 at $DIR/inline-shims.rs:+0:1: +2:2 } } |
