mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
aef0f4024a
And suggest adding the `#[coroutine]` to the closure
12 lines
207 B
Rust
12 lines
207 B
Rust
//@ build-pass
|
|
//@ edition:2018
|
|
|
|
#![feature(coroutines, stmt_expr_attributes)]
|
|
|
|
fn main() {
|
|
let _ = #[coroutine] static |x: u8| match x {
|
|
y if { yield } == y + 1 => (),
|
|
_ => (),
|
|
};
|
|
}
|