summary refs log tree commit diff
path: root/tests/ui/conditional-compilation/cfg-non-opt-expr.rs
blob: ae85f38e645e236d56cc40bfb5446a7d78a42571 (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(stmt_expr_attributes)]
#![feature(custom_test_frameworks)]

fn main() {
    let _ = #[cfg(FALSE)] ();
    //~^ ERROR removing an expression is not supported in this position
    let _ = 1 + 2 + #[cfg(FALSE)] 3;
    //~^ ERROR removing an expression is not supported in this position
    let _ = [1, 2, 3][#[cfg(FALSE)] 1];
    //~^ ERROR removing an expression is not supported in this position
}