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