rust-clippy/tests/ui/crashes/ice-5238.rs
Oli Scherer 3fc9537624 Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
2024-04-24 08:05:29 +00:00

9 lines
207 B
Rust

// Regression test for #5238 / https://github.com/rust-lang/rust/pull/69562
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
fn main() {
let _ = #[coroutine] || {
yield;
};
}