mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
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.
27 lines
644 B
Diff
27 lines
644 B
Diff
- // MIR for `main` before ConstProp
|
|
+ // MIR for `main` after ConstProp
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let mut _1: *const fn();
|
|
let mut _2: usize;
|
|
let mut _3: fn();
|
|
scope 1 {
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1);
|
|
StorageLive(_2);
|
|
StorageLive(_3);
|
|
_3 = main as fn() (PointerCoercion(ReifyFnPointer));
|
|
_2 = move _3 as usize (PointerExposeAddress);
|
|
StorageDead(_3);
|
|
_1 = move _2 as *const fn() (PointerFromExposedAddress);
|
|
StorageDead(_2);
|
|
StorageDead(_1);
|
|
_0 = const ();
|
|
return;
|
|
}
|
|
}
|
|
|