about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-04-07 00:43:00 +0200
committerUrgau <urgau@numericable.fr>2024-04-07 01:16:45 +0200
commitc4a97d9407556081c5a8d8927ef86529b3bf4572 (patch)
tree9e67d7ac49de968118ae81117ed6785df5c349d6
parent3f10032eb04a58d6d54caef0318f705042ca0ba1 (diff)
downloadrust-c4a97d9407556081c5a8d8927ef86529b3bf4572.tar.gz
rust-c4a97d9407556081c5a8d8927ef86529b3bf4572.zip
Unify all the always-false cfgs under the `FALSE` cfg
-rw-r--r--tests/ui/cfg/cfg-attr-cfg.rs2
-rw-r--r--tests/ui/cfg/cfg-attr-crate.rs2
-rw-r--r--tests/ui/cfg/cfg-macros-notfoo.rs6
-rw-r--r--tests/ui/cfg/cfg-match-arm.rs4
-rw-r--r--tests/ui/cfg/cfg_stmt_expr.rs34
-rw-r--r--tests/ui/cfg/conditional-compile.rs44
-rw-r--r--tests/ui/cfg/diagnostics-reexport.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs4
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr10
-rw-r--r--tests/ui/conditional-compilation/cfg-in-crate-1.rs2
-rw-r--r--tests/ui/conditional-compilation/cfg-in-crate-1.stderr6
-rw-r--r--tests/ui/conditional-compilation/cfg-non-opt-expr.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-non-opt-expr.stderr6
-rw-r--r--tests/ui/expr/if/attrs/cfg-false-if-attr.rs2
-rw-r--r--tests/ui/filter-block-view-items.rs2
-rw-r--r--tests/ui/imports/unused-import-issue-87973.rs2
-rw-r--r--tests/ui/inner-attrs-on-impl.rs6
-rw-r--r--tests/ui/issues/issue-11004.rs4
-rw-r--r--tests/ui/issues/issue-11085.rs8
-rw-r--r--tests/ui/issues/issue-16819.rs2
-rw-r--r--tests/ui/lint/unused_braces_macro.rs2
-rw-r--r--tests/ui/macros/macro-attributes.rs2
-rw-r--r--tests/ui/macros/macro-error.rs2
-rw-r--r--tests/ui/macros/macro-error.stderr4
-rw-r--r--tests/ui/macros/macro-inner-attributes.rs4
-rw-r--r--tests/ui/macros/macro-outer-attributes.rs4
-rw-r--r--tests/ui/macros/macro-with-attrs2.rs4
-rw-r--r--tests/ui/nested-cfg-attrs.rs2
-rw-r--r--tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs4
-rw-r--r--tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr10
-rw-r--r--tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.rs2
-rw-r--r--tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.stderr2
-rw-r--r--tests/ui/proc-macro/modify-ast.rs2
-rw-r--r--tests/ui/stmt_expr_attrs_no_feature.rs32
34 files changed, 115 insertions, 119 deletions
diff --git a/tests/ui/cfg/cfg-attr-cfg.rs b/tests/ui/cfg/cfg-attr-cfg.rs
index 5b49966d544..67d97e760d7 100644
--- a/tests/ui/cfg/cfg-attr-cfg.rs
+++ b/tests/ui/cfg/cfg-attr-cfg.rs
@@ -4,5 +4,5 @@
 
 //@ pretty-expanded FIXME #23616
 
-#[cfg_attr(foo, cfg(bar))]
+#[cfg_attr(FALSE, cfg(bar))]
 fn main() { }
diff --git a/tests/ui/cfg/cfg-attr-crate.rs b/tests/ui/cfg/cfg-attr-crate.rs
index 7868b006e27..444704d132a 100644
--- a/tests/ui/cfg/cfg-attr-crate.rs
+++ b/tests/ui/cfg/cfg-attr-crate.rs
@@ -3,6 +3,6 @@
 
 //@ pretty-expanded FIXME #23616
 
-#![cfg_attr(not_used, no_core)]
+#![cfg_attr(FALSE, no_core)]
 
 fn main() { }
diff --git a/tests/ui/cfg/cfg-macros-notfoo.rs b/tests/ui/cfg/cfg-macros-notfoo.rs
index c47f4332aa3..9feb06be73e 100644
--- a/tests/ui/cfg/cfg-macros-notfoo.rs
+++ b/tests/ui/cfg/cfg-macros-notfoo.rs
@@ -1,11 +1,9 @@
 //@ run-pass
