FileCheck inline_scopes_parenting

This commit is contained in:
Ryan Mehri 2023-10-20 21:57:08 -07:00
parent 773dc62756
commit bb695977de
2 changed files with 8 additions and 4 deletions

View File

@ -2,8 +2,8 @@
fn main() -> () { fn main() -> () {
let mut _0: (); let mut _0: ();
let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:6:13: 6:16}; let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:10:13: 10:16};
let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:6:13: 6:16}; let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:10:13: 10:16};
let mut _3: ((),); let mut _3: ((),);
let mut _4: (); let mut _4: ();
let mut _5: (); let mut _5: ();
@ -19,7 +19,7 @@ fn main() -> () {
bb0: { bb0: {
StorageLive(_1); StorageLive(_1);
_1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:6:13: 6:16}; _1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:10:13: 10:16};
StorageLive(_2); StorageLive(_2);
_2 = &_1; _2 = &_1;
StorageLive(_3); StorageLive(_3);

View File

@ -1,8 +1,12 @@
// skip-filecheck
// Tests that MIR inliner can handle `SourceScopeData` parenting correctly. (#76997) // Tests that MIR inliner can handle `SourceScopeData` parenting correctly. (#76997)
// EMIT_MIR issue_76997_inline_scopes_parenting.main.Inline.after.mir // EMIT_MIR issue_76997_inline_scopes_parenting.main.Inline.after.mir
fn main() { fn main() {
// CHECK-LABEL: fn main(
// CHECK: scope 2
// CHECK-NEXT: debug x
// CHECK-NEXT: scope 3
// CHECK-NEXT: debug y
let f = |x| { let y = x; y }; let f = |x| { let y = x; y };
f(()) f(())
} }