We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f19358 commit 1b681d6Copy full SHA for 1b681d6
1 file changed
src/test/ui/if-attrs/cfg-false-if-attr.rs
@@ -19,6 +19,18 @@ fn if_let() {
19
#[attr] if let Some(_) = Some(true) {}
20
}
21
22
+fn bar() {
23
+ #[cfg(FALSE)]
24
+ if true {
25
+ let x: () = true; // Should not error due to the #[cfg(FALSE)]
26
+ }
27
+
28
+ #[cfg_attr(not(unset_attr), cfg(FALSE))]
29
30
+ let a: () = true; // Should not error due to the applied #[cfg(FALSE)]
31
32
+}
33
34
macro_rules! custom_macro {
35
($expr:expr) => {}
36
0 commit comments