2020-09-20 23:13:34 -05:00
|
|
|
// Tests that MIR inliner can handle `SourceScopeData` parenting correctly. (#76997)
|
|
|
|
|
|
|
|
// EMIT_MIR issue_76997_inline_scopes_parenting.main.Inline.after.mir
|
|
|
|
fn main() {
|
2023-10-20 23:57:08 -05:00
|
|
|
// CHECK-LABEL: fn main(
|
2023-10-22 11:27:43 -05:00
|
|
|
// CHECK: scope 1 {
|
|
|
|
// CHECK-NEXT: debug f
|
|
|
|
// CHECK-NEXT: scope 2 (inlined main::{closure#0}) {
|
2023-10-20 23:57:08 -05:00
|
|
|
// CHECK-NEXT: debug x
|
2023-10-22 11:27:43 -05:00
|
|
|
// CHECK-NEXT: scope 3 {
|
2023-10-20 23:57:08 -05:00
|
|
|
// CHECK-NEXT: debug y
|
2023-10-22 11:27:43 -05:00
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK-NEXT: }
|
2020-09-20 23:13:34 -05:00
|
|
|
let f = |x| { let y = x; y };
|
|
|
|
f(())
|
|
|
|
}
|