2020-04-04 12:15:01 -05:00
|
|
|
// MIR for `foo` after Inline
|
|
|
|
|
|
|
|
fn foo(_1: T, _2: i32) -> (i32, T) {
|
|
|
|
debug t => _1; // in scope 0 at $DIR/inline-closure-captures.rs:10:17: 10:18
|
|
|
|
debug q => _2; // in scope 0 at $DIR/inline-closure-captures.rs:10:23: 10:24
|
|
|
|
let mut _0: (i32, T); // return place in scope 0 at $DIR/inline-closure-captures.rs:10:34: 10:42
|
2020-09-08 09:43:06 -05:00
|
|
|
let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10
|
2020-04-04 12:15:01 -05:00
|
|
|
let mut _4: &i32; // in scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
|
|
|
let mut _5: &T; // in scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
2020-09-08 09:43:06 -05:00
|
|
|
let mut _6: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:6
|
2020-04-04 12:15:01 -05:00
|
|
|
let mut _7: (i32,); // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
|
|
|
let mut _8: i32; // in scope 0 at $DIR/inline-closure-captures.rs:12:7: 12:8
|
2020-09-12 07:58:46 -05:00
|
|
|
let mut _10: i32; // in scope 0 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
2020-04-04 12:15:01 -05:00
|
|
|
scope 1 {
|
|
|
|
debug x => _3; // in scope 1 at $DIR/inline-closure-captures.rs:11:9: 11:10
|
|
|
|
scope 2 {
|
2020-09-12 07:58:46 -05:00
|
|
|
debug _q => _10; // in scope 2 at $DIR/inline-closure-captures.rs:11:14: 11:16
|
2020-04-04 12:15:01 -05:00
|
|
|
debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:10:23: 10:24
|
|
|
|
debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:10:17: 10:18
|
2020-09-12 07:58:46 -05:00
|
|
|
let mut _9: T; // in scope 2 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageLive(_3); // scope 0 at $DIR/inline-closure-captures.rs:11:9: 11:10
|
|
|
|
StorageLive(_4); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
|
|
|
_4 = &_2; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
|
|
|
StorageLive(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
|
|
|
_5 = &_1; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
2020-05-17 08:39:35 -05:00
|
|
|
(_3.0: &i32) = move _4; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
|
|
|
(_3.1: &T) = move _5; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageDead(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
|
|
|
|
StorageDead(_4); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
|
|
|
|
StorageLive(_6); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6
|
|
|
|
_6 = &_3; // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:6
|
|
|
|
StorageLive(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
|
|
|
StorageLive(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
|
|
|
|
_8 = _2; // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
|
2020-05-17 08:39:35 -05:00
|
|
|
(_7.0: i32) = move _8; // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
2020-09-12 07:58:46 -05:00
|
|
|
StorageLive(_10); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
|
|
|
_10 = move (_7.0: i32); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
|
|
|
(_0.0: i32) = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20
|
|
|
|
StorageLive(_9); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23
|
|
|
|
_9 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23
|
|
|
|
(_0.1: T) = move _9; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageDead(_9); // scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24
|
2020-09-12 07:58:46 -05:00
|
|
|
StorageDead(_10); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
|
2020-04-25 04:01:43 -05:00
|
|
|
StorageDead(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9
|
|
|
|
StorageDead(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9
|
|
|
|
StorageDead(_6); // scope 1 at $DIR/inline-closure-captures.rs:12:8: 12:9
|
|
|
|
StorageDead(_3); // scope 0 at $DIR/inline-closure-captures.rs:13:1: 13:2
|
|
|
|
return; // scope 0 at $DIR/inline-closure-captures.rs:13:2: 13:2
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
}
|