summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff')
-rw-r--r--tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff b/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
new file mode 100644
index 000000000..15c93f270
--- /dev/null
+++ b/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
@@ -0,0 +1,24 @@
+- // MIR for `main` before ConstProp
++ // MIR for `main` after ConstProp
+
+ fn main() -> () {
+ let mut _0: (); // return place in scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +0:11
+ let mut _1: usize; // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
+ let mut _2: fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
+ scope 1 {
+ }
+
+ bb0: {
+ StorageLive(_1); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
+ StorageLive(_2); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
+ _2 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
+ // mir::Constant
+ // + span: $DIR/reify_fn_ptr.rs:4:13: 4:17
+ // + literal: Const { ty: fn() {main}, val: Value(<ZST>) }
+ _1 = move _2 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
+ StorageDead(_2); // scope 0 at $DIR/reify_fn_ptr.rs:+1:25: +1:26
+ StorageDead(_1); // scope 0 at $DIR/reify_fn_ptr.rs:+1:40: +1:41
+ return; // scope 0 at $DIR/reify_fn_ptr.rs:+2:2: +2:2
+ }
+ }
+