about summary refs log tree commit diff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2017-12-06 10:18:03 +0100
committerest31 <MTest31@outlook.com>2017-12-07 10:14:41 +0100
commit6dba3e68e670a3b1418b259ca5f3758444dd1a68 (patch)
treedeec386a3bbbbc37676603227787be64636c5b88
parent38438c618ca0238442e1feb245e0a71174c3db43 (diff)
downloadrust-6dba3e68e670a3b1418b259ca5f3758444dd1a68.tar.gz
rust-6dba3e68e670a3b1418b259ca5f3758444dd1a68.zip
Migrate even more feature gate tests to ui
We also rename some of the files to conform to the
feature-gate-<feat_name>.rs pattern that is most common.
-rw-r--r--src/test/compile-fail/no-core-gated.rs15
-rw-r--r--src/test/ui/feature-gate-abi_unadjusted.rs (renamed from src/test/compile-fail/unadjusted-unstable.rs)2
-rw-r--r--src/test/ui/feature-gate-abi_unadjusted.stderr12
-rw-r--r--src/test/ui/feature-gate-asm.rs (renamed from src/test/compile-fail/asm-gated.rs)2
-rw-r--r--src/test/ui/feature-gate-asm.stderr10
-rw-r--r--src/test/ui/feature-gate-asm2.rs (renamed from src/test/compile-fail/asm-gated2.rs)0
-rw-r--r--src/test/ui/feature-gate-asm2.stderr10
-rw-r--r--src/test/ui/feature-gate-box_patterns.rs (renamed from src/test/ui/feature-gate-box-pat.rs)2
-rw-r--r--src/test/ui/feature-gate-box_patterns.stderr (renamed from src/test/ui/feature-gate-box-pat.stderr)4
-rw-r--r--src/test/ui/feature-gate-box_syntax.rs (renamed from src/test/compile-fail/gated-box-syntax.rs)2
-rw-r--r--src/test/ui/feature-gate-box_syntax.stderr10
-rw-r--r--src/test/ui/feature-gate-concat_idents.rs (renamed from src/test/compile-fail/concat_idents-gate.rs)2
-rw-r--r--src/test/ui/feature-gate-concat_idents.stderr18
-rw-r--r--src/test/ui/feature-gate-concat_idents2.rs (renamed from src/test/compile-fail/gated-concat_idents.rs)0
-rw-r--r--src/test/ui/feature-gate-concat_idents2.stderr10
-rw-r--r--src/test/ui/feature-gate-concat_idents3.rs (renamed from src/test/compile-fail/concat_idents-gate2.rs)0
-rw-r--r--src/test/ui/feature-gate-concat_idents3.stderr18
-rw-r--r--src/test/ui/feature-gate-conservative_impl_trait.rs (renamed from src/test/compile-fail/impl-trait/feature-gate.rs)2
-rw-r--r--src/test/ui/feature-gate-conservative_impl_trait.stderr10
-rw-r--r--src/test/ui/feature-gate-const_fn.rs (renamed from src/test/compile-fail/const-fn-stability.rs)2
-rw-r--r--src/test/ui/feature-gate-const_fn.stderr60
-rw-r--r--src/test/ui/feature-gate-custom_attribute.rs (renamed from src/test/compile-fail/attr-literals.rs)2
-rw-r--r--src/test/ui/feature-gate-custom_attribute.stderr106
-rw-r--r--src/test/ui/feature-gate-custom_attribute2.rs (renamed from src/test/compile-fail/attr-on-generic-formals-are-visited.rs)0
-rw-r--r--src/test/ui/feature-gate-custom_attribute2.stderr138
-rw-r--r--src/test/ui/feature-gate-custom_derive.rs (renamed from src/test/compile-fail/single-derive-attr.rs)2
-rw-r--r--src/test/ui/feature-gate-custom_derive.stderr10
-rw-r--r--src/test/ui/feature-gate-default_type_parameter_fallback.rs (renamed from src/test/compile-fail/type-parameter-invalid-lint.rs)2
-rw-r--r--src/test/ui/feature-gate-default_type_parameter_fallback.stderr21
-rw-r--r--src/test/ui/feature-gate-generic_param_attrs.rs (renamed from src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs)2
-rw-r--r--src/test/ui/feature-gate-generic_param_attrs.stderr138
-rw-r--r--src/test/ui/feature-gate-i128_type.rs (renamed from src/test/compile-fail/i128-feature.rs)2
-rw-r--r--src/test/ui/feature-gate-i128_type.stderr18
-rw-r--r--src/test/ui/feature-gate-i128_type2.rs (renamed from src/test/compile-fail/i128-feature-2.rs)0
-rw-r--r--src/test/ui/feature-gate-i128_type2.stderr46
-rw-r--r--src/test/ui/feature-gate-link_args.rs (renamed from src/test/compile-fail/gated-link-args.rs)2
-rw-r--r--src/test/ui/feature-gate-link_args.stderr26
-rw-r--r--src/test/ui/feature-gate-link_cfg.rs (renamed from src/test/compile-fail/link-cfg-gated.rs)2
-rw-r--r--src/test/ui/feature-gate-link_cfg.stderr10
-rw-r--r--src/test/ui/feature-gate-link_llvm_intrinsics.rs (renamed from src/test/compile-fail/gated-link-llvm-intrinsics.rs)2
-rw-r--r--src/test/ui/feature-gate-link_llvm_intrinsics.stderr10
-rw-r--r--src/test/ui/feature-gate-linkage.rs (renamed from src/test/compile-fail/linkage1.rs)2
-rw-r--r--src/test/ui/feature-gate-linkage.stderr10
-rw-r--r--src/test/ui/feature-gate-log_syntax.rs (renamed from src/test/compile-fail/log-syntax-gate.rs)2
-rw-r--r--src/test/ui/feature-gate-log_syntax.stderr10
-rw-r--r--src/test/ui/feature-gate-log_syntax2.rs (renamed from src/test/compile-fail/log-syntax-gate2.rs)0
-rw-r--r--src/test/ui/feature-gate-log_syntax2.stderr10
-rw-r--r--src/test/ui/feature-gate-naked_functions.rs (renamed from src/test/compile-fail/gated-naked_functions.rs)2
-rw-r--r--src/test/ui/feature-gate-naked_functions.stderr18
-rw-r--r--src/test/ui/feature-gate-never_type.rs (renamed from src/test/compile-fail/never-disabled.rs)2
-rw-r--r--src/test/ui/feature-gate-never_type.stderr42
-rw-r--r--src/test/ui/feature-gate-no_core.rs (renamed from src/test/compile-fail/gated-no-core.rs)2
-rw-r--r--src/test/ui/feature-gate-no_core.stderr10
-rw-r--r--src/test/ui/feature-gate-non_ascii_idents.rs (renamed from src/test/compile-fail/gated-non-ascii-idents.rs)2
-rw-r--r--src/test/ui/feature-gate-non_ascii_idents.stderr122
-rw-r--r--src/test/ui/feature-gate-plugin_registrar.rs (renamed from src/test/compile-fail/gated-plugin_registrar.rs)2
-rw-r--r--src/test/ui/feature-gate-plugin_registrar.stderr10
-rw-r--r--src/test/ui/feature-gate-target_feature.rs (renamed from src/test/compile-fail/gated-target_feature.rs)2
-rw-r--r--src/test/ui/feature-gate-target_feature.stderr10
-rw-r--r--src/test/ui/feature-gate-thread_local.rs (renamed from src/test/compile-fail/gated-thread-local.rs)2
-rw-r--r--src/test/ui/feature-gate-thread_local.stderr10
-rw-r--r--src/test/ui/feature-gate-trace_macros.rs (renamed from src/test/compile-fail/gated-trace_macros.rs)2
-rw-r--r--src/test/ui/feature-gate-trace_macros.stderr10
-rw-r--r--src/test/ui/feature-gate-type_ascription.rs (renamed from src/test/compile-fail/type-ascription-feature-gate.rs)2
-rw-r--r--src/test/ui/feature-gate-type_ascription.stderr10
-rw-r--r--src/test/ui/feature-gate-untagged_unions.rs (renamed from src/test/compile-fail/union/union-feature-gate.rs)2
-rw-r--r--src/test/ui/feature-gate-untagged_unions.stderr32
-rw-r--r--src/test/ui/specialization-feature-gate-default.rs (renamed from src/test/compile-fail/specialization/specialization-feature-gate-default.rs)0
-rw-r--r--src/test/ui/specialization-feature-gate-default.stderr10
-rw-r--r--src/test/ui/specialization-feature-gate-overlap.rs (renamed from src/test/compile-fail/specialization/specialization-feature-gate-overlap.rs)0
-rw-r--r--src/test/ui/specialization-feature-gate-overlap.stderr15
71 files changed, 1012 insertions, 71 deletions
diff --git a/src/test/compile-fail/no-core-gated.rs b/src/test/compile-fail/no-core-gated.rs
deleted file mode 100644
index 27f8fda98ab..00000000000
--- a/src/test/compile-fail/no-core-gated.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// gate-test-no_core
-
-#![no_core] //~ ERROR no_core is experimental
-
-fn main() {}
diff --git a/src/test/compile-fail/unadjusted-unstable.rs b/src/test/ui/feature-gate-abi_unadjusted.rs
index 2c23050085d..501f4451ed8 100644
--- a/src/test/compile-fail/unadjusted-unstable.rs
+++ b/src/test/ui/feature-gate-abi_unadjusted.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-abi_unadjusted
-
 extern "unadjusted" fn foo() {
 //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable
 }
