]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
Auto merge of #99863 - Dylan-DPC:rollup-lq9w047, r=Dylan-DPC
[rust.git] / src / test / mir-opt / const_prop / reify_fn_ptr.main.ConstProp.diff
1 - // MIR for `main` before ConstProp
2 + // MIR for `main` after ConstProp
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +0:11
6       let mut _1: *const fn();             // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
7       let mut _2: usize;                   // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
8       let mut _3: fn();                    // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
9       scope 1 {
10       }
11   
12       bb0: {
13           StorageLive(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
14           StorageLive(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
15           StorageLive(_3);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
16           _3 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
17                                            // mir::Constant
18                                            // + span: $DIR/reify_fn_ptr.rs:4:13: 4:17
19                                            // + literal: Const { ty: fn() {main}, val: Value(<ZST>) }
20           _2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
21           StorageDead(_3);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:25: +1:26
22           _1 = move _2 as *const fn() (PointerFromExposedAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
23           StorageDead(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:40: +1:41
24           StorageDead(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:41: +1:42
25           nop;                             // scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +2:2
26           return;                          // scope 0 at $DIR/reify_fn_ptr.rs:+2:2: +2:2
27       }
28   }
29