]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/reify_fn_ptr.rs
Rollup merge of #61532 - wesleywiser:const_prop_more, r=oli-obk
[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(1).0x0) : fn();
20 //      _2 = move _3 as usize (Misc);
21 //      ...
22 //      _1 = const Scalar(AllocId(1).0x0) : *const fn();
23 //      ...
24 //  }
25 // END rustc.main.ConstProp.after.mir