os-rust/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
554 B
Rust
Raw Normal View History

//@ compile-flags: -C debuginfo=full
// 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 21:57:08 -07:00
// CHECK-LABEL: fn main(
2023-10-22 09:27:43 -07:00
// CHECK: scope 1 {
// CHECK-NEXT: debug f
// CHECK-NEXT: scope 2 (inlined main::{closure#0}) {
2023-10-20 21:57:08 -07:00
// CHECK-NEXT: debug x
2023-10-22 09:27:43 -07:00
// CHECK-NEXT: scope 3 {
2023-10-20 21:57:08 -07:00
// CHECK-NEXT: debug y
2023-10-22 09:27:43 -07:00
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: }
let f = |x| {
let y = x;
y
};
f(())
}