diff --git a/src/test/ui/feature-gate-abi_unadjusted.stderr b/src/test/ui/feature-gate-abi_unadjusted.stderr
new file mode 100644
index 00000000000..3cc43847156
--- /dev/null
+++ b/src/test/ui/feature-gate-abi_unadjusted.stderr
@@ -0,0 +1,12 @@
+error: unadjusted ABI is an implementation detail and perma-unstable
+  --> $DIR/feature-gate-abi_unadjusted.rs:11:1
+   |
+11 | / extern "unadjusted" fn foo() {
+12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable
+13 | | }
+   | |_^
+   |
+   = help: add #![feature(abi_unadjusted)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/asm-gated.rs b/src/test/ui/feature-gate-asm.rs
index cd9cc223701..8d053bdae78 100644
--- a/src/test/compile-fail/asm-gated.rs
+++ b/src/test/ui/feature-gate-asm.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-asm
-
 fn main() {
     unsafe {
         asm!(""); //~ ERROR inline assembly is not stable enough
diff --git a/src/test/ui/feature-gate-asm.stderr b/src/test/ui/feature-gate-asm.stderr
new file mode 100644
index 00000000000..ff68a4fb23e
--- /dev/null
+++ b/src/test/ui/feature-gate-asm.stderr
@@ -0,0 +1,10 @@
+error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
+  --> $DIR/feature-gate-asm.rs:13:9
+   |
+13 |         asm!(""); //~ ERROR inline assembly is not stable enough
+   |         ^^^^^^^^^
+   |
+   = help: add #![feature(asm)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/asm-gated2.rs b/src/test/ui/feature-gate-asm2.rs
index 222190de9fe..222190de9fe 100644
--- a/src/test/compile-fail/asm-gated2.rs
+++ b/src/test/ui/feature-gate-asm2.rs
diff --git a/src/test/ui/feature-gate-asm2.stderr b/src/test/ui/feature-gate-asm2.stderr
new file mode 100644
index 00000000000..1e02cede61d
--- /dev/null
+++ b/src/test/ui/feature-gate-asm2.stderr
@@ -0,0 +1,10 @@
+error: inline assembly is not stable enough for use and is subject to change (see issue #29722)
+  --> $DIR/feature-gate-asm2.rs:15:24
+   |
+15 |         println!("{}", asm!("")); //~ ERROR inline assembly is not stable
+   |                        ^^^^^^^^
+   |
+   = help: add #![feature(asm)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/feature-gate-box-pat.rs b/src/test/ui/feature-gate-box_patterns.rs
index c30f3952dbf..e64081823e7 100644
--- a/src/test/ui/feature-gate-box-pat.rs
+++ b/src/test/ui/feature-gate-box_patterns.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-box_patterns
-
 fn main() {
     let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
     println!("x: {}", x);
diff --git a/src/test/ui/feature-gate-box-pat.stderr b/src/test/ui/feature-gate-box_patterns.stderr
index 0587995beb9..0a30de58a1f 100644
--- a/src/test/ui/feature-gate-box-pat.stderr
+++ b/src/test/ui/feature-gate-box_patterns.stderr
@@ -1,7 +1,7 @@
 error: box pattern syntax is experimental (see issue #29641)
-  --> $DIR/feature-gate-box-pat.rs:14:9
+  --> $DIR/feature-gate-box_patterns.rs:12:9
    |
-14 |     let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
+12 |     let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
    |         ^^^^^
    |
    = help: add #![feature(box_patterns)] to the crate attributes to enable
diff --git a/src/test/compile-fail/gated-box-syntax.rs b/src/test/ui/feature-gate-box_syntax.rs
index 9a68ddb3059..a2643fe02b8 100644
--- a/src/test/compile-fail/gated-box-syntax.rs
+++ b/src/test/ui/feature-gate-box_syntax.rs
@@ -10,8 +10,6 @@
 
 // Test that the use of the box syntax is gated by `box_syntax` feature gate.
 
-// gate-test-box_syntax
-
 fn main() {
     let x = box 3;
     //~^ ERROR box expression syntax is experimental; you can call `Box::new` instead.
diff --git a/src/test/ui/feature-gate-box_syntax.stderr b/src/test/ui/feature-gate-box_syntax.stderr
new file mode 100644
index 00000000000..9b21dd03051
--- /dev/null
+++ b/src/test/ui/feature-gate-box_syntax.stderr
@@ -0,0 +1,10 @@
+error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779)
+  --> $DIR/feature-gate-box_syntax.rs:14:13
+   |
+14 |     let x = box 3;
+   |             ^^^^^
+   |
+   = help: add #![feature(box_syntax)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/concat_idents-gate.rs b/src/test/ui/feature-gate-concat_idents.rs
index 5b125d0e51c..f4d97445725 100644
--- a/src/test/compile-fail/concat_idents-gate.rs
+++ b/src/test/ui/feature-gate-concat_idents.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-concat_idents
-
 const XY_1: i32 = 10;
 
 fn main() {
diff --git a/src/test/ui/feature-gate-concat_idents.stderr b/src/test/ui/feature-gate-concat_idents.stderr
new file mode 100644
index 00000000000..c980668c298
--- /dev/null
+++ b/src/test/ui/feature-gate-concat_idents.stderr
@@ -0,0 +1,18 @@
+error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
+  --> $DIR/feature-gate-concat_idents.rs:15:13
+   |
+15 |     let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable
+   |             ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(concat_idents)] to the crate attributes to enable
+
+error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
+  --> $DIR/feature-gate-concat_idents.rs:16:13
+   |
+16 |     let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable
+   |             ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(concat_idents)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/gated-concat_idents.rs b/src/test/ui/feature-gate-concat_idents2.rs
index af288a97904..af288a97904 100644
--- a/src/test/compile-fail/gated-concat_idents.rs
+++ b/src/test/ui/feature-gate-concat_idents2.rs
diff --git a/src/test/ui/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gate-concat_idents2.stderr
new file mode 100644
index 00000000000..9cfd954eec8
--- /dev/null
+++ b/src/test/ui/feature-gate-concat_idents2.stderr
@@ -0,0 +1,10 @@
+error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
+  --> $DIR/feature-gate-concat_idents2.rs:14:5
+   |
+14 |     concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough
+   |     ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(concat_idents)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/concat_idents-gate2.rs b/src/test/ui/feature-gate-concat_idents3.rs
index 5a9ffe98c93..5a9ffe98c93 100644
--- a/src/test/compile-fail/concat_idents-gate2.rs
+++ b/src/test/ui/feature-gate-concat_idents3.rs
diff --git a/src/test/ui/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gate-concat_idents3.stderr
new file mode 100644
index 00000000000..8399ca3c501
--- /dev/null
+++ b/src/test/ui/feature-gate-concat_idents3.stderr
@@ -0,0 +1,18 @@
+error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
+  --> $DIR/feature-gate-concat_idents3.rs:17:20
+   |
+17 |     assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(concat_idents)] to the crate attributes to enable
+
+error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599)
+  --> $DIR/feature-gate-concat_idents3.rs:18:20
+   |
+18 |     assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable
+   |                    ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(concat_idents)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/impl-trait/feature-gate.rs b/src/test/ui/feature-gate-conservative_impl_trait.rs
index d46a16450db..7a3ae639bfc 100644
--- a/src/test/compile-fail/impl-trait/feature-gate.rs
+++ b/src/test/ui/feature-gate-conservative_impl_trait.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-conservative_impl_trait
-
 fn foo() -> impl Fn() { || {} }
 //~^ ERROR `impl Trait` in return position is experimental
 
diff --git a/src/test/ui/feature-gate-conservative_impl_trait.stderr b/src/test/ui/feature-gate-conservative_impl_trait.stderr
new file mode 100644
index 00000000000..72a4f52926a
--- /dev/null
+++ b/src/test/ui/feature-gate-conservative_impl_trait.stderr
@@ -0,0 +1,10 @@
+error: `impl Trait` in return position is experimental (see issue #34511)
+  --> $DIR/feature-gate-conservative_impl_trait.rs:11:13
+   |
+11 | fn foo() -> impl Fn() { || {} }
+   |             ^^^^^^^^^
+   |
+   = help: add #![feature(conservative_impl_trait)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/const-fn-stability.rs b/src/test/ui/feature-gate-const_fn.rs
index d093364497a..1d1dedddaaa 100644
--- a/src/test/compile-fail/const-fn-stability.rs
+++ b/src/test/ui/feature-gate-const_fn.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-const_fn
-
 // Test use of const fn without feature gate.
 
 const fn foo() -> usize { 0 } //~ ERROR const fn is unstable
diff --git a/src/test/ui/feature-gate-const_fn.stderr b/src/test/ui/feature-gate-const_fn.stderr
new file mode 100644
index 00000000000..c62229ac71b
--- /dev/null
+++ b/src/test/ui/feature-gate-const_fn.stderr
@@ -0,0 +1,60 @@
+error[E0379]: trait fns cannot be declared const
+  --> $DIR/feature-gate-const_fn.rs:16:5
+   |
+16 |     const fn foo() -> u32; //~ ERROR const fn is unstable
+   |     ^^^^^ trait fns cannot be const
+
+error[E0379]: trait fns cannot be declared const
+  --> $DIR/feature-gate-const_fn.rs:18:5
+   |
+18 |     const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable
+   |     ^^^^^ trait fns cannot be const
+
+error[E0379]: trait fns cannot be declared const
+  --> $DIR/feature-gate-const_fn.rs:27:5
+   |
+27 |     const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable
+   |     ^^^^^ trait fns cannot be const
+
+error: const fn is unstable (see issue #24111)
+  --> $DIR/feature-gate-const_fn.rs:13:1
+   |
+13 | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(const_fn)] to the crate attributes to enable
+
+error: const fn is unstable (see issue #24111)
+  --> $DIR/feature-gate-const_fn.rs:16:5
+   |
+16 |     const fn foo() -> u32; //~ ERROR const fn is unstable
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(const_fn)] to the crate attributes to enable
+
+error: const fn is unstable (see issue #24111)
+  --> $DIR/feature-gate-const_fn.rs:18:5
+   |
+18 |     const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(const_fn)] to the crate attributes to enable
+
+error: const fn is unstable (see issue #24111)
+  --> $DIR/feature-gate-const_fn.rs:23:5
+   |
+23 |     const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(const_fn)] to the crate attributes to enable
+
+error: const fn is unstable (see issue #24111)
+  --> $DIR/feature-gate-const_fn.rs:27:5
+   |
+27 |     const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(const_fn)] to the crate attributes to enable
+
+error: aborting due to 8 previous errors
+
diff --git a/src/test/compile-fail/attr-literals.rs b/src/test/ui/feature-gate-custom_attribute.rs
index e77fde845ae..b5428803517 100644
--- a/src/test/compile-fail/attr-literals.rs
+++ b/src/test/ui/feature-gate-custom_attribute.rs
@@ -10,8 +10,6 @@
 
 // Check that literals in attributes parse just fine.
 
-// gate-test-custom_attribute
-
 #![feature(rustc_attrs, attr_literals)]
 #![allow(dead_code)]
 #![allow(unused_variables)]
diff --git a/src/test/ui/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gate-custom_attribute.stderr
new file mode 100644
index 00000000000..866ebfe8f2f
--- /dev/null
+++ b/src/test/ui/feature-gate-custom_attribute.stderr
@@ -0,0 +1,106 @@
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:17:1
+   |
+17 | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:18:1
+   |
+18 | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:19:1
+   |
+19 | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:20:1
+   |
+20 | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:21:1
+   |
+21 | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:22:1
+   |
+22 | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:23:1
+   |
+23 | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:24:1
+   |
+24 | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:25:1
+   |
+25 | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:26:1
+   |
+26 | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:27:1
+   |
+27 | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:28:1
+   |
+28 | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute.rs:29:1
+   |
+29 | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: aborting due to 13 previous errors
+
diff --git a/src/test/compile-fail/attr-on-generic-formals-are-visited.rs b/src/test/ui/feature-gate-custom_attribute2.rs
index 0d89c52d885..0d89c52d885 100644
--- a/src/test/compile-fail/attr-on-generic-formals-are-visited.rs
+++ b/src/test/ui/feature-gate-custom_attribute2.rs
diff --git a/src/test/ui/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gate-custom_attribute2.stderr
new file mode 100644
index 00000000000..3e4ea58a7a3
--- /dev/null
+++ b/src/test/ui/feature-gate-custom_attribute2.stderr
@@ -0,0 +1,138 @@
+error: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:23:13
+   |
+23 | struct StLt<#[lt_struct] 'a>(&'a u32);
+   |             ^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:25:13
+   |
+25 | struct StTy<#[ty_struct] I>(I);
+   |             ^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:28:11
+   |
+28 | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B }
+   |           ^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:30:11
+   |
+30 | enum EnTy<#[ty_enum] J> { A(J), B }
+   |           ^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:33:12
+   |
+33 | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
+   |            ^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:35:12
+   |
+35 | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); }
+   |            ^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:38:11
+   |
+38 | type TyLt<#[lt_type] 'd> = &'d u32;
+   |           ^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:40:11
+   |
+40 | type TyTy<#[ty_type] L> = (L, );
+   |           ^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:43:6
+   |
+43 | impl<#[lt_inherent] 'e> StLt<'e> { }
+   |      ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:45:6
+   |
+45 | impl<#[ty_inherent] M> StTy<M> { }
+   |      ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:48:6
+   |
+48 | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
+   |      ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:52:6
+   |
+52 | impl<#[ty_impl_for] N> TrTy<N> for StTy<N> {
+   |      ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:57:9
+   |
+57 | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
+   |         ^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:59:9
+   |
+59 | fn f_ty<#[ty_fn] O>(_: O) { }
+   |         ^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:63:13
+   |
+63 |     fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
+   |             ^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:65:13
+   |
+65 |     fn m_ty<#[ty_meth] P>(_: P) { }
+   |             ^^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)
+  --> $DIR/feature-gate-custom_attribute2.rs:70:19
+   |
+70 |     where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
+   |                   ^^^^^^^^^
+   |
+   = help: add #![feature(custom_attribute)] to the crate attributes to enable
+
+error: aborting due to 17 previous errors
+
diff --git a/src/test/compile-fail/single-derive-attr.rs b/src/test/ui/feature-gate-custom_derive.rs
index cd37611aced..0b1b3141f5b 100644
--- a/src/test/compile-fail/single-derive-attr.rs
+++ b/src/test/ui/feature-gate-custom_derive.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-custom_derive
-
 #[derive_Clone]
 //~^ ERROR attributes of the form `#[derive_*]` are reserved
 struct Test;
