blob: 2d99cdd4f506e66f63dea8ea53b708f032bda275 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// 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();
})
}
|