summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/inline/cycle.f.Inline.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/mir-opt/inline/cycle.f.Inline.diff
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/inline/cycle.f.Inline.diff')
-rw-r--r--tests/mir-opt/inline/cycle.f.Inline.diff43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/mir-opt/inline/cycle.f.Inline.diff b/tests/mir-opt/inline/cycle.f.Inline.diff
new file mode 100644
index 000000000..75ea69a42
--- /dev/null
+++ b/tests/mir-opt/inline/cycle.f.Inline.diff
@@ -0,0 +1,43 @@
+- // MIR for `f` before Inline
++ // MIR for `f` after Inline
+
+ fn f(_1: impl Fn()) -> () {
+ debug g => _1; // in scope 0 at $DIR/cycle.rs:+0:6: +0:7
+ let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:+0:20: +0:20
+ let _2: (); // in scope 0 at $DIR/cycle.rs:+1:5: +1:8
+ let mut _3: &impl Fn(); // in scope 0 at $DIR/cycle.rs:+1:5: +1:6
+ let mut _4: (); // in scope 0 at $DIR/cycle.rs:+1:5: +1:8
+
+ bb0: {
+ StorageLive(_2); // scope 0 at $DIR/cycle.rs:+1:5: +1:8
+ StorageLive(_3); // scope 0 at $DIR/cycle.rs:+1:5: +1:6
+ _3 = &_1; // scope 0 at $DIR/cycle.rs:+1:5: +1:6
+ StorageLive(_4); // scope 0 at $DIR/cycle.rs:+1:5: +1:8
+ Deinit(_4); // scope 0 at $DIR/cycle.rs:+1:5: +1:8
+ _2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:+1:5: +1:8
+ // mir::Constant
+ // + span: $DIR/cycle.rs:6:5: 6:6
+ // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
+ }
+
+ bb1: {
+ StorageDead(_4); // scope 0 at $DIR/cycle.rs:+1:7: +1:8
+ StorageDead(_3); // scope 0 at $DIR/cycle.rs:+1:7: +1:8
+ StorageDead(_2); // scope 0 at $DIR/cycle.rs:+1:8: +1:9
+ _0 = const (); // scope 0 at $DIR/cycle.rs:+0:20: +2:2
+ drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/cycle.rs:+2:1: +2:2
+ }
+
+ bb2: {
+ return; // scope 0 at $DIR/cycle.rs:+2:2: +2:2
+ }
+
+ bb3 (cleanup): {
+ drop(_1) -> bb4; // scope 0 at $DIR/cycle.rs:+2:1: +2:2
+ }
+
+ bb4 (cleanup): {
+ resume; // scope 0 at $DIR/cycle.rs:+0:1: +2:2
+ }
+ }
+