diff --git a/src/test/ui/feature-gate-custom_derive.stderr b/src/test/ui/feature-gate-custom_derive.stderr
new file mode 100644
index 00000000000..e806c808631
--- /dev/null
+++ b/src/test/ui/feature-gate-custom_derive.stderr
@@ -0,0 +1,10 @@
+error: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644)
+  --> $DIR/feature-gate-custom_derive.rs:11:1
+   |
+11 | #[derive_Clone]
+   | ^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(custom_derive)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/type-parameter-invalid-lint.rs b/src/test/ui/feature-gate-default_type_parameter_fallback.rs
index f424cbf0c32..ccc5ec49f13 100644
--- a/src/test/compile-fail/type-parameter-invalid-lint.rs
+++ b/src/test/ui/feature-gate-default_type_parameter_fallback.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-default_type_parameter_fallback
-
 #![allow(unused)]
 
 fn avg<T=i32>(_: T) {}
diff --git a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr
new file mode 100644
index 00000000000..d756a69e8c1
--- /dev/null
+++ b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr
@@ -0,0 +1,21 @@
+error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions.
+  --> $DIR/feature-gate-default_type_parameter_fallback.rs:13:8
+   |
+13 | fn avg<T=i32>(_: T) {}
+   |        ^
+   |
+   = note: #[deny(invalid_type_param_default)] on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+
+error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions.
+  --> $DIR/feature-gate-default_type_parameter_fallback.rs:18:6
+   |
+18 | impl<T=i32> S<T> {}
+   |      ^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs b/src/test/ui/feature-gate-generic_param_attrs.rs
index b341f7c7825..944802f450a 100644
--- a/src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs
+++ b/src/test/ui/feature-gate-generic_param_attrs.rs
@@ -16,8 +16,6 @@
 // using `rustc_attrs` feature. There is a separate compile-fail/ test
 // ensuring that the attribute feature-gating works in this context.)
 
