summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/reify_fn_ptr.rs
blob: 33fdd4142c13f2311ec150eeb1d00c644daa5d94 (plain)
1
2
3
4
5
6
7
8
9
10
// unit-test: ConstProp
// EMIT_MIR reify_fn_ptr.main.ConstProp.diff

fn main() {
    // CHECK-LABEL: fn main(
    // CHECK: [[ptr:_.*]] = main as fn() (PointerCoercion(ReifyFnPointer));
    // CHECK: [[addr:_.*]] = move [[ptr]] as usize (PointerExposeAddress);
    // CHECK: [[back:_.*]] = move [[addr]] as *const fn() (PointerFromExposedAddress);
    let _ = main as usize as *const fn();
}