Skip to content

Commit 9a299e4

Browse files
committed
Test trying to cfg-remove an if expression
1 parent e9ec47b commit 9a299e4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![feature(stmt_expr_attributes)]
2+
3+
fn main() {
4+
let _ = #[cfg(FALSE)] if true {}; //~ ERROR removing an expression
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: removing an expression is not supported in this position
2+
--> $DIR/bad-cfg.rs:4:13
3+
|
4+
LL | let _ = #[cfg(FALSE)] if true {};
5+
| ^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)