2023-10-23 06:34:27 -05:00
|
|
|
//@ revisions: e2024 none
|
|
|
|
//@[e2024] compile-flags: --edition 2024 -Zunstable-options
|
|
|
|
|
2023-12-12 14:08:34 -06:00
|
|
|
fn test_gen() {
|
2023-10-23 06:34:27 -05:00
|
|
|
gen {};
|
|
|
|
//[none]~^ ERROR: cannot find struct, variant or union type `gen`
|
|
|
|
//[e2024]~^^ ERROR: gen blocks are experimental
|
|
|
|
//[e2024]~| ERROR: type annotations needed
|
|
|
|
}
|
|
|
|
|
2023-12-12 14:08:34 -06:00
|
|
|
fn test_async_gen() {
|
|
|
|
async gen {};
|
|
|
|
//[none]~^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
|
|
|
//[e2024]~^^ ERROR: gen blocks are experimental
|
|
|
|
//[e2024]~| ERROR: type annotations needed
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|
|
|
|
|
2023-10-23 06:34:27 -05:00
|
|
|
#[cfg(FALSE)]
|
|
|
|
fn foo() {
|
|
|
|
gen {};
|
|
|
|
//[e2024]~^ ERROR: gen blocks are experimental
|
2023-12-12 14:08:34 -06:00
|
|
|
|
|
|
|
async gen {};
|
|
|
|
//[e2024]~^ ERROR: gen blocks are experimental
|
|
|
|
//[none]~^^ ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `gen`
|
2023-10-23 06:34:27 -05:00
|
|
|
}
|