]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs
1 // issue 65419 - Attempting to run an `async fn` after completion mentions generators when it should
2 // be talking about `async fn`s instead. Regression test added to make sure generators still
3 // panic when resumed after completion.
6 // error-pattern:generator resumed after completion
8 // ignore-wasm no panic or subprocess support
9 // ignore-emscripten no panic or subprocess support
11 #![feature(generators, generator_trait)]
22 Pin
::new(&mut g
).resume(); // Yields once.
23 Pin
::new(&mut g
).resume(); // Completes here.
24 Pin
::new(&mut g
).resume(); // Panics here.