summary refs log tree commit diff
path: root/tests/mir-opt/coroutine_drop_cleanup.rs
blob: 4ae97273cd90ac15167ee7700b3daedaee405787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// skip-filecheck
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

// Regression test for #58892, coroutine drop shims should not have blocks
// spuriously marked as cleanup

// EMIT_MIR coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.mir
fn main() {
    let gen_ = #[coroutine]
    || {
        let _s = String::new();
        yield;
    };
}