2023-10-16 17:36:39 +00:00
|
|
|
// skip-filecheck
|
2024-04-11 13:15:34 +00:00
|
|
|
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
|
2019-03-03 19:27:41 +00:00
|
|
|
|
2023-06-08 07:18:34 +00:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2020-03-25 21:07:41 +00:00
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
// Regression test for #58892, coroutine drop shims should not have blocks
|
2019-03-03 19:27:41 +00:00
|
|
|
// spuriously marked as cleanup
|
|
|
|
|
2023-10-19 21:46:28 +00:00
|
|
|
// EMIT_MIR coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.mir
|
2019-03-03 19:27:41 +00:00
|
|
|
fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
let gen = #[coroutine]
|
|
|
|
|| {
|
2020-03-15 01:28:48 +00:00
|
|
|
let _s = String::new();
|
2019-03-03 19:27:41 +00:00
|
|
|
yield;
|
|
|
|
};
|
|
|
|
}
|