mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-30 04:24:26 +00:00
12 lines
218 B
Rust
12 lines
218 B
Rust
// compile-flags: --emit metadata
|
|
#![feature(coroutines, coroutine_trait)]
|
|
|
|
use std::marker::Unpin;
|
|
use std::ops::Coroutine;
|
|
|
|
pub fn g() -> impl Coroutine<(), Yield = (), Return = ()> {
|
|
|| {
|
|
yield;
|
|
}
|
|
}
|