-//@ compile-flags:
 
 // check that cfg correctly chooses between the macro impls (see also
 // cfg-macros-foo.rs)
 
-
-#[cfg(foo)]
+#[cfg(FALSE)]
 #[macro_use]
 mod foo {
     macro_rules! bar {
@@ -13,7 +11,7 @@ mod foo {
     }
 }
 
-#[cfg(not(foo))]
+#[cfg(not(FALSE))]
 #[macro_use]
 mod foo {
     macro_rules! bar {
diff --git a/tests/ui/cfg/cfg-match-arm.rs b/tests/ui/cfg/cfg-match-arm.rs
index a41337a19a3..e646a63b8fb 100644
--- a/tests/ui/cfg/cfg-match-arm.rs
+++ b/tests/ui/cfg/cfg-match-arm.rs
@@ -10,9 +10,9 @@ enum Foo {
 fn foo(f: Foo) {
     match f {
         Foo::Bar => {},
-        #[cfg(not(asdfa))]
+        #[cfg(not(FALSE))]
         Foo::Baz => {},
-        #[cfg(afsd)]
+        #[cfg(FALSE)]
         Basdfwe => {}
     }
 }
diff --git a/tests/ui/cfg/cfg_stmt_expr.rs b/tests/ui/cfg/cfg_stmt_expr.rs
index 6de5eb5c4c6..9245f6d9757 100644
--- a/tests/ui/cfg/cfg_stmt_expr.rs
+++ b/tests/ui/cfg/cfg_stmt_expr.rs
@@ -7,49 +7,49 @@
 
 fn main() {
     let a = 413;
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     let a = ();
     assert_eq!(a, 413);
 
     let mut b = 612;
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     {
         b = 1111;
     }
     assert_eq!(b, 612);
 
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     undefined_fn();
 
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     undefined_macro!();
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     undefined_macro![];
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     undefined_macro!{};
 
     // pretty printer bug...
-    // #[cfg(unset)]
+    // #[cfg(FALSE)]
     // undefined_macro!{}
 
-    let () = (#[cfg(unset)] 341,); // Should this also work on parens?
-    let t = (1, #[cfg(unset)] 3, 4);
+    let () = (#[cfg(FALSE)] 341,); // Should this also work on parens?
+    let t = (1, #[cfg(FALSE)] 3, 4);
     assert_eq!(t, (1, 4));
 
     let f = |_: u32, _: u32| ();
-    f(2, 1, #[cfg(unset)] 6);
+    f(2, 1, #[cfg(FALSE)] 6);
 
-    let _: u32 = a.clone(#[cfg(unset)] undefined);
+    let _: u32 = a.clone(#[cfg(FALSE)] undefined);
 
-    let _: [(); 0] = [#[cfg(unset)] 126];
-    let t = [#[cfg(unset)] 1, 2, 6];
+    let _: [(); 0] = [#[cfg(FALSE)] 126];
+    let t = [#[cfg(FALSE)] 1, 2, 6];
     assert_eq!(t, [2, 6]);
 
     {
         let r;
-        #[cfg(unset)]
+        #[cfg(FALSE)]
         (r = 5);
-        #[cfg(not(unset))]
+        #[cfg(not(FALSE))]
         (r = 10);
         assert_eq!(r, 10);
     }
@@ -69,13 +69,13 @@ fn main() {
         }
     }
 
-    let n = if_cfg!(unset? {
+    let n = if_cfg!(FALSE? {
         413
     } else {
         612
     });
 
-    assert_eq!((#[cfg(unset)] 1, #[cfg(not(unset))] 2), (2,));
+    assert_eq!((#[cfg(FALSE)] 1, #[cfg(not(FALSE))] 2), (2,));
     assert_eq!(n, 612);
 
     // check that lints work
diff --git a/tests/ui/cfg/conditional-compile.rs b/tests/ui/cfg/conditional-compile.rs
index f39663adda2..a4f334dd696 100644
--- a/tests/ui/cfg/conditional-compile.rs
+++ b/tests/ui/cfg/conditional-compile.rs
@@ -6,31 +6,31 @@
 
 // Crate use statements
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 use flippity;
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 static b: bool = false;
 
 static b: bool = true;
 
 mod rustrt {
-    #[cfg(bogus)]
+    #[cfg(FALSE)]
     extern "C" {
         // This symbol doesn't exist and would be a link error if this
         // module was codegened
-        pub fn bogus();
+        pub fn FALSE();
     }
 
     extern "C" {}
 }
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 type t = isize;
 
 type t = bool;
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 enum tg {
     foo,
 }
@@ -39,12 +39,12 @@ enum tg {
     bar,
 }
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 struct r {
     i: isize,
 }
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 fn r(i: isize) -> r {
     r { i: i }
 }
@@ -57,11 +57,11 @@ fn r(i: isize) -> r {
     r { i: i }
 }
 
-#[cfg(bogus)]
+#[cfg(FALSE)]
 mod m {
     // This needs to parse but would fail in typeck. Since it's not in
     // the current config it should not be typechecked.
-    pub fn bogus() {
+    pub fn FALSE() {
         return 0;
     }
 }
@@ -69,22 +69,22 @@ mod m {
 mod m {
     // Submodules have slightly different code paths than the top-level
     // module, so let's make sure this jazz works here as well
-    #[cfg(bogus)]
+    #[cfg(FALSE)]
     pub fn f() {}
 
     pub fn f() {}
 }
 
-// Since the bogus configuration isn't defined main will just be
+// Since the FALSE configuration isn't defined main will just be
 // parsed, but nothing further will be done with it
-#[cfg(bogus)]
+#[cfg(FALSE)]
 pub fn main() {
     panic!()
 }
 
 pub fn main() {
     // Exercise some of the configured items in ways that wouldn't be possible
-    // if they had the bogus definition
+    // if they had the FALSE definition
     assert!((b));
     let _x: t = true;
     let _y: tg = tg::bar;
@@ -93,14 +93,14 @@ pub fn main() {
 }
 
 fn test_in_fn_ctxt() {
-    #[cfg(bogus)]
+    #[cfg(FALSE)]
     fn f() {
         panic!()
     }
     fn f() {}
     f();
 
-    #[cfg(bogus)]
+    #[cfg(FALSE)]
     static i: isize = 0;
     static i: isize = 1;
     assert_eq!(i, 1);
@@ -109,7 +109,7 @@ fn test_in_fn_ctxt() {
 mod test_foreign_items {
     pub mod rustrt {
         extern "C" {
-            #[cfg(bogus)]
+            #[cfg(FALSE)]
             pub fn write() -> String;
             pub fn write() -> String;
         }
@@ -117,7 +117,7 @@ mod test_foreign_items {
 }
 
 mod test_use_statements {
-    #[cfg(bogus)]
+    #[cfg(FALSE)]
     use flippity_foo;
 }
 
@@ -127,24 +127,24 @@ mod test_methods {
     }
 
     impl Fooable for Foo {
-        #[cfg(bogus)]
+        #[cfg(FALSE)]
         fn what(&self) {}
 
         fn what(&self) {}
 
-        #[cfg(bogus)]
+        #[cfg(FALSE)]
         fn the(&self) {}
 
         fn the(&self) {}
     }
 
     trait Fooable {
-        #[cfg(bogus)]
+        #[cfg(FALSE)]
         fn what(&self);
 
         fn what(&self);
 
-        #[cfg(bogus)]
+        #[cfg(FALSE)]
         fn the(&self);
 
         fn the(&self);
diff --git a/tests/ui/cfg/diagnostics-reexport.rs b/tests/ui/cfg/diagnostics-reexport.rs
index b9548e91183..9b3208cb87c 100644
--- a/tests/ui/cfg/diagnostics-reexport.rs
+++ b/tests/ui/cfg/diagnostics-reexport.rs
@@ -14,7 +14,7 @@ pub use a::x;
 //~| NOTE no `x` in `a`
 
 mod a {
-    #[cfg(no)]
+    #[cfg(FALSE)]
     pub fn x() {}
     //~^ NOTE found an item that was configured out
 }
@@ -25,10 +25,10 @@ pub use b::{x, y};
 //~| NOTE no `y` in `b`
 
 mod b {
-    #[cfg(no)]
+    #[cfg(FALSE)]
     pub fn x() {}
     //~^ NOTE found an item that was configured out
-    #[cfg(no)]
+    #[cfg(FALSE)]
     pub fn y() {}
     //~^ NOTE found an item that was configured out
 }
diff --git a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs
index 72b0db5da84..bca29f0da2b 100644
--- a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs
+++ b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.rs
@@ -1,13 +1,11 @@
 // Check that `#[cfg_attr($PREDICATE,)]` triggers the `unused_attribute` lint.
 
-//@ compile-flags: --cfg TRUE
-
 #![deny(unused)]
 
 #[cfg_attr(FALSE,)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
 fn _f() {}
 
-#[cfg_attr(TRUE,)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
+#[cfg_attr(not(FALSE),)] //~ ERROR `#[cfg_attr]` does not expand to any attributes
 fn _g() {}
 
 fn main() {}
diff --git a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr
index 87b69881353..a858afe2f2b 100644
--- a/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-empty-is-unused.stderr
@@ -1,21 +1,21 @@
 error: `#[cfg_attr]` does not expand to any attributes
-  --> $DIR/cfg-attr-empty-is-unused.rs:7:1
+  --> $DIR/cfg-attr-empty-is-unused.rs:5:1
    |
 LL | #[cfg_attr(FALSE,)]
    | ^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/cfg-attr-empty-is-unused.rs:5:9
+  --> $DIR/cfg-attr-empty-is-unused.rs:3:9
    |
 LL | #![deny(unused)]
    |         ^^^^^^
    = note: `#[deny(unused_attributes)]` implied by `#[deny(unused)]`
 
 error: `#[cfg_attr]` does not expand to any attributes
-  --> $DIR/cfg-attr-empty-is-unused.rs:10:1
+  --> $DIR/cfg-attr-empty-is-unused.rs:8:1
    |
-LL | #[cfg_attr(TRUE,)]
-   | ^^^^^^^^^^^^^^^^^^
+LL | #[cfg_attr(not(FALSE),)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.rs b/tests/ui/conditional-compilation/cfg-in-crate-1.rs
index 59be27a065e..ecd3722bf4c 100644
--- a/tests/ui/conditional-compilation/cfg-in-crate-1.rs
+++ b/tests/ui/conditional-compilation/cfg-in-crate-1.rs
@@ -1,3 +1,3 @@
 //@ error-pattern: `main` function not found
 
-#![cfg(bar)]
+#![cfg(FALSE)]
diff --git a/tests/ui/conditional-compilation/cfg-in-crate-1.stderr b/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
index 98be6d01f1b..6067a3a921c 100644
--- a/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
+++ b/tests/ui/conditional-compilation/cfg-in-crate-1.stderr
@@ -1,8 +1,8 @@
 error[E0601]: `main` function not found in crate `cfg_in_crate_1`
-  --> $DIR/cfg-in-crate-1.rs:3:13
+  --> $DIR/cfg-in-crate-1.rs:3:15
    |
-LL | #![cfg(bar)]
-   |             ^ consider adding a `main` function to `$DIR/cfg-in-crate-1.rs`
+LL | #![cfg(FALSE)]
+   |               ^ consider adding a `main` function to `$DIR/cfg-in-crate-1.rs`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/conditional-compilation/cfg-non-opt-expr.rs b/tests/ui/conditional-compilation/cfg-non-opt-expr.rs
index 0ddbd8a156d..ae85f38e645 100644
--- a/tests/ui/conditional-compilation/cfg-non-opt-expr.rs
+++ b/tests/ui/conditional-compilation/cfg-non-opt-expr.rs
@@ -2,10 +2,10 @@
 #![feature(custom_test_frameworks)]
 
 fn main() {
-    let _ = #[cfg(unset)] ();
+    let _ = #[cfg(FALSE)] ();
     //~^ ERROR removing an expression is not supported in this position
-    let _ = 1 + 2 + #[cfg(unset)] 3;
+    let _ = 1 + 2 + #[cfg(FALSE)] 3;
     //~^ ERROR removing an expression is not supported in this position
-    let _ = [1, 2, 3][#[cfg(unset)] 1];
+    let _ = [1, 2, 3][#[cfg(FALSE)] 1];
     //~^ ERROR removing an expression is not supported in this position
 }
diff --git a/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr b/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr
index 933b7dc184a..06eaa59efdd 100644
--- a/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr
+++ b/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr
@@ -1,19 +1,19 @@
 error: removing an expression is not supported in this position
   --> $DIR/cfg-non-opt-expr.rs:5:13
    |
-LL |     let _ = #[cfg(unset)] ();
+LL |     let _ = #[cfg(FALSE)] ();
    |             ^^^^^^^^^^^^^
 
 error: removing an expression is not supported in this position
   --> $DIR/cfg-non-opt-expr.rs:7:21
    |
-LL |     let _ = 1 + 2 + #[cfg(unset)] 3;
+LL |     let _ = 1 + 2 + #[cfg(FALSE)] 3;
    |                     ^^^^^^^^^^^^^
 
 error: removing an expression is not supported in this position
   --> $DIR/cfg-non-opt-expr.rs:9:23
    |
-LL |     let _ = [1, 2, 3][#[cfg(unset)] 1];
+LL |     let _ = [1, 2, 3][#[cfg(FALSE)] 1];
    |                       ^^^^^^^^^^^^^
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs
index 72d83215ade..c139b347d99 100644
--- a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs
+++ b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs
@@ -25,7 +25,7 @@ fn bar() {
         let x: () = true; // Should not error due to the #[cfg(FALSE)]
     }
 
-    #[cfg_attr(not(unset_attr), cfg(FALSE))]
+    #[cfg_attr(not(FALSE), cfg(FALSE))]
     if true {
         let a: () = true; // Should not error due to the applied #[cfg(FALSE)]
     }
diff --git a/tests/ui/filter-block-view-items.rs b/tests/ui/filter-block-view-items.rs
index edb9ce38006..f582c51a3a6 100644
--- a/tests/ui/filter-block-view-items.rs
+++ b/tests/ui/filter-block-view-items.rs
@@ -4,5 +4,5 @@
 pub fn main() {
     // Make sure that this view item is filtered out because otherwise it would
     // trigger a compilation error
-    #[cfg(not_present)] use bar as foo;
+    #[cfg(FALSE)] use bar as foo;
 }
diff --git a/tests/ui/imports/unused-import-issue-87973.rs b/tests/ui/imports/unused-import-issue-87973.rs
index b04bec07d18..1b016ff814c 100644
--- a/tests/ui/imports/unused-import-issue-87973.rs
+++ b/tests/ui/imports/unused-import-issue-87973.rs
@@ -4,7 +4,7 @@
 // Check that attributes get removed too. See #87973.
 #[deprecated]
 #[allow(unsafe_code)]
-#[cfg(not(foo))]
+#[cfg(not(FALSE))]
 use std::fs;
 //~^ ERROR unused import
 
diff --git a/tests/ui/inner-attrs-on-impl.rs b/tests/ui/inner-attrs-on-impl.rs
index 1c94169a2e5..75f406232e2 100644
--- a/tests/ui/inner-attrs-on-impl.rs
+++ b/tests/ui/inner-attrs-on-impl.rs
@@ -3,16 +3,16 @@
 struct Foo;
 
 impl Foo {
-    #![cfg(cfg_that_surely_doesnt_exist)]
+    #![cfg(FALSE)]
 
     fn method(&self) -> bool { false }
 }
 
 impl Foo {
-    #![cfg(not(cfg_that_surely_doesnt_exist))]
+    #![cfg(not(FALSE))]
 
     // check that we don't eat attributes too eagerly.
-    #[cfg(cfg_that_surely_doesnt_exist)]
+    #[cfg(FALSE)]
     fn method(&self) -> bool { false }
 
     fn method(&self) -> bool { true }
diff --git a/tests/ui/issues/issue-11004.rs b/tests/ui/issues/issue-11004.rs
index 10ef1f5e3b5..09d5476dbe6 100644
--- a/tests/ui/issues/issue-11004.rs
+++ b/tests/ui/issues/issue-11004.rs
@@ -2,14 +2,14 @@ use std::mem;
 
 struct A { x: i32, y: f64 }
 
-#[cfg(not(works))]
+#[cfg(not(FALSE))]
 unsafe fn access(n:*mut A) -> (i32, f64) {
     let x : i32 = n.x; //~ no field `x` on type `*mut A`
     let y : f64 = n.y; //~ no field `y` on type `*mut A`
     (x, y)
 }
 
-#[cfg(works)]
+#[cfg(FALSE)]
 unsafe fn access(n:*mut A) -> (i32, f64) {
     let x : i32 = (*n).x;
     let y : f64 = (*n).y;
diff --git a/tests/ui/issues/issue-11085.rs b/tests/ui/issues/issue-11085.rs
index c4a9f5f69bd..300be10226c 100644
--- a/tests/ui/issues/issue-11085.rs
+++ b/tests/ui/issues/issue-11085.rs
@@ -5,7 +5,7 @@
 //@ pretty-expanded FIXME #23616
 
 struct Foo {
-    #[cfg(fail)]
+    #[cfg(FALSE)]
     bar: baz,
     foo: isize,
 }
@@ -17,18 +17,18 @@ struct Foo2 {
 
 enum Bar1 {
     Bar1_1,
-    #[cfg(fail)]
+    #[cfg(FALSE)]
     Bar1_2(NotAType),
 }
 
 enum Bar2 {
-    #[cfg(fail)]
+    #[cfg(FALSE)]
     Bar2_1(NotAType),
 }
 
 enum Bar3 {
     Bar3_1 {
-        #[cfg(fail)]
+        #[cfg(FALSE)]
         foo: isize,
         bar: isize,
     }
diff --git a/tests/ui/issues/issue-16819.rs b/tests/ui/issues/issue-16819.rs
index 320695118d5..e2b10909177 100644
--- a/tests/ui/issues/issue-16819.rs
+++ b/tests/ui/issues/issue-16819.rs
@@ -3,7 +3,7 @@
 // `#[cfg]` on struct field permits empty unusable struct
 
 struct S {
-    #[cfg(untrue)]
+    #[cfg(FALSE)]
     a: int,
 }
 
diff --git a/tests/ui/lint/unused_braces_macro.rs b/tests/ui/lint/unused_braces_macro.rs
index d0b42a12ff5..f9da4ed4e49 100644
--- a/tests/ui/lint/unused_braces_macro.rs
+++ b/tests/ui/lint/unused_braces_macro.rs
@@ -2,5 +2,5 @@
 pub fn foo<const BAR: bool> () {}
 
 fn main() {
-    foo::<{cfg!(feature = "foo")}>();
+    foo::<{cfg!(FALSE)}>();
 }
diff --git a/tests/ui/macros/macro-attributes.rs b/tests/ui/macros/macro-attributes.rs
index 57ba0d3bf56..83290790766 100644
--- a/tests/ui/macros/macro-attributes.rs
+++ b/tests/ui/macros/macro-attributes.rs
@@ -9,7 +9,7 @@ macro_rules! compiles_fine {
 
         // check that the attributes are recognised by requiring this
         // to be removed to avoid a compile error
-        #[cfg(always_remove)]
+        #[cfg(FALSE)]
         static MISTYPED: () = "foo";
     }
 }
diff --git a/tests/ui/macros/macro-error.rs b/tests/ui/macros/macro-error.rs
index 59ed79e91f0..4984b92911e 100644
--- a/tests/ui/macros/macro-error.rs
+++ b/tests/ui/macros/macro-error.rs
@@ -5,5 +5,5 @@ macro_rules! foo {
 fn main() {
     foo!(0); // Check that we report errors at macro definition, not expansion.
 
-    let _: cfg!(foo) = (); //~ ERROR non-type macro in type position
+    let _: cfg!(FALSE) = (); //~ ERROR non-type macro in type position
 }
diff --git a/tests/ui/macros/macro-error.stderr b/tests/ui/macros/macro-error.stderr
index 2539a6d5156..fcf8d922d65 100644
--- a/tests/ui/macros/macro-error.stderr
+++ b/tests/ui/macros/macro-error.stderr
@@ -7,8 +7,8 @@ LL |     ($a:expr) => a;
 error: non-type macro in type position: cfg
   --> $DIR/macro-error.rs:8:12
    |
-LL |     let _: cfg!(foo) = ();
-   |            ^^^^^^^^^
+LL |     let _: cfg!(FALSE) = ();
+   |            ^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/macros/macro-inner-attributes.rs b/tests/ui/macros/macro-inner-attributes.rs
index a8cda23075b..6dbfce21359 100644
--- a/tests/ui/macros/macro-inner-attributes.rs
+++ b/tests/ui/macros/macro-inner-attributes.rs
@@ -5,11 +5,11 @@ macro_rules! test { ($nm:ident,
                      $i:item) => (mod $nm { #![$a] $i }); }
 
 test!(a,
-      #[cfg(qux)],
+      #[cfg(FALSE)],
       pub fn bar() { });
 
 test!(b,
-      #[cfg(not(qux))],
+      #[cfg(not(FALSE))],
       pub fn bar() { });
 
 #[rustc_dummy]
diff --git a/tests/ui/macros/macro-outer-attributes.rs b/tests/ui/macros/macro-outer-attributes.rs
index 0752f7e3153..8c79683f49a 100644
--- a/tests/ui/macros/macro-outer-attributes.rs
+++ b/tests/ui/macros/macro-outer-attributes.rs
@@ -5,11 +5,11 @@ macro_rules! test { ($nm:ident,
                      $i:item) => (mod $nm { #[$a] $i }); }
 
 test!(a,
-      #[cfg(qux)],
+      #[cfg(FALSE)],
       pub fn bar() { });
 
 test!(b,
-      #[cfg(not(qux))],
+      #[cfg(not(FALSE))],
       pub fn bar() { });
 
 // test1!(#[bar])
diff --git a/tests/ui/macros/macro-with-attrs2.rs b/tests/ui/macros/macro-with-attrs2.rs
index 3ff26025206..37188e45ad3 100644
--- a/tests/ui/macros/macro-with-attrs2.rs
+++ b/tests/ui/macros/macro-with-attrs2.rs
@@ -1,9 +1,9 @@
 //@ run-pass
 
-#[cfg(foo)]
+#[cfg(FALSE)]
 macro_rules! foo { () => (1) }
 
-#[cfg(not(foo))]
+#[cfg(not(FALSE))]
 macro_rules! foo { () => (2) }
 
 pub fn main() {
diff --git a/tests/ui/nested-cfg-attrs.rs b/tests/ui/nested-cfg-attrs.rs
index c988d423373..0af28fc3d8e 100644
--- a/tests/ui/nested-cfg-attrs.rs
+++ b/tests/ui/nested-cfg-attrs.rs
@@ -1,4 +1,4 @@
-#[cfg_attr(all(), cfg_attr(all(), cfg(foo)))]
+#[cfg_attr(all(), cfg_attr(all(), cfg(FALSE)))]
 fn f() {}
 
 fn main() { f() } //~ ERROR cannot find function `f` in this scope
diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs
index d97f24a3d29..33671df9492 100644
--- a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs
+++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.rs
@@ -1,9 +1,9 @@
 #![feature(stmt_expr_attributes)]
 
 fn foo() -> String {
-    #[cfg(feature = "validation")]
+    #[cfg(FALSE)]
     [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() //~ ERROR expected `;`, found `#`
-    #[cfg(not(feature = "validation"))]
+    #[cfg(not(FALSE))]
     String::new()
 }
 
diff --git a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr
index a71253a5e42..6266718162f 100644
--- a/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr
+++ b/tests/ui/parser/attribute/multiple-tail-expr-behind-cfg.stderr
@@ -1,11 +1,11 @@
 error: expected `;`, found `#`
   --> $DIR/multiple-tail-expr-behind-cfg.rs:5:64
    |
-LL |     #[cfg(feature = "validation")]
-   |     ------------------------------ only `;` terminated statements or tail expressions are allowed after this attribute
+LL |     #[cfg(FALSE)]
+   |     ------------- only `;` terminated statements or tail expressions are allowed after this attribute
 LL |     [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>()
    |                                                                ^ expected `;` here
-LL |     #[cfg(not(feature = "validation"))]
+LL |     #[cfg(not(FALSE))]
    |     - unexpected token
    |
 help: add `;` here
@@ -18,9 +18,9 @@ LL |     { [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>() }
    |     +                                                             +
 help: it seems like you are trying to provide different expressions depending on `cfg`, consider using `if cfg!(..)`
    |
-LL ~     if cfg!(feature = "validation") {
+LL ~     if cfg!(FALSE) {
 LL ~         [1, 2, 3].iter().map(|c| c.to_string()).collect::<String>()
-LL ~     } else if cfg!(not(feature = "validation")) {
+LL ~     } else if cfg!(not(FALSE)) {
 LL ~         String::new()
 LL +     }
    |
diff --git a/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.rs b/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.rs
index ad9e7ad707b..e2a62922bcc 100644
--- a/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.rs
+++ b/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.rs
@@ -5,7 +5,7 @@ macro_rules! the_macro {
         #[cfg()]
         $foo //~ ERROR expected `;`, found `#`
 
-        #[cfg(bar)]
+        #[cfg(FALSE)]
         $bar
     };
 }
diff --git a/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.stderr b/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.stderr
index 7b9b8319674..fa4409f73fa 100644
--- a/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.stderr
+++ b/tests/ui/parser/attribute/properly-recover-from-trailing-outer-attribute-in-body-2.stderr
@@ -6,7 +6,7 @@ LL |         #[cfg()]
 LL |         $foo
    |             ^ expected `;` here
 LL |
-LL |         #[cfg(bar)]
+LL |         #[cfg(FALSE)]
    |         - unexpected token
 ...
 LL |     the_macro!( (); (); );
diff --git a/tests/ui/proc-macro/modify-ast.rs b/tests/ui/proc-macro/modify-ast.rs
index 86a7d6a7772..4c125c1c6e8 100644
--- a/tests/ui/proc-macro/modify-ast.rs
+++ b/tests/ui/proc-macro/modify-ast.rs
@@ -7,7 +7,7 @@ use modify_ast::*;
 
 #[derive(Foo)]
 pub struct MyStructc {
-    #[cfg_attr(my_cfg, foo)]
+    #[cfg_attr(FALSE, foo)]
     _a: i32,
 }
 
diff --git a/tests/ui/stmt_expr_attrs_no_feature.rs b/tests/ui/stmt_expr_attrs_no_feature.rs
index 627c97da008..a160a9bb082 100644
--- a/tests/ui/stmt_expr_attrs_no_feature.rs
+++ b/tests/ui/stmt_expr_attrs_no_feature.rs
@@ -25,25 +25,25 @@ fn main() {
 
 // Check that cfg works right
 
-#[cfg(unset)]
+#[cfg(FALSE)]
 fn c() {
     #[rustc_dummy]
     5;
 }
 
-#[cfg(not(unset))]
+#[cfg(not(FALSE))]
 fn j() {
     #[rustc_dummy]
     5;
 }
 
-#[cfg_attr(not(unset), cfg(unset))]
+#[cfg_attr(not(FALSE), cfg(FALSE))]
 fn d() {
     #[rustc_dummy]
     8;
 }
 
-#[cfg_attr(not(unset), cfg(not(unset)))]
+#[cfg_attr(not(FALSE), cfg(not(FALSE)))]
 fn i() {
     #[rustc_dummy]
     8;
@@ -57,25 +57,25 @@ macro_rules! item_mac {
             #[rustc_dummy]
             42;
 
-            #[cfg(unset)]
+            #[cfg(FALSE)]
             fn f() {
                 #[rustc_dummy]
                 5;
             }
 
-            #[cfg(not(unset))]
+            #[cfg(not(FALSE))]
             fn k() {
                 #[rustc_dummy]
                 5;
             }
 
-            #[cfg_attr(not(unset), cfg(unset))]
+            #[cfg_attr(not(FALSE), cfg(FALSE))]
             fn g() {
                 #[rustc_dummy]
                 8;
             }
 
-            #[cfg_attr(not(unset), cfg(not(unset)))]
+            #[cfg_attr(not(FALSE), cfg(not(FALSE)))]
             fn h() {
                 #[rustc_dummy]
                 8;
@@ -90,42 +90,42 @@ item_mac!(e);
 // check that the gate visitor works right:
 
 extern "C" {
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     fn x(a: [u8; #[rustc_dummy] 5]);
     fn y(a: [u8; #[rustc_dummy] 5]); //~ ERROR attributes on expressions are experimental
 }
 
 struct Foo;
 impl Foo {
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     const X: u8 = #[rustc_dummy] 5;
     const Y: u8 = #[rustc_dummy] 5; //~ ERROR attributes on expressions are experimental
 }
 
 trait Bar {
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     const X: [u8; #[rustc_dummy] 5];
     const Y: [u8; #[rustc_dummy] 5]; //~ ERROR attributes on expressions are experimental
 }
 
 struct Joyce {
-    #[cfg(unset)]
+    #[cfg(FALSE)]
     field: [u8; #[rustc_dummy] 5],
     field2: [u8; #[rustc_dummy] 5] //~ ERROR attributes on expressions are experimental
 }
 
 struct Walky(
-    #[cfg(unset)] [u8; #[rustc_dummy] 5],
+    #[cfg(FALSE)] [u8; #[rustc_dummy] 5],
     [u8; #[rustc_dummy] 5] //~ ERROR attributes on expressions are experimental
 );
 
 enum Mike {
     Happy(
-        #[cfg(unset)] [u8; #[rustc_dummy] 5],
+        #[cfg(FALSE)] [u8; #[rustc_dummy] 5],
         [u8; #[rustc_dummy] 5] //~ ERROR attributes on expressions are experimental
     ),
     Angry {
-        #[cfg(unset)]
+        #[cfg(FALSE)]
         field: [u8; #[rustc_dummy] 5],
         field2: [u8; #[rustc_dummy] 5] //~ ERROR attributes on expressions are experimental
     }
@@ -133,7 +133,7 @@ enum Mike {
 
 fn pat() {
     match 5 {
-        #[cfg(unset)]
+        #[cfg(FALSE)]
         5 => #[rustc_dummy] (),
         6 => #[rustc_dummy] (), //~ ERROR attributes on expressions are experimental
         _ => (),