]> git.proxmox.com Git - rustc.git/blame - src/test/ui/conditional-compilation/cfg-non-opt-expr.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / conditional-compilation / cfg-non-opt-expr.rs
CommitLineData
7453a54e 1#![feature(stmt_expr_attributes)]
b7449926 2#![feature(custom_test_frameworks)]
7453a54e 3
92a42be0
SL
4fn main() {
5 let _ = #[cfg(unset)] ();
6 //~^ ERROR removing an expression is not supported in this position
7 let _ = 1 + 2 + #[cfg(unset)] 3;
8 //~^ ERROR removing an expression is not supported in this position
9 let _ = [1, 2, 3][#[cfg(unset)] 1];
10 //~^ ERROR removing an expression is not supported in this position
11}