mirror of https://github.com/rust-lang/rust
22 lines
405 B
Rust
22 lines
405 B
Rust
//@ revisions: next old
|
|
//@compile-flags: --edition 2024 -Zunstable-options
|
|
//@[next] compile-flags: -Znext-solver
|
|
//@ check-pass
|
|
#![feature(gen_blocks)]
|
|
|
|
use std::iter::FusedIterator;
|
|
|
|
fn foo() -> impl FusedIterator {
|
|
gen { yield 42 }
|
|
}
|
|
|
|
fn bar() -> impl FusedIterator<Item = u16> {
|
|
gen { yield 42 }
|
|
}
|
|
|
|
fn baz() -> impl FusedIterator + Iterator<Item = i64> {
|
|
gen { yield 42 }
|
|
}
|
|
|
|
fn main() {}
|