]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/reify_fn_ptr.rs
[const-prop] Replace `Cast` handling with use of `InterpCx`
[rust.git] / src / test / mir-opt / const_prop / reify_fn_ptr.rs
1 fn main() {
2     let _ = main as usize as *const fn();
3 }
4
5 // END RUST SOURCE
6 // START rustc.main.ConstProp.before.mir
7 //  bb0: {
8 //      ...
9 //      _3 = const main as fn() (Pointer(ReifyFnPointer));
10 //      _2 = move _3 as usize (Misc);
11 //      ...
12 //      _1 = move _2 as *const fn() (Misc);
13 //      ...
14 //  }
15 // END rustc.main.ConstProp.before.mir
16 // START rustc.main.ConstProp.after.mir
17 //  bb0: {
18 //      ...
19 //      _3 = const Scalar(AllocId(0).0x0) : fn();
20 //      _2 = move _3 as usize (Misc);
21 //      ...
22 //      _1 = move _2 as *const fn() (Misc);
23 //      ...
24 //  }
25 // END rustc.main.ConstProp.after.mir