2019-03-03 19:27:41 +00:00
|
|
|
#![feature(generators, generator_trait)]
|
|
|
|
|
2020-03-25 22:07:41 +01:00
|
|
|
// ignore-wasm32-bare compiled with panic=abort by default
|
|
|
|
|
2019-03-03 19:27:41 +00:00
|
|
|
// Regression test for #58892, generator drop shims should not have blocks
|
|
|
|
// spuriously marked as cleanup
|
|
|
|
|
2020-08-31 18:11:44 +01:00
|
|
|
// EMIT_MIR generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
|
2019-03-03 19:27:41 +00:00
|
|
|
fn main() {
|
|
|
|
let gen = || {
|
2020-03-15 02:28:48 +01:00
|
|
|
let _s = String::new();
|
2019-03-03 19:27:41 +00:00
|
|
|
yield;
|
|
|
|
};
|
|
|
|
}
|