2020-04-04 12:15:01 -05:00
|
|
|
// MIR for `foo` after Inline
|
|
|
|
|
|
|
|
fn foo(_1: T, _2: &i32) -> i32 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug _t => _1;
|
|
|
|
debug q => _2;
|
|
|
|
let mut _0: i32;
|
|
|
|
let _3: [closure@foo<T>::{closure#0}];
|
|
|
|
let mut _4: &[closure@foo<T>::{closure#0}];
|
|
|
|
let mut _5: (&i32, &i32);
|
|
|
|
let mut _6: &i32;
|
|
|
|
let mut _7: &i32;
|
|
|
|
let mut _8: &i32;
|
|
|
|
let mut _9: &i32;
|
2020-04-04 12:15:01 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _3;
|
|
|
|
scope 2 (inlined foo::<T>::{closure#0}) {
|
|
|
|
debug r => _8;
|
|
|
|
debug _s => _9;
|
2020-09-20 23:13:34 -05:00
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug variable => _8;
|
2020-09-20 23:13:34 -05:00
|
|
|
}
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_3);
|
|
|
|
_3 = [closure@foo::<T>::{closure#0}];
|
|
|
|
StorageLive(_4);
|
|
|
|
_4 = &_3;
|
|
|
|
StorageLive(_5);
|
|
|
|
StorageLive(_6);
|
|
|
|
_6 = &(*_2);
|
|
|
|
StorageLive(_7);
|
|
|
|
_7 = &(*_2);
|
|
|
|
_5 = (move _6, move _7);
|
|
|
|
StorageLive(_8);
|
|
|
|
_8 = move (_5.0: &i32);
|
|
|
|
StorageLive(_9);
|
|
|
|
_9 = move (_5.1: &i32);
|
|
|
|
_0 = (*_8);
|
|
|
|
StorageDead(_9);
|
|
|
|
StorageDead(_8);
|
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
StorageDead(_5);
|
|
|
|
StorageDead(_4);
|
|
|
|
StorageDead(_3);
|
|
|
|
return;
|
2020-04-04 12:15:01 -05:00
|
|
|
}
|
|
|
|
}
|