about summary refs log tree commit diff
path: root/tests/ui/coroutine/gen_block_is_iter.rs
blob: 032360fbee03271d6c0e21d4f80125e0ca32e320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ revisions: next old
//@ edition: 2024
//@[next] compile-flags: -Znext-solver
//@ check-pass
#![feature(gen_blocks)]

fn foo() -> impl Iterator<Item = u32> {
    gen { yield 42 }
}

fn bar() -> impl Iterator<Item = i64> {
    gen { yield 42 }
}

fn baz() -> impl Iterator<Item = i32> {
    gen { yield 42 }
}

fn main() {}