-// gate-test-generic_param_attrs
-
 #![feature(rustc_attrs)]
 #![allow(dead_code)]
 
diff --git a/src/test/ui/feature-gate-generic_param_attrs.stderr b/src/test/ui/feature-gate-generic_param_attrs.stderr
new file mode 100644
index 00000000000..da2e6403029
--- /dev/null
+++ b/src/test/ui/feature-gate-generic_param_attrs.stderr
@@ -0,0 +1,138 @@
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:22:13
+   |
+22 | struct StLt<#[rustc_lt_struct] 'a>(&'a u32);
+   |             ^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:24:13
+   |
+24 | struct StTy<#[rustc_ty_struct] I>(I);
+   |             ^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:27:11
+   |
+27 | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B }
+   |           ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:29:11
+   |
+29 | enum EnTy<#[rustc_ty_enum] J> { A(J), B }
+   |           ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:32:12
+   |
+32 | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; }
+   |            ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:34:12
+   |
+34 | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); }
+   |            ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:37:11
+   |
+37 | type TyLt<#[rustc_lt_type] 'd> = &'d u32;
+   |           ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:39:11
+   |
+39 | type TyTy<#[rustc_ty_type] L> = (L, );
+   |           ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:42:6
+   |
+42 | impl<#[rustc_lt_inherent] 'e> StLt<'e> { }
+   |      ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:44:6
+   |
+44 | impl<#[rustc_ty_inherent] M> StTy<M> { }
+   |      ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:47:6
+   |
+47 | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> {
+   |      ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:51:6
+   |
+51 | impl<#[rustc_ty_impl_for] N> TrTy<N> for StTy<N> {
+   |      ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:56:9
+   |
+56 | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } }
+   |         ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:58:9
+   |
+58 | fn f_ty<#[rustc_ty_fn] O>(_: O) { }
+   |         ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:62:13
+   |
+62 |     fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } }
+   |             ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on type parameter bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:64:13
+   |
+64 |     fn m_ty<#[rustc_ty_meth] P>(_: P) { }
+   |             ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: attributes on lifetime bindings are experimental (see issue #34761)
+  --> $DIR/feature-gate-generic_param_attrs.rs:69:19
+   |
+69 |     where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32
+   |                   ^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_param_attrs)] to the crate attributes to enable
+
+error: aborting due to 17 previous errors
+
diff --git a/src/test/compile-fail/i128-feature.rs b/src/test/ui/feature-gate-i128_type.rs
index e94fd14a421..ddb49a3e5d9 100644
--- a/src/test/compile-fail/i128-feature.rs
+++ b/src/test/ui/feature-gate-i128_type.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-i128_type
-
 fn test2() {
     0i128; //~ ERROR 128-bit integers are not stable
 }
