-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
331 changed files
with
9,912 additions
and
9,912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
482 changes: 241 additions & 241 deletions
482
src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
Large diffs are not rendered by default.
Oops, something went wrong.
68 changes: 34 additions & 34 deletions
68
src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
// MIR for `borrow_and_cast` after SimplifyCfg-initial | ||
|
||
fn borrow_and_cast(_1: i32) -> () { | ||
debug x => _1; // in scope 0 at $DIR/address-of.rs:41:20: 41:25 | ||
let mut _0: (); // return place in scope 0 at $DIR/address-of.rs:41:32: 41:32 | ||
let _2: *const i32; // in scope 0 at $DIR/address-of.rs:42:9: 42:10 | ||
let _3: &i32; // in scope 0 at $DIR/address-of.rs:42:13: 42:15 | ||
let _5: &mut i32; // in scope 0 at $DIR/address-of.rs:43:13: 43:19 | ||
let mut _7: &mut i32; // in scope 0 at $DIR/address-of.rs:44:13: 44:19 | ||
debug x => _1; // in scope 0 at $DIR/address-of.rs:+0:20: +0:25 | ||
let mut _0: (); // return place in scope 0 at $DIR/address-of.rs:+0:32: +0:32 | ||
let _2: *const i32; // in scope 0 at $DIR/address-of.rs:+1:9: +1:10 | ||
let _3: &i32; // in scope 0 at $DIR/address-of.rs:+1:13: +1:15 | ||
let _5: &mut i32; // in scope 0 at $DIR/address-of.rs:+2:13: +2:19 | ||
let mut _7: &mut i32; // in scope 0 at $DIR/address-of.rs:+3:13: +3:19 | ||
scope 1 { | ||
debug p => _2; // in scope 1 at $DIR/address-of.rs:42:9: 42:10 | ||
let _4: *const i32; // in scope 1 at $DIR/address-of.rs:43:9: 43:10 | ||
debug p => _2; // in scope 1 at $DIR/address-of.rs:+1:9: +1:10 | ||
let _4: *const i32; // in scope 1 at $DIR/address-of.rs:+2:9: +2:10 | ||
scope 2 { | ||
debug q => _4; // in scope 2 at $DIR/address-of.rs:43:9: 43:10 | ||
let _6: *mut i32; // in scope 2 at $DIR/address-of.rs:44:9: 44:10 | ||
debug q => _4; // in scope 2 at $DIR/address-of.rs:+2:9: +2:10 | ||
let _6: *mut i32; // in scope 2 at $DIR/address-of.rs:+3:9: +3:10 | ||
scope 3 { | ||
debug r => _6; // in scope 3 at $DIR/address-of.rs:44:9: 44:10 | ||
debug r => _6; // in scope 3 at $DIR/address-of.rs:+3:9: +3:10 | ||
} | ||
} | ||
} | ||
|
||
bb0: { | ||
StorageLive(_2); // scope 0 at $DIR/address-of.rs:42:9: 42:10 | ||
StorageLive(_3); // scope 0 at $DIR/address-of.rs:42:13: 42:15 | ||
_3 = &_1; // scope 0 at $DIR/address-of.rs:42:13: 42:15 | ||
_2 = &raw const (*_3); // scope 0 at $DIR/address-of.rs:42:13: 42:15 | ||
FakeRead(ForLet(None), _2); // scope 0 at $DIR/address-of.rs:42:9: 42:10 | ||
StorageDead(_3); // scope 0 at $DIR/address-of.rs:42:29: 42:30 | ||
StorageLive(_4); // scope 1 at $DIR/address-of.rs:43:9: 43:10 | ||
StorageLive(_5); // scope 1 at $DIR/address-of.rs:43:13: 43:19 | ||
_5 = &mut _1; // scope 1 at $DIR/address-of.rs:43:13: 43:19 | ||
_4 = &raw const (*_5); // scope 1 at $DIR/address-of.rs:43:13: 43:19 | ||
FakeRead(ForLet(None), _4); // scope 1 at $DIR/address-of.rs:43:9: 43:10 | ||
StorageDead(_5); // scope 1 at $DIR/address-of.rs:43:33: 43:34 | ||
StorageLive(_6); // scope 2 at $DIR/address-of.rs:44:9: 44:10 | ||
StorageLive(_7); // scope 2 at $DIR/address-of.rs:44:13: 44:19 | ||
_7 = &mut _1; // scope 2 at $DIR/address-of.rs:44:13: 44:19 | ||
_6 = &raw mut (*_7); // scope 2 at $DIR/address-of.rs:44:13: 44:19 | ||
FakeRead(ForLet(None), _6); // scope 2 at $DIR/address-of.rs:44:9: 44:10 | ||
StorageDead(_7); // scope 2 at $DIR/address-of.rs:44:31: 44:32 | ||
_0 = const (); // scope 0 at $DIR/address-of.rs:41:32: 45:2 | ||
StorageDead(_6); // scope 2 at $DIR/address-of.rs:45:1: 45:2 | ||
StorageDead(_4); // scope 1 at $DIR/address-of.rs:45:1: 45:2 | ||
StorageDead(_2); // scope 0 at $DIR/address-of.rs:45:1: 45:2 | ||
return; // scope 0 at $DIR/address-of.rs:45:2: 45:2 | ||
StorageLive(_2); // scope 0 at $DIR/address-of.rs:+1:9: +1:10 | ||
StorageLive(_3); // scope 0 at $DIR/address-of.rs:+1:13: +1:15 | ||
_3 = &_1; // scope 0 at $DIR/address-of.rs:+1:13: +1:15 | ||
_2 = &raw const (*_3); // scope 0 at $DIR/address-of.rs:+1:13: +1:15 | ||
FakeRead(ForLet(None), _2); // scope 0 at $DIR/address-of.rs:+1:9: +1:10 | ||
StorageDead(_3); // scope 0 at $DIR/address-of.rs:+1:29: +1:30 | ||
StorageLive(_4); // scope 1 at $DIR/address-of.rs:+2:9: +2:10 | ||
StorageLive(_5); // scope 1 at $DIR/address-of.rs:+2:13: +2:19 | ||
_5 = &mut _1; // scope 1 at $DIR/address-of.rs:+2:13: +2:19 | ||
_4 = &raw const (*_5); // scope 1 at $DIR/address-of.rs:+2:13: +2:19 | ||
FakeRead(ForLet(None), _4); // scope 1 at $DIR/address-of.rs:+2:9: +2:10 | ||
StorageDead(_5); // scope 1 at $DIR/address-of.rs:+2:33: +2:34 | ||
StorageLive(_6); // scope 2 at $DIR/address-of.rs:+3:9: +3:10 | ||
StorageLive(_7); // scope 2 at $DIR/address-of.rs:+3:13: +3:19 | ||
_7 = &mut _1; // scope 2 at $DIR/address-of.rs:+3:13: +3:19 | ||
_6 = &raw mut (*_7); // scope 2 at $DIR/address-of.rs:+3:13: +3:19 | ||
FakeRead(ForLet(None), _6); // scope 2 at $DIR/address-of.rs:+3:9: +3:10 | ||
StorageDead(_7); // scope 2 at $DIR/address-of.rs:+3:31: +3:32 | ||
_0 = const (); // scope 0 at $DIR/address-of.rs:+0:32: +4:2 | ||
StorageDead(_6); // scope 2 at $DIR/address-of.rs:+4:1: +4:2 | ||
StorageDead(_4); // scope 1 at $DIR/address-of.rs:+4:1: +4:2 | ||
StorageDead(_2); // scope 0 at $DIR/address-of.rs:+4:1: +4:2 | ||
return; // scope 0 at $DIR/address-of.rs:+4:2: +4:2 | ||
} | ||
} |
80 changes: 40 additions & 40 deletions
80
src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.32bit.mir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
// MIR for `main` after SimplifyCfg-elaborate-drops | ||
|
||
fn main() -> () { | ||
let mut _0: (); // return place in scope 0 at $DIR/array-index-is-temporary.rs:12:11: 12:11 | ||
let mut _1: [u32; 3]; // in scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 | ||
let mut _4: &mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:15:25: 15:31 | ||
let mut _5: u32; // in scope 0 at $DIR/array-index-is-temporary.rs:16:12: 16:29 | ||
let mut _6: *mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:25: 16:26 | ||
let _7: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:7: 16:8 | ||
let mut _8: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9 | ||
let mut _9: bool; // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9 | ||
let mut _0: (); // return place in scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +0:11 | ||
let mut _1: [u32; 3]; // in scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14 | ||
let mut _4: &mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+3:25: +3:31 | ||
let mut _5: u32; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:12: +4:29 | ||
let mut _6: *mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:25: +4:26 | ||
let _7: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:7: +4:8 | ||
let mut _8: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9 | ||
let mut _9: bool; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9 | ||
scope 1 { | ||
debug x => _1; // in scope 1 at $DIR/array-index-is-temporary.rs:13:9: 13:14 | ||
let mut _2: usize; // in scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 | ||
debug x => _1; // in scope 1 at $DIR/array-index-is-temporary.rs:+1:9: +1:14 | ||
let mut _2: usize; // in scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14 | ||
scope 2 { | ||
debug y => _2; // in scope 2 at $DIR/array-index-is-temporary.rs:14:9: 14:14 | ||
let _3: *mut usize; // in scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10 | ||
debug y => _2; // in scope 2 at $DIR/array-index-is-temporary.rs:+2:9: +2:14 | ||
let _3: *mut usize; // in scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10 | ||
scope 3 { | ||
debug z => _3; // in scope 3 at $DIR/array-index-is-temporary.rs:15:9: 15:10 | ||
debug z => _3; // in scope 3 at $DIR/array-index-is-temporary.rs:+3:9: +3:10 | ||
scope 4 { | ||
} | ||
} | ||
} | ||
} | ||
|
||
bb0: { | ||
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14 | ||
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29 | ||
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14 | ||
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18 | ||
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10 | ||
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 | ||
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 | ||
_3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31 | ||
StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32 | ||
StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29 | ||
StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 | ||
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26 | ||
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27 | ||
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14 | ||
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:+1:17: +1:29 | ||
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14 | ||
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:+2:17: +2:18 | ||
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10 | ||
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31 | ||
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31 | ||
_3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31 | ||
StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:31: +3:32 | ||
StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:+4:12: +4:29 | ||
StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26 | ||
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26 | ||
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:+4:21: +4:27 | ||
// mir::Constant | ||
// + span: $DIR/array-index-is-temporary.rs:16:21: 16:24 | ||
// + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) } | ||
} | ||
|
||
bb1: { | ||
StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27 | ||
StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 | ||
_7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8 | ||
_8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 | ||
_9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 | ||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9 | ||
StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:+4:26: +4:27 | ||
StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8 | ||
_7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8 | ||
_8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9 | ||
_9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9 | ||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9 | ||
} | ||
|
||
bb2: { | ||
_1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29 | ||
StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29 | ||
StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30 | ||
_0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2 | ||
StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2 | ||
StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2 | ||
StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2 | ||
return; // scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2 | ||
_1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:29 | ||
StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:+4:28: +4:29 | ||
StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:+4:29: +4:30 | ||
_0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +5:2 | ||
StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:+5:1: +5:2 | ||
StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:+5:1: +5:2 | ||
StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:+5:1: +5:2 | ||
return; // scope 0 at $DIR/array-index-is-temporary.rs:+5:2: +5:2 | ||
} | ||
} |
Oops, something went wrong.