summaryrefslogtreecommitdiffstats
path: root/tests/ui/cfg/cfg-stmt-recovery.rs
blob: 2e0839d2a153561595cd9fa95587245c7ff358a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Verify that we do not ICE when failing to parse a statement in `cfg_eval`.

#![feature(cfg_eval)]
#![feature(stmt_expr_attributes)]

#[cfg_eval]
fn main() {
    #[cfg_eval]
    let _ = #[cfg(FALSE)] 0;
    //~^ ERROR removing an expression is not supported in this position
    //~| ERROR expected expression, found `;`
    //~| ERROR removing an expression is not supported in this position
}