diff --git a/src/test/ui/feature-gate-i128_type.stderr b/src/test/ui/feature-gate-i128_type.stderr
new file mode 100644
index 00000000000..df623cac49a
--- /dev/null
+++ b/src/test/ui/feature-gate-i128_type.stderr
@@ -0,0 +1,18 @@
+error: 128-bit integers are not stable (see issue #35118)
+  --> $DIR/feature-gate-i128_type.rs:12:5
+   |
+12 |     0i128; //~ ERROR 128-bit integers are not stable
+   |     ^^^^^
+   |
+   = help: add #![feature(i128_type)] to the crate attributes to enable
+
+error: 128-bit integers are not stable (see issue #35118)
+  --> $DIR/feature-gate-i128_type.rs:16:5
+   |
+16 |     0u128; //~ ERROR 128-bit integers are not stable
+   |     ^^^^^
+   |
+   = help: add #![feature(i128_type)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/i128-feature-2.rs b/src/test/ui/feature-gate-i128_type2.rs
index d3bd810ceb2..d3bd810ceb2 100644
--- a/src/test/compile-fail/i128-feature-2.rs
+++ b/src/test/ui/feature-gate-i128_type2.rs
diff --git a/src/test/ui/feature-gate-i128_type2.stderr b/src/test/ui/feature-gate-i128_type2.stderr
new file mode 100644
index 00000000000..26653a5739b
--- /dev/null
+++ b/src/test/ui/feature-gate-i128_type2.stderr
@@ -0,0 +1,46 @@
+error: 128-bit type is unstable (see issue #35118)
+  --> $DIR/feature-gate-i128_type2.rs:13:15
+   |
+13 | fn test1() -> i128 { //~ ERROR 128-bit type is unstable
+   |               ^^^^
+   |
+   = help: add #![feature(i128_type)] to the crate attributes to enable
+
+error: 128-bit type is unstable (see issue #35118)
+  --> $DIR/feature-gate-i128_type2.rs:17:17
+   |
+17 | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable
+   |                 ^^^^
+   |
+   = help: add #![feature(i128_type)] to the crate attributes to enable
+
+error: 128-bit type is unstable (see issue #35118)
+  --> $DIR/feature-gate-i128_type2.rs:22:12
+   |
+22 |     let x: i128 = 0; //~ ERROR 128-bit type is unstable
+   |            ^^^^
+   |
+   = help: add #![feature(i128_type)] to the crate attributes to enable
+
+error: 128-bit type is unstable (see issue #35118)
+  --> $DIR/feature-gate-i128_type2.rs:26:12
+   |
+26 |     let x: u128 = 0; //~ ERROR 128-bit type is unstable
+   |            ^^^^
+   |
+   = help: add #![feature(i128_type)] to the crate attributes to enable
+
+error[E0601]: main function not found
+
+error: repr with 128-bit type is unstable (see issue #35118)
+  --> $DIR/feature-gate-i128_type2.rs:30:1
+   |
+30 | / enum A { //~ ERROR 128-bit type is unstable
+31 | |     A(u64)
+32 | | }
+   | |_^
+   |
+   = help: add #![feature(repr128)] to the crate attributes to enable
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/compile-fail/gated-link-args.rs b/src/test/ui/feature-gate-link_args.rs
index 82f5db3042b..bd48ac673dd 100644
--- a/src/test/compile-fail/gated-link-args.rs
+++ b/src/test/ui/feature-gate-link_args.rs
@@ -12,8 +12,6 @@
 // feature gate, both when it occurs where expected (atop
 // `extern { }` blocks) and where unexpected.
 
-// gate-test-link_args
-
 // sidestep warning (which is correct, but misleading for
 // purposes of this test)
 #![allow(unused_attributes)]
diff --git a/src/test/ui/feature-gate-link_args.stderr b/src/test/ui/feature-gate-link_args.stderr
new file mode 100644
index 00000000000..d6d059007d1
--- /dev/null
+++ b/src/test/ui/feature-gate-link_args.stderr
@@ -0,0 +1,26 @@
+error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596)
+  --> $DIR/feature-gate-link_args.rs:22:1
+   |
+22 | #[link_args = "-l expected_use_case"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(link_args)] to the crate attributes to enable
+
+error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596)
+  --> $DIR/feature-gate-link_args.rs:26:1
+   |
+26 | #[link_args = "-l unexected_use_on_non_extern_item"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(link_args)] to the crate attributes to enable
+
+error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596)
+  --> $DIR/feature-gate-link_args.rs:19:1
+   |
+19 | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(link_args)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/link-cfg-gated.rs b/src/test/ui/feature-gate-link_cfg.rs
index bb6fb9e3563..27918a27caf 100644
--- a/src/test/compile-fail/link-cfg-gated.rs
+++ b/src/test/ui/feature-gate-link_cfg.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-link_cfg
-
 #[link(name = "foo", cfg(foo))]
 //~^ ERROR: is feature gated
 extern {}
diff --git a/src/test/ui/feature-gate-link_cfg.stderr b/src/test/ui/feature-gate-link_cfg.stderr
new file mode 100644
index 00000000000..bbc52bd9d20
--- /dev/null
+++ b/src/test/ui/feature-gate-link_cfg.stderr
@@ -0,0 +1,10 @@
+error: is feature gated (see issue #37406)
+  --> $DIR/feature-gate-link_cfg.rs:11:1
+   |
+11 | #[link(name = "foo", cfg(foo))]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(link_cfg)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/gated-link-llvm-intrinsics.rs b/src/test/ui/feature-gate-link_llvm_intrinsics.rs
index 681824ae71d..92a1b071437 100644
--- a/src/test/compile-fail/gated-link-llvm-intrinsics.rs
+++ b/src/test/ui/feature-gate-link_llvm_intrinsics.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-link_llvm_intrinsics
-
 extern {
     #[link_name = "llvm.sqrt.f32"]
     fn sqrt(x: f32) -> f32;
diff --git a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr
new file mode 100644
index 00000000000..b2e2caaa51a
--- /dev/null
+++ b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr
@@ -0,0 +1,10 @@
+error: linking to LLVM intrinsics is experimental (see issue #29602)
+  --> $DIR/feature-gate-link_llvm_intrinsics.rs:13:5
+   |
+13 |     fn sqrt(x: f32) -> f32;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/linkage1.rs b/src/test/ui/feature-gate-linkage.rs
index 1cf208f0215..555cc2b9a7a 100644
--- a/src/test/compile-fail/linkage1.rs
+++ b/src/test/ui/feature-gate-linkage.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-linkage
-
 extern {
     #[linkage = "extern_weak"] static foo: isize;
     //~^ ERROR: the `linkage` attribute is experimental and not portable
diff --git a/src/test/ui/feature-gate-linkage.stderr b/src/test/ui/feature-gate-linkage.stderr
new file mode 100644
index 00000000000..62d857ddf2c
--- /dev/null
+++ b/src/test/ui/feature-gate-linkage.stderr
@@ -0,0 +1,10 @@
+error: the `linkage` attribute is experimental and not portable across platforms (see issue #29603)
+  --> $DIR/feature-gate-linkage.rs:12:5
+   |
+12 |     #[linkage = "extern_weak"] static foo: isize;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(linkage)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/log-syntax-gate.rs b/src/test/ui/feature-gate-log_syntax.rs
index b9688af35dc..63c66e53c5e 100644
--- a/src/test/compile-fail/log-syntax-gate.rs
+++ b/src/test/ui/feature-gate-log_syntax.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-log_syntax
-
 fn main() {
     log_syntax!() //~ ERROR `log_syntax!` is not stable enough
 }
diff --git a/src/test/ui/feature-gate-log_syntax.stderr b/src/test/ui/feature-gate-log_syntax.stderr
new file mode 100644
index 00000000000..f1c0d305f6c
--- /dev/null
+++ b/src/test/ui/feature-gate-log_syntax.stderr
@@ -0,0 +1,10 @@
+error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598)
+  --> $DIR/feature-gate-log_syntax.rs:12:5
+   |
+12 |     log_syntax!() //~ ERROR `log_syntax!` is not stable enough
+   |     ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(log_syntax)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/log-syntax-gate2.rs b/src/test/ui/feature-gate-log_syntax2.rs
index dcbe7eefee5..dcbe7eefee5 100644
--- a/src/test/compile-fail/log-syntax-gate2.rs
+++ b/src/test/ui/feature-gate-log_syntax2.rs
diff --git a/src/test/ui/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gate-log_syntax2.stderr
new file mode 100644
index 00000000000..b1bb5557eed
--- /dev/null
+++ b/src/test/ui/feature-gate-log_syntax2.stderr
@@ -0,0 +1,10 @@
+error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598)
+  --> $DIR/feature-gate-log_syntax2.rs:14:20
+   |
+14 |     println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable
+   |                    ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(log_syntax)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/gated-naked_functions.rs b/src/test/ui/feature-gate-naked_functions.rs
index 5eb41181027..ceb475e1192 100644
--- a/src/test/compile-fail/gated-naked_functions.rs
+++ b/src/test/ui/feature-gate-naked_functions.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-naked_functions
-
 #[naked]
 //~^ the `#[naked]` attribute is an experimental feature
 fn naked() {}
diff --git a/src/test/ui/feature-gate-naked_functions.stderr b/src/test/ui/feature-gate-naked_functions.stderr
new file mode 100644
index 00000000000..9655982574c
--- /dev/null
+++ b/src/test/ui/feature-gate-naked_functions.stderr
@@ -0,0 +1,18 @@
+error: the `#[naked]` attribute is an experimental feature (see issue #32408)
+  --> $DIR/feature-gate-naked_functions.rs:11:1
+   |
+11 | #[naked]
+   | ^^^^^^^^
+   |
+   = help: add #![feature(naked_functions)] to the crate attributes to enable
+
+error: the `#[naked]` attribute is an experimental feature (see issue #32408)
+  --> $DIR/feature-gate-naked_functions.rs:15:1
+   |
+15 | #[naked]
+   | ^^^^^^^^
+   |
+   = help: add #![feature(naked_functions)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/never-disabled.rs b/src/test/ui/feature-gate-never_type.rs
index fb6b34fcbb6..11b9f412957 100644
--- a/src/test/compile-fail/never-disabled.rs
+++ b/src/test/ui/feature-gate-never_type.rs
@@ -10,8 +10,6 @@
 
 // Test that ! errors when used in illegal positions with feature(never_type) disabled
 
-// gate-test-never_type
-
 trait Foo {
     type Wub;
 }
diff --git a/src/test/ui/feature-gate-never_type.stderr b/src/test/ui/feature-gate-never_type.stderr
new file mode 100644
index 00000000000..c242e613ead
--- /dev/null
+++ b/src/test/ui/feature-gate-never_type.stderr
@@ -0,0 +1,42 @@
+error: The `!` type is experimental (see issue #35121)
+  --> $DIR/feature-gate-never_type.rs:17:17
+   |
+17 | type Ma = (u32, !, i32); //~ ERROR type is experimental
+   |                 ^
+   |
+   = help: add #![feature(never_type)] to the crate attributes to enable
+
+error: The `!` type is experimental (see issue #35121)
+  --> $DIR/feature-gate-never_type.rs:18:20
+   |
+18 | type Meeshka = Vec<!>; //~ ERROR type is experimental
+   |                    ^
+   |
+   = help: add #![feature(never_type)] to the crate attributes to enable
+
+error: The `!` type is experimental (see issue #35121)
+  --> $DIR/feature-gate-never_type.rs:19:16
+   |
+19 | type Mow = &fn(!) -> !; //~ ERROR type is experimental
+   |                ^
+   |
+   = help: add #![feature(never_type)] to the crate attributes to enable
+
+error: The `!` type is experimental (see issue #35121)
+  --> $DIR/feature-gate-never_type.rs:20:19
+   |
+20 | type Skwoz = &mut !; //~ ERROR type is experimental
+   |                   ^
+   |
+   = help: add #![feature(never_type)] to the crate attributes to enable
+
+error: The `!` type is experimental (see issue #35121)
+  --> $DIR/feature-gate-never_type.rs:23:16
+   |
+23 |     type Wub = !; //~ ERROR type is experimental
+   |                ^
+   |
+   = help: add #![feature(never_type)] to the crate attributes to enable
+
+error: aborting due to 5 previous errors
+
diff --git a/src/test/compile-fail/gated-no-core.rs b/src/test/ui/feature-gate-no_core.rs
index 66b9c2e5670..0a55a8a78ce 100644
--- a/src/test/compile-fail/gated-no-core.rs
+++ b/src/test/ui/feature-gate-no_core.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-no_core
-
 #![no_core] //~ ERROR no_core is experimental
 
 fn main() {}
diff --git a/src/test/ui/feature-gate-no_core.stderr b/src/test/ui/feature-gate-no_core.stderr
new file mode 100644
index 00000000000..02e0b176249
--- /dev/null
+++ b/src/test/ui/feature-gate-no_core.stderr
@@ -0,0 +1,10 @@
+error: no_core is experimental (see issue #29639)
+  --> $DIR/feature-gate-no_core.rs:11:1
+   |
+11 | #![no_core] //~ ERROR no_core is experimental
+   | ^^^^^^^^^^^
+   |
+   = help: add #![feature(no_core)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/gated-non-ascii-idents.rs b/src/test/ui/feature-gate-non_ascii_idents.rs
index 1dff22839ad..9e042c3a7d5 100644
--- a/src/test/compile-fail/gated-non-ascii-idents.rs
+++ b/src/test/ui/feature-gate-non_ascii_idents.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-non_ascii_idents
-
 extern crate core as bäz; //~ ERROR non-ascii idents
 
 use föö::bar; //~ ERROR non-ascii idents
diff --git a/src/test/ui/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gate-non_ascii_idents.stderr
new file mode 100644
index 00000000000..df6ce6b6162
--- /dev/null
+++ b/src/test/ui/feature-gate-non_ascii_idents.stderr
@@ -0,0 +1,122 @@
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:11:1
+   |
+11 | extern crate core as bäz; //~ ERROR non-ascii idents
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:13:5
+   |
+13 | use föö::bar; //~ ERROR non-ascii idents
+   |     ^^^^^^^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:15:1
+   |
+15 | / mod föö { //~ ERROR non-ascii idents
+16 | |     pub fn bar() {}
+17 | | }
+   | |_^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:19:1
+   |
+19 | / fn bär( //~ ERROR non-ascii idents
+20 | |     bäz: isize //~ ERROR non-ascii idents
+21 | |     ) {
+22 | |     let _ö: isize; //~ ERROR non-ascii idents
+...  |
+26 | |     }
+27 | | }
+   | |_^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:20:5
+   |
+20 |     bäz: isize //~ ERROR non-ascii idents
+   |     ^^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:22:9
+   |
+22 |     let _ö: isize; //~ ERROR non-ascii idents
+   |         ^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:25:10
+   |
+25 |         (_ä, _) => {} //~ ERROR non-ascii idents
+   |          ^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:29:1
+   |
+29 | / struct Föö { //~ ERROR non-ascii idents
+30 | |     föö: isize //~ ERROR non-ascii idents
+31 | | }
+   | |_^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:30:5
+   |
+30 |     föö: isize //~ ERROR non-ascii idents
+   |     ^^^^^^^^^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:33:1
+   |
+33 | / enum Bär { //~ ERROR non-ascii idents
+34 | |     Bäz { //~ ERROR non-ascii idents
+35 | |         qüx: isize //~ ERROR non-ascii idents
+36 | |     }
+37 | | }
+   | |_^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:34:5
+   |
+34 | /     Bäz { //~ ERROR non-ascii idents
+35 | |         qüx: isize //~ ERROR non-ascii idents
+36 | |     }
+   | |_____^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:35:9
+   |
+35 |         qüx: isize //~ ERROR non-ascii idents
+   |         ^^^^^^^^^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: non-ascii idents are not fully supported. (see issue #28979)
+  --> $DIR/feature-gate-non_ascii_idents.rs:40:5
+   |
+40 |     fn qüx();  //~ ERROR non-ascii idents
+   |     ^^^^^^^^^
+   |
+   = help: add #![feature(non_ascii_idents)] to the crate attributes to enable
+
+error: aborting due to 13 previous errors
+
diff --git a/src/test/compile-fail/gated-plugin_registrar.rs b/src/test/ui/feature-gate-plugin_registrar.rs
index 8d185d183b4..9cdebde7b7b 100644
--- a/src/test/compile-fail/gated-plugin_registrar.rs
+++ b/src/test/ui/feature-gate-plugin_registrar.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-plugin_registrar
-
 // Test that `#[plugin_registrar]` attribute is gated by `plugin_registrar`
 // feature gate.
 
diff --git a/src/test/ui/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gate-plugin_registrar.stderr
new file mode 100644
index 00000000000..3710239142a
--- /dev/null
+++ b/src/test/ui/feature-gate-plugin_registrar.stderr
@@ -0,0 +1,10 @@
+error: compiler plugins are experimental and possibly buggy (see issue #29597)
+  --> $DIR/feature-gate-plugin_registrar.rs:16:1
+   |
+16 | pub fn registrar() {}
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(plugin_registrar)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/gated-target_feature.rs b/src/test/ui/feature-gate-target_feature.rs
index 02db8a71d53..da2e41a0f5e 100644
--- a/src/test/compile-fail/gated-target_feature.rs
+++ b/src/test/ui/feature-gate-target_feature.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-target_feature
-
 #[target_feature = "+sse2"]
 //~^ the `#[target_feature]` attribute is an experimental feature
 fn foo() {}
diff --git a/src/test/ui/feature-gate-target_feature.stderr b/src/test/ui/feature-gate-target_feature.stderr
new file mode 100644
index 00000000000..8c89eabf753
--- /dev/null
+++ b/src/test/ui/feature-gate-target_feature.stderr
@@ -0,0 +1,10 @@
+error: the `#[target_feature]` attribute is an experimental feature
+  --> $DIR/feature-gate-target_feature.rs:11:1
+   |
+11 | #[target_feature = "+sse2"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(target_feature)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/gated-thread-local.rs b/src/test/ui/feature-gate-thread_local.rs
index b02ce9b7ecb..f355c6562c8 100644
--- a/src/test/compile-fail/gated-thread-local.rs
+++ b/src/test/ui/feature-gate-thread_local.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-thread_local
-
 // Test that `#[thread_local]` attribute is gated by `thread_local`
 // feature gate.
 //
diff --git a/src/test/ui/feature-gate-thread_local.stderr b/src/test/ui/feature-gate-thread_local.stderr
new file mode 100644
index 00000000000..2608018528c
--- /dev/null
+++ b/src/test/ui/feature-gate-thread_local.stderr
@@ -0,0 +1,10 @@
+error: `#[thread_local]` is an experimental feature, and does not currently handle destructors. There is no corresponding `#[task_local]` mapping to the task model (see issue #29594)
+  --> $DIR/feature-gate-thread_local.rs:18:1
+   |
+18 | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature
+   | ^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(thread_local)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/gated-trace_macros.rs b/src/test/ui/feature-gate-trace_macros.rs
index 0b85b19f176..367ee6df50d 100644
--- a/src/test/compile-fail/gated-trace_macros.rs
+++ b/src/test/ui/feature-gate-trace_macros.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-trace_macros
-
 fn main() {
     trace_macros!(true); //~ ERROR: `trace_macros` is not stable
 }
diff --git a/src/test/ui/feature-gate-trace_macros.stderr b/src/test/ui/feature-gate-trace_macros.stderr
new file mode 100644
index 00000000000..aca74099b7d
--- /dev/null
+++ b/src/test/ui/feature-gate-trace_macros.stderr
@@ -0,0 +1,10 @@
+error: `trace_macros` is not stable enough for use and is subject to change (see issue #29598)
+  --> $DIR/feature-gate-trace_macros.rs:12:5
+   |
+12 |     trace_macros!(true); //~ ERROR: `trace_macros` is not stable
+   |     ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(trace_macros)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/type-ascription-feature-gate.rs b/src/test/ui/feature-gate-type_ascription.rs
index bf4ca03069c..d3c07d653f4 100644
--- a/src/test/compile-fail/type-ascription-feature-gate.rs
+++ b/src/test/ui/feature-gate-type_ascription.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-type_ascription
-
 // Type ascription is feature gated
 
 fn main() {
diff --git a/src/test/ui/feature-gate-type_ascription.stderr b/src/test/ui/feature-gate-type_ascription.stderr
new file mode 100644
index 00000000000..d2a3ee2cf8f
--- /dev/null
+++ b/src/test/ui/feature-gate-type_ascription.stderr
@@ -0,0 +1,10 @@
+error: type ascription is experimental (see issue #23416)
+  --> $DIR/feature-gate-type_ascription.rs:14:13
+   |
+14 |     let a = 10: u8; //~ ERROR type ascription is experimental
+   |             ^^^^^^
+   |
+   = help: add #![feature(type_ascription)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/union/union-feature-gate.rs b/src/test/ui/feature-gate-untagged_unions.rs
index 8a0490cdc6b..6533fddd947 100644
--- a/src/test/compile-fail/union/union-feature-gate.rs
+++ b/src/test/ui/feature-gate-untagged_unions.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// gate-test-untagged_unions
-
 union U1 { // OK
     a: u8,
 }
diff --git a/src/test/ui/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gate-untagged_unions.stderr
new file mode 100644
index 00000000000..26b698912bc
--- /dev/null
+++ b/src/test/ui/feature-gate-untagged_unions.stderr
@@ -0,0 +1,32 @@
+error: unions with non-`Copy` fields are unstable (see issue #32836)
+  --> $DIR/feature-gate-untagged_unions.rs:19:1
+   |
+19 | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable
+20 | |     a: String,
+21 | | }
+   | |_^
+   |
+   = help: add #![feature(untagged_unions)] to the crate attributes to enable
+
+error: unions with non-`Copy` fields are unstable (see issue #32836)
+  --> $DIR/feature-gate-untagged_unions.rs:23:1
+   |
+23 | / union U4<T> { //~ ERROR unions with non-`Copy` fields are unstable
+24 | |     a: T,
+25 | | }
+   | |_^
+   |
+   = help: add #![feature(untagged_unions)] to the crate attributes to enable
+
+error: unions with `Drop` implementations are unstable (see issue #32836)
+  --> $DIR/feature-gate-untagged_unions.rs:27:1
+   |
+27 | / union U5 { //~ ERROR unions with `Drop` implementations are unstable
+28 | |     a: u8,
+29 | | }
+   | |_^
+   |
+   = help: add #![feature(untagged_unions)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/specialization/specialization-feature-gate-default.rs b/src/test/ui/specialization-feature-gate-default.rs
index 3a01ecdf9db..3a01ecdf9db 100644
--- a/src/test/compile-fail/specialization/specialization-feature-gate-default.rs
+++ b/src/test/ui/specialization-feature-gate-default.rs
diff --git a/src/test/ui/specialization-feature-gate-default.stderr b/src/test/ui/specialization-feature-gate-default.stderr
new file mode 100644
index 00000000000..e17d1308385
--- /dev/null
+++ b/src/test/ui/specialization-feature-gate-default.stderr
@@ -0,0 +1,10 @@
+error: specialization is unstable (see issue #31844)
+  --> $DIR/specialization-feature-gate-default.rs:20:5
+   |
+20 |     default fn foo(&self) {} //~ ERROR specialization is unstable
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(specialization)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/specialization/specialization-feature-gate-overlap.rs b/src/test/ui/specialization-feature-gate-overlap.rs
index 5eb48eab15e..5eb48eab15e 100644
--- a/src/test/compile-fail/specialization/specialization-feature-gate-overlap.rs
+++ b/src/test/ui/specialization-feature-gate-overlap.rs
diff --git a/src/test/ui/specialization-feature-gate-overlap.stderr b/src/test/ui/specialization-feature-gate-overlap.stderr
new file mode 100644
index 00000000000..7fe2891c908
--- /dev/null
+++ b/src/test/ui/specialization-feature-gate-overlap.stderr
@@ -0,0 +1,15 @@
+error[E0119]: conflicting implementations of trait `Foo` for type `u8`:
+  --> $DIR/specialization-feature-gate-overlap.rs:23:1
+   |
+19 | / impl<T> Foo for T {
+20 | |     fn foo(&self) {}
+21 | | }
+   | |_- first implementation here
+22 | 
+23 | / impl Foo for u8 { //~ ERROR E0119
+24 | |     fn foo(&self) {}
+25 | | }
+   | |_^ conflicting implementation for `u8`
+
+error: aborting due to previous error
+