mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
aef0f4024a
And suggest adding the `#[coroutine]` to the closure
13 lines
170 B
Rust
13 lines
170 B
Rust
//@ check-pass
|
|
|
|
#![feature(coroutines, coroutine_trait)]
|
|
|
|
use std::ops::Coroutine;
|
|
|
|
pub fn example() -> impl Coroutine {
|
|
#[coroutine]
|
|
|| yield &1
|
|
}
|
|
|
|
fn main() {}
|