mirror of https://github.com/rust-lang/rust
19 lines
325 B
Rust
19 lines
325 B
Rust
//@ check-pass
|
|
|
|
#![crate_type = "lib"]
|
|
fn checkpoints() -> impl Iterator {
|
|
Some(()).iter().flat_map(|_| std::iter::once(()))
|
|
}
|
|
|
|
fn block_checkpoints() -> impl Iterator {
|
|
checkpoints()
|
|
}
|
|
|
|
fn iter_raw() -> impl Iterator {
|
|
let mut iter = block_checkpoints();
|
|
|
|
(0..9).map(move |_| {
|
|
iter.next();
|
|
})
|
|
}
|