2023-03-05 12:06:55 -06:00
|
|
|
- // MIR for `ref_copies` before ScalarReplacementOfAggregates
|
|
|
|
+ // MIR for `ref_copies` after ScalarReplacementOfAggregates
|
|
|
|
|
|
|
|
fn ref_copies(_1: &Foo) -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _1;
|
|
|
|
let mut _0: ();
|
|
|
|
let _2: Foo;
|
|
|
|
+ let _5: u8;
|
|
|
|
+ let _6: ();
|
|
|
|
+ let _7: &str;
|
|
|
|
+ let _8: std::option::Option<isize>;
|
2023-03-05 12:06:55 -06:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
- debug y => _2;
|
2023-08-26 11:58:42 -05:00
|
|
|
+ debug ((y: Foo).0: u8) => _5;
|
|
|
|
+ debug ((y: Foo).1: ()) => _6;
|
|
|
|
+ debug ((y: Foo).2: &str) => _7;
|
|
|
|
+ debug ((y: Foo).3: std::option::Option<isize>) => _8;
|
2023-06-06 08:47:00 -05:00
|
|
|
let _3: u8;
|
2023-03-05 12:06:55 -06:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug t => _3;
|
|
|
|
let _4: &str;
|
2023-03-05 12:06:55 -06:00
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug u => _4;
|
2023-03-05 12:06:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageLive(_2);
|
|
|
|
- _2 = (*_1);
|
|
|
|
+ StorageLive(_5);
|
|
|
|
+ StorageLive(_6);
|
|
|
|
+ StorageLive(_7);
|
|
|
|
+ StorageLive(_8);
|
|
|
|
+ nop;
|
|
|
|
+ _5 = ((*_1).0: u8);
|
|
|
|
+ _6 = ((*_1).1: ());
|
|
|
|
+ _7 = ((*_1).2: &str);
|
|
|
|
+ _8 = ((*_1).3: std::option::Option<isize>);
|
|
|
|
+ nop;
|
|
|
|
StorageLive(_3);
|
|
|
|
- _3 = (_2.0: u8);
|
|
|
|
+ _3 = _5;
|
|
|
|
StorageLive(_4);
|
|
|
|
- _4 = (_2.2: &str);
|
|
|
|
+ _4 = _7;
|
|
|
|
_0 = const ();
|
|
|
|
StorageDead(_4);
|
|
|
|
StorageDead(_3);
|
|
|
|
- StorageDead(_2);
|
|
|
|
+ StorageDead(_5);
|
|
|
|
+ StorageDead(_6);
|
|
|
|
+ StorageDead(_7);
|
|
|
|
+ StorageDead(_8);
|
|
|
|
+ nop;
|
|
|
|
return;
|
2023-03-05 12:06:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|