about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs
blob: 73a17c12035dc314bc099a0222c43b646c268ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ edition: 2021

pub fn demo() -> Option<i32> {
    #[cfg(false)]
    {
        do yeet //~ ERROR `do yeet` expression is experimental
    }

    Some(1)
}

#[cfg(false)]
pub fn alternative() -> Result<(), String> {
    do yeet "hello"; //~ ERROR `do yeet` expression is experimental
}

fn main() {
    demo();
}