]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
Rollup merge of #83368 - jyn514:download-if-unchanged, r=Mark-Simulacrum
[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:3:11: 3:11
6       let mut _1: *const fn();             // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
7       let mut _2: usize;                   // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
8       let mut _3: fn();                    // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
9       scope 1 {
10       }
11   
12       bb0: {
13           StorageLive(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
14           StorageLive(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
15           StorageLive(_3);                 // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
16           _3 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
17                                            // mir::Constant
18                                            // + span: $DIR/reify_fn_ptr.rs:4:13: 4:17
19                                            // + literal: Const { ty: fn() {main}, val: Value(Scalar(<ZST>)) }
20           _2 = move _3 as usize (Misc);    // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
21           StorageDead(_3);                 // scope 0 at $DIR/reify_fn_ptr.rs:4:25: 4:26
22           _1 = move _2 as *const fn() (Misc); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
23           StorageDead(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:4:40: 4:41
24           StorageDead(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:4:41: 4:42
25           nop;                             // scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2
26           return;                          // scope 0 at $DIR/reify_fn_ptr.rs:5:2: 5:2
27       }
28   }
29