2beabbbf6f
It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum.
26 lines
515 B
Rust
26 lines
515 B
Rust
// MIR for `test2` after Inline
|
|
|
|
fn test2(_1: &dyn X) -> bool {
|
|
debug x => _1;
|
|
let mut _0: bool;
|
|
let mut _2: &dyn X;
|
|
let mut _3: &dyn X;
|
|
scope 1 (inlined test) {
|
|
debug x => _2;
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_2);
|
|
StorageLive(_3);
|
|
_3 = &(*_1);
|
|
_2 = move _3 as &dyn X (PointerCoercion(Unsize));
|
|
StorageDead(_3);
|
|
_0 = <dyn X as X>::y(_2) -> [return: bb1, unwind unreachable];
|
|
}
|
|
|
|
bb1: {
|
|
StorageDead(_2);
|
|
return;
|
|
}
|
|
}
|