Test trying to cfg-remove an if expression

This commit is contained in:
Aaron Hill 2020-02-19 10:47:27 -05:00
parent e9ec47bb70
commit 9a299e4e21
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#![feature(stmt_expr_attributes)]
fn main() {
let _ = #[cfg(FALSE)] if true {}; //~ ERROR removing an expression
}

View File

@ -0,0 +1,8 @@
error: removing an expression is not supported in this position
--> $DIR/bad-cfg.rs:4:13
|
LL | let _ = #[cfg(FALSE)] if true {};
| ^^^^^^^^^^^^^
error: aborting due to previous error