summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-gen_blocks.rs
blob: e2e1574a36a0f9444c1ebec1a549931e3d6f28f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// revisions: e2024 none
//[e2024] compile-flags: --edition 2024 -Zunstable-options

fn main() {
    gen {};
    //[none]~^ ERROR: cannot find struct, variant or union type `gen`
    //[e2024]~^^ ERROR: gen blocks are experimental
    //[e2024]~| ERROR: type annotations needed
}

#[cfg(FALSE)]
fn foo() {
    gen {};
    //[e2024]~^ ERROR: gen blocks are experimental
}