2023-05-10 11:06:41 -05:00
|
|
|
- // MIR for `unique_with_copies` before ReferencePropagation
|
|
|
|
+ // MIR for `unique_with_copies` after ReferencePropagation
|
|
|
|
|
|
|
|
fn unique_with_copies() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let _1: *mut i32;
|
|
|
|
let mut _2: i32;
|
|
|
|
let _4: ();
|
|
|
|
let mut _5: i32;
|
|
|
|
let _6: ();
|
|
|
|
let mut _7: i32;
|
2023-05-10 11:06:41 -05:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
- debug y => _1;
|
|
|
|
+ debug y => _3;
|
2023-05-10 11:06:41 -05:00
|
|
|
scope 5 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug a => _2;
|
|
|
|
let _3: *mut i32;
|
2023-05-10 11:06:41 -05:00
|
|
|
scope 3 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _3;
|
2023-05-10 11:06:41 -05:00
|
|
|
scope 4 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
- StorageLive(_1);
|
|
|
|
StorageLive(_2);
|
|
|
|
_2 = const 0_i32;
|
|
|
|
- StorageLive(_3);
|
|
|
|
_3 = &raw mut _2;
|
|
|
|
StorageLive(_4);
|
|
|
|
StorageLive(_5);
|
|
|
|
_5 = (*_3);
|
|
|
|
_4 = opaque::<i32>(move _5) -> bb1;
|
2023-05-10 11:06:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_5);
|
|
|
|
StorageDead(_4);
|
|
|
|
- _1 = _3;
|
|
|
|
- StorageDead(_3);
|
|
|
|
StorageDead(_2);
|
|
|
|
StorageLive(_6);
|
|
|
|
StorageLive(_7);
|
|
|
|
- _7 = (*_1);
|
|
|
|
+ _7 = (*_3);
|
|
|
|
_6 = opaque::<i32>(move _7) -> bb2;
|
2023-05-10 11:06:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_7);
|
|
|
|
StorageDead(_6);
|
|
|
|
_0 = const ();
|
|
|
|
- StorageDead(_1);
|
|
|
|
return;
|
2023-05-10 11:06:41 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|