mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
12 lines
152 B
Rust
12 lines
152 B
Rust
// check-pass
|
|
|
|
#![feature(generators, generator_trait)]
|
|
|
|
use std::ops::Generator;
|
|
|
|
pub fn example() -> impl Generator {
|
|
|| yield &1
|
|
}
|
|
|
|
fn main() {}
|