We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
if
1 parent e9ec47b commit 9a299e4Copy full SHA for 9a299e4
src/test/ui/parser/if-attrs/bad-cfg.rs
@@ -0,0 +1,5 @@
1
+#![feature(stmt_expr_attributes)]
2
+
3
+fn main() {
4
+ let _ = #[cfg(FALSE)] if true {}; //~ ERROR removing an expression
5
+}
src/test/ui/parser/if-attrs/bad-cfg.stderr
@@ -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 {};
+ | ^^^^^^^^^^^^^
6
7
+error: aborting due to previous error
8
0 commit comments