about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-07 18:13:10 +0000
committerbors <bors@rust-lang.org>2017-12-07 18:13:10 +0000
commit9c49f401fecd8c5ef42a33a070a61daa2b911b47 (patch)
tree96000b17cb140280ee919bccbdf29b2350537115
parenta8437a0accccc4140731b1a73c13ada7305883ac (diff)
parent6dba3e68e670a3b1418b259ca5f3758444dd1a68 (diff)
downloadrust-9c49f401fecd8c5ef42a33a070a61daa2b911b47.tar.gz
rust-9c49f401fecd8c5ef42a33a070a61daa2b911b47.zip
Auto merge of #46532 - est31:master, r=est31
Allow feature-gate tests to live in ui/ and migrate most of the tests from compile-fail

The PR consists of three commits:

1. change tidy to allow feature-gate tests to live in ui/
2. migrate some feature gate tests to ui/ with renaming only
3. migrate some feature gate tests to ui/ with also removing `// gate-test-...` lines and renaming them to the standard `feature-gate-<feat-name>.rs` format.
-rw-r--r--src/test/compile-fail/no-core-gated.rs15
-rw-r--r--src/test/ui/auxiliary/cfg-target-thread-local.rs (renamed from src/test/compile-fail/auxiliary/cfg-target-thread-local.rs)0
-rw-r--r--src/test/ui/feature-gate-abi-msp430-interrupt.rs (renamed from src/test/compile-fail/feature-gate-abi-msp430-interrupt.rs)0
-rw-r--r--src/test/ui/feature-gate-abi-msp430-interrupt.stderr10
-rw-r--r--src/test/ui/feature-gate-abi.rs (renamed from src/test/compile-fail/feature-gate-abi.rs)0
-rw-r--r--src/test/ui/feature-gate-abi.stderr450
-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-advanced-slice-features.rs (renamed from src/test/compile-fail/feature-gate-advanced-slice-features.rs)0
-rw-r--r--src/test/ui/feature-gate-advanced-slice-features.stderr18
-rw-r--r--src/test/ui/feature-gate-allocator_internals.rs (renamed from src/test/compile-fail/feature-gate-allocator_internals.rs)0
-rw-r--r--src/test/ui/feature-gate-allocator_internals.stderr10
-rw-r--r--src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.rs (renamed from src/test/compile-fail/feature-gate-allow-internal-unsafe-nested-macro.rs)0
-rw-r--r--src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr13
-rw-r--r--src/test/ui/feature-gate-allow-internal-unstable-nested-macro.rs (renamed from src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs)0
-rw-r--r--src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr13
-rw-r--r--src/test/ui/feature-gate-allow-internal-unstable-struct.rs (renamed from src/test/compile-fail/feature-gate-allow-internal-unstable-struct.rs)0
-rw-r--r--src/test/ui/feature-gate-allow-internal-unstable-struct.stderr10
-rw-r--r--src/test/ui/feature-gate-allow-internal-unstable.rs (renamed from src/test/compile-fail/feature-gate-allow-internal-unstable.rs)0
-rw-r--r--src/test/ui/feature-gate-allow-internal-unstable.stderr10
-rw-r--r--src/test/ui/feature-gate-allow_fail.rs (renamed from src/test/compile-fail/feature-gate-allow_fail.rs)0
-rw-r--r--src/test/ui/feature-gate-allow_fail.stderr10
-rw-r--r--src/test/ui/feature-gate-arbitrary-self-types.rs (renamed from src/test/compile-fail/feature-gate-arbitrary-self-types.rs)0
-rw-r--r--src/test/ui/feature-gate-arbitrary-self-types.stderr29
-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-assoc-type-defaults.rs (renamed from src/test/compile-fail/feature-gate-assoc-type-defaults.rs)0
-rw-r--r--src/test/ui/feature-gate-assoc-type-defaults.stderr10
-rw-r--r--src/test/ui/feature-gate-box-expr.rs (renamed from src/test/compile-fail/feature-gate-box-expr.rs)0
-rw-r--r--src/test/ui/feature-gate-box-expr.stderr10
-rw-r--r--src/test/ui/feature-gate-box_patterns.rs (renamed from src/test/compile-fail/feature-gate-box-pat.rs)2
-rw-r--r--src/test/ui/feature-gate-box_patterns.stderr10
-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-catch_expr.rs (renamed from src/test/compile-fail/feature-gate-catch_expr.rs)0
-rw-r--r--src/test/ui/feature-gate-catch_expr.stderr14
-rw-r--r--src/test/ui/feature-gate-cfg-target-feature.rs (renamed from src/test/compile-fail/feature-gate-cfg-target-feature.rs)0
-rw-r--r--src/test/ui/feature-gate-cfg-target-feature.stderr34
-rw-r--r--src/test/ui/feature-gate-cfg-target-has-atomic.rs (renamed from src/test/compile-fail/feature-gate-cfg-target-has-atomic.rs)0
-rw-r--r--src/test/ui/feature-gate-cfg-target-has-atomic.stderr122
-rw-r--r--src/test/ui/feature-gate-cfg-target-thread-local.rs (renamed from src/test/compile-fail/feature-gate-cfg-target-thread-local.rs)0
-rw-r--r--src/test/ui/feature-gate-cfg-target-thread-local.stderr10
-rw-r--r--src/test/ui/feature-gate-cfg-target-vendor.rs (renamed from src/test/compile-fail/feature-gate-cfg-target-vendor.rs)0
-rw-r--r--src/test/ui/feature-gate-cfg-target-vendor.stderr34
-rw-r--r--src/test/ui/feature-gate-clone-closures.rs (renamed from src/test/compile-fail/feature-gate-clone-closures.rs)0
-rw-r--r--src/test/ui/feature-gate-clone-closures.stderr10
-rw-r--r--src/test/ui/feature-gate-compiler-builtins.rs (renamed from src/test/compile-fail/feature-gate-compiler-builtins.rs)0
-rw-r--r--src/test/ui/feature-gate-compiler-builtins.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-indexing.rs (renamed from src/test/compile-fail/feature-gate-const-indexing.rs)0
-rw-r--r--src/test/ui/feature-gate-const-indexing.stderr8
-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-copy-closures.rs (renamed from src/test/compile-fail/feature-gate-copy-closures.rs)0
-rw-r--r--src/test/ui/feature-gate-copy-closures.stderr12
-rw-r--r--src/test/ui/feature-gate-crate_in_paths.rs (renamed from src/test/compile-fail/rfc-2126-crate-paths/feature-gate-crate_in_paths.rs)0
-rw-r--r--src/test/ui/feature-gate-crate_in_paths.stderr10
-rw-r--r--src/test/ui/feature-gate-crate_visibility_modifier.rs (renamed from src/test/compile-fail/feature-gate-crate_visibility_modifier.rs)0
-rw-r--r--src/test/ui/feature-gate-crate_visibility_modifier.stderr10
-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-decl_macro.rs (renamed from src/test/compile-fail/feature-gate-decl_macro.rs)0
-rw-r--r--src/test/ui/feature-gate-decl_macro.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-doc_cfg.rs (renamed from src/test/compile-fail/feature-gate-doc_cfg.rs)0
-rw-r--r--src/test/ui/feature-gate-doc_cfg.stderr10
-rw-r--r--src/test/ui/feature-gate-doc_masked.rs (renamed from src/test/compile-fail/feature-gate-doc_masked.rs)0
-rw-r--r--src/test/ui/feature-gate-doc_masked.stderr10
-rw-r--r--src/test/ui/feature-gate-doc_spotlight.rs (renamed from src/test/compile-fail/feature-gate-doc_spotlight.rs)0
-rw-r--r--src/test/ui/feature-gate-doc_spotlight.stderr10
-rw-r--r--src/test/ui/feature-gate-dotdoteq_in_patterns.rs (renamed from src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs)0
-rw-r--r--src/test/ui/feature-gate-dotdoteq_in_patterns.stderr10
-rw-r--r--src/test/ui/feature-gate-dropck-ugeh-2.rs (renamed from src/test/compile-fail/feature-gate-dropck-ugeh-2.rs)0
-rw-r--r--src/test/ui/feature-gate-dropck-ugeh-2.stderr14
-rw-r--r--src/test/ui/feature-gate-dropck-ugeh.rs (renamed from src/test/compile-fail/feature-gate-dropck-ugeh.rs)0
-rw-r--r--src/test/ui/feature-gate-dropck-ugeh.stderr10
-rw-r--r--src/test/ui/feature-gate-dyn-trait.rs (renamed from src/test/compile-fail/feature-gate-dyn-trait.rs)0
-rw-r--r--src/test/ui/feature-gate-dyn-trait.stderr10
-rw-r--r--src/test/ui/feature-gate-exclusive-range-pattern.rs (renamed from src/test/compile-fail/feature-gate-exclusive-range-pattern.rs)0
-rw-r--r--src/test/ui/feature-gate-exclusive-range-pattern.stderr10
-rw-r--r--src/test/ui/feature-gate-extern_types.rs (renamed from src/test/compile-fail/feature-gate-extern_types.rs)0
-rw-r--r--src/test/ui/feature-gate-extern_types.stderr10
-rw-r--r--src/test/ui/feature-gate-external_doc.rs (renamed from src/test/compile-fail/feature-gate-external_doc.rs)0
-rw-r--r--src/test/ui/feature-gate-external_doc.stderr10
-rw-r--r--src/test/ui/feature-gate-feature-gate.rs (renamed from src/test/compile-fail/feature-gate-feature-gate.rs)0
-rw-r--r--src/test/ui/feature-gate-feature-gate.stderr14
-rw-r--r--src/test/ui/feature-gate-fn_must_use-cap-lints-allow.rs (renamed from src/test/compile-fail/feature-gate-fn_must_use-cap-lints-allow.rs)0
-rw-r--r--src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr6
-rw-r--r--src/test/ui/feature-gate-fn_must_use.rs (renamed from src/test/compile-fail/feature-gate-fn_must_use.rs)0
-rw-r--r--src/test/ui/feature-gate-fn_must_use.stderr22
-rw-r--r--src/test/ui/feature-gate-fundamental.rs (renamed from src/test/compile-fail/feature-gate-fundamental.rs)0
-rw-r--r--src/test/ui/feature-gate-fundamental.stderr10
-rw-r--r--src/test/ui/feature-gate-generators.rs (renamed from src/test/compile-fail/feature-gate-generators.rs)0
-rw-r--r--src/test/ui/feature-gate-generators.stderr10
-rw-r--r--src/test/ui/feature-gate-generic_associated_types.rs (renamed from src/test/compile-fail/feature-gate-generic_associated_types.rs)0
-rw-r--r--src/test/ui/feature-gate-generic_associated_types.stderr34
-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-global_allocator.rs (renamed from src/test/compile-fail/feature-gate-global_allocator.rs)0
-rw-r--r--src/test/ui/feature-gate-global_allocator.stderr10
-rw-r--r--src/test/ui/feature-gate-global_asm.rs (renamed from src/test/compile-fail/feature-gate-global_asm.rs)0
-rw-r--r--src/test/ui/feature-gate-global_asm.stderr10
-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-in_band_lifetimes.rs (renamed from src/test/compile-fail/feature-gate-in_band_lifetimes.rs)0
-rw-r--r--src/test/ui/feature-gate-in_band_lifetimes.stderr104
-rw-r--r--src/test/ui/feature-gate-intrinsics.rs (renamed from src/test/compile-fail/feature-gate-intrinsics.rs)0
-rw-r--r--src/test/ui/feature-gate-intrinsics.stderr21
-rw-r--r--src/test/ui/feature-gate-lang-items.rs (renamed from src/test/compile-fail/feature-gate-lang-items.rs)0
-rw-r--r--src/test/ui/feature-gate-lang-items.stderr10
-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-linker-flavor.rs (renamed from src/test/compile-fail/feature-gate-linker-flavor.rs)0
-rw-r--r--src/test/ui/feature-gate-linker-flavor.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-macro-vis-matcher.rs (renamed from src/test/compile-fail/feature-gate-macro-vis-matcher.rs)0
-rw-r--r--src/test/ui/feature-gate-macro-vis-matcher.stderr10
-rw-r--r--src/test/ui/feature-gate-main.rs (renamed from src/test/compile-fail/feature-gate-main.rs)0
-rw-r--r--src/test/ui/feature-gate-main.stderr10
-rw-r--r--src/test/ui/feature-gate-match_beginning_vert.rs (renamed from src/test/compile-fail/feature-gate-match_beginning_vert.rs)0
-rw-r--r--src/test/ui/feature-gate-match_beginning_vert.stderr26
-rw-r--r--src/test/ui/feature-gate-match_default_bindings.rs (renamed from src/test/compile-fail/feature-gate-match_default_bindings.rs)0
-rw-r--r--src/test/ui/feature-gate-match_default_bindings.stderr10
-rw-r--r--src/test/ui/feature-gate-may-dangle.rs (renamed from src/test/compile-fail/feature-gate-may-dangle.rs)0
-rw-r--r--src/test/ui/feature-gate-may-dangle.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-needs-allocator.rs (renamed from src/test/compile-fail/feature-gate-needs-allocator.rs)0
-rw-r--r--src/test/ui/feature-gate-needs-allocator.stderr10
-rw-r--r--src/test/ui/feature-gate-negate-unsigned.rs (renamed from src/test/compile-fail/feature-gate-negate-unsigned.rs)0
-rw-r--r--src/test/ui/feature-gate-negate-unsigned.stderr14
-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-debug-2.rs (renamed from src/test/compile-fail/feature-gate-no-debug-2.rs)0
-rw-r--r--src/test/ui/feature-gate-no-debug-2.stderr14
-rw-r--r--src/test/ui/feature-gate-no-debug.rs (renamed from src/test/compile-fail/feature-gate-no-debug.rs)0
-rw-r--r--src/test/ui/feature-gate-no-debug.stderr10
-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-non_exhaustive.rs (renamed from src/test/compile-fail/feature-gate-non_exhaustive.rs)0
-rw-r--r--src/test/ui/feature-gate-non_exhaustive.stderr10
-rw-r--r--src/test/ui/feature-gate-omit-gdb-pretty-printer-section.rs (renamed from src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs)0
-rw-r--r--src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr10
-rw-r--r--src/test/ui/feature-gate-on-unimplemented.rs (renamed from src/test/compile-fail/feature-gate-on-unimplemented.rs)0
-rw-r--r--src/test/ui/feature-gate-on-unimplemented.stderr10
-rw-r--r--src/test/ui/feature-gate-optin-builtin-traits.rs (renamed from src/test/compile-fail/feature-gate-optin-builtin-traits.rs)0
-rw-r--r--src/test/ui/feature-gate-optin-builtin-traits.stderr26
-rw-r--r--src/test/ui/feature-gate-overlapping_marker_traits.rs (renamed from src/test/compile-fail/feature-gate-overlapping_marker_traits.rs)0
-rw-r--r--src/test/ui/feature-gate-overlapping_marker_traits.stderr10
-rw-r--r--src/test/ui/feature-gate-placement-expr.rs (renamed from src/test/compile-fail/feature-gate-placement-expr.rs)0
-rw-r--r--src/test/ui/feature-gate-placement-expr.stderr10
-rw-r--r--src/test/ui/feature-gate-plugin.rs (renamed from src/test/compile-fail/feature-gate-plugin.rs)0
-rw-r--r--src/test/ui/feature-gate-plugin.stderr10
-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-prelude_import.rs (renamed from src/test/compile-fail/feature-gate-prelude_import.rs)0
-rw-r--r--src/test/ui/feature-gate-prelude_import.stderr10
-rw-r--r--src/test/ui/feature-gate-profiler-runtime.rs (renamed from src/test/compile-fail/feature-gate-profiler-runtime.rs)0
-rw-r--r--src/test/ui/feature-gate-profiler-runtime.stderr10
-rw-r--r--src/test/ui/feature-gate-repr-simd.rs (renamed from src/test/compile-fail/feature-gate-repr-simd.rs)0
-rw-r--r--src/test/ui/feature-gate-repr-simd.stderr10
-rw-r--r--src/test/ui/feature-gate-repr128.rs (renamed from src/test/compile-fail/feature-gate-repr128.rs)0
-rw-r--r--src/test/ui/feature-gate-repr128.stderr13
-rw-r--r--src/test/ui/feature-gate-repr_align.rs (renamed from src/test/compile-fail/feature-gate-repr_align.rs)0
-rw-r--r--src/test/ui/feature-gate-repr_align.stderr10
-rw-r--r--src/test/ui/feature-gate-rustc-attrs.rs (renamed from src/test/compile-fail/feature-gate-rustc-attrs.rs)0
-rw-r--r--src/test/ui/feature-gate-rustc-attrs.stderr26
-rw-r--r--src/test/ui/feature-gate-rustc-diagnostic-macros.rs (renamed from src/test/compile-fail/feature-gate-rustc-diagnostic-macros.rs)0
-rw-r--r--src/test/ui/feature-gate-rustc-diagnostic-macros.stderr20
-rw-r--r--src/test/ui/feature-gate-rustc_const_unstable.rs (renamed from src/test/compile-fail/feature-gate-rustc_const_unstable.rs)0
-rw-r--r--src/test/ui/feature-gate-rustc_const_unstable.stderr10
-rw-r--r--src/test/ui/feature-gate-sanitizer-runtime.rs (renamed from src/test/compile-fail/feature-gate-sanitizer-runtime.rs)0
-rw-r--r--src/test/ui/feature-gate-sanitizer-runtime.stderr10
-rw-r--r--src/test/ui/feature-gate-simd-ffi.rs (renamed from src/test/compile-fail/feature-gate-simd-ffi.rs)0
-rw-r--r--src/test/ui/feature-gate-simd-ffi.stderr18
-rw-r--r--src/test/ui/feature-gate-simd.rs (renamed from src/test/compile-fail/feature-gate-simd.rs)0
-rw-r--r--src/test/ui/feature-gate-simd.stderr10
-rw-r--r--src/test/ui/feature-gate-slice-patterns.rs (renamed from src/test/compile-fail/feature-gate-slice-patterns.rs)0
-rw-r--r--src/test/ui/feature-gate-slice-patterns.stderr10
-rw-r--r--src/test/ui/feature-gate-staged_api.rs (renamed from src/test/compile-fail/feature-gate-staged_api.rs)0
-rw-r--r--src/test/ui/feature-gate-staged_api.stderr14
-rw-r--r--src/test/ui/feature-gate-start.rs (renamed from src/test/compile-fail/feature-gate-start.rs)0
-rw-r--r--src/test/ui/feature-gate-start.stderr10
-rw-r--r--src/test/ui/feature-gate-static-nobundle.rs (renamed from src/test/compile-fail/feature-gate-static-nobundle.rs)0
-rw-r--r--src/test/ui/feature-gate-static-nobundle.stderr10
-rw-r--r--src/test/ui/feature-gate-stmt_expr_attributes.rs (renamed from src/test/compile-fail/feature-gate-stmt_expr_attributes.rs)0
-rw-r--r--src/test/ui/feature-gate-stmt_expr_attributes.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-unboxed-closures-manual-impls.rs (renamed from src/test/compile-fail/feature-gate-unboxed-closures-manual-impls.rs)0
-rw-r--r--src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr34
-rw-r--r--src/test/ui/feature-gate-unboxed-closures-method-calls.rs (renamed from src/test/compile-fail/feature-gate-unboxed-closures-method-calls.rs)0
-rw-r--r--src/test/ui/feature-gate-unboxed-closures-method-calls.stderr26
-rw-r--r--src/test/ui/feature-gate-unboxed-closures-ufcs-calls.rs (renamed from src/test/compile-fail/feature-gate-unboxed-closures-ufcs-calls.rs)0
-rw-r--r--src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr26
-rw-r--r--src/test/ui/feature-gate-unboxed-closures.rs (renamed from src/test/compile-fail/feature-gate-unboxed-closures.rs)0
-rw-r--r--src/test/ui/feature-gate-unboxed-closures.stderr12
-rw-r--r--src/test/ui/feature-gate-underscore-lifetimes.rs (renamed from src/test/compile-fail/feature-gate-underscore-lifetimes.rs)0
-rw-r--r--src/test/ui/feature-gate-underscore-lifetimes.stderr10
-rw-r--r--src/test/ui/feature-gate-universal.rs (renamed from src/test/compile-fail/impl-trait/feature-gate-universal.rs)0
-rw-r--r--src/test/ui/feature-gate-universal.stderr10
-rw-r--r--src/test/ui/feature-gate-unsized_tuple_coercion.rs (renamed from src/test/compile-fail/feature-gate-unsized_tuple_coercion.rs)0
-rw-r--r--src/test/ui/feature-gate-unsized_tuple_coercion.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/feature-gate-unwind-attributes.rs (renamed from src/test/compile-fail/feature-gate-unwind-attributes.rs)0
-rw-r--r--src/test/ui/feature-gate-unwind-attributes.stderr10
-rw-r--r--src/test/ui/feature-gate-use_nested_groups.rs (renamed from src/test/compile-fail/feature-gate-use_nested_groups.rs)0
-rw-r--r--src/test/ui/feature-gate-use_nested_groups.stderr26
-rw-r--r--src/test/ui/feature-gate-used.rs (renamed from src/test/compile-fail/feature-gate-used.rs)0
-rw-r--r--src/test/ui/feature-gate-used.stderr10
-rw-r--r--src/test/ui/feature-gate-wasm_import_memory.rs (renamed from src/test/compile-fail/feature-gate-wasm_import_memory.rs)0
-rw-r--r--src/test/ui/feature-gate-wasm_import_memory.stderr10
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-bench.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-bench.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr4
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-builtin-attrs.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr1354
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-deprecated.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr8
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-derive-2.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-derive-2.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr20
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-derive.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-derive.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr38
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-inline.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr43
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_escape.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr12
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_use.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr20
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-proc_macro_derive.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr40
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr46
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-stable.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr46
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-test.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-test.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-test.stderr4
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-unstable.rs (renamed from src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs)0
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr46
-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
-rw-r--r--src/tools/tidy/src/features.rs10
277 files changed, 4534 insertions, 73 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/auxiliary/cfg-target-thread-local.rs b/src/test/ui/auxiliary/cfg-target-thread-local.rs
index d1971a5e1ae..d1971a5e1ae 100644
--- a/src/test/compile-fail/auxiliary/cfg-target-thread-local.rs
+++ b/src/test/ui/auxiliary/cfg-target-thread-local.rs
diff --git a/src/test/compile-fail/feature-gate-abi-msp430-interrupt.rs b/src/test/ui/feature-gate-abi-msp430-interrupt.rs
index 030e37475c0..030e37475c0 100644
--- a/src/test/compile-fail/feature-gate-abi-msp430-interrupt.rs
+++ b/src/test/ui/feature-gate-abi-msp430-interrupt.rs
diff --git a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr
new file mode 100644
index 00000000000..b05be6e4391
--- /dev/null
+++ b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr
@@ -0,0 +1,10 @@
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi-msp430-interrupt.rs:14:1
+   |
+14 | extern "msp430-interrupt" fn foo() {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-abi.rs b/src/test/ui/feature-gate-abi.rs
index 45c715f51fe..45c715f51fe 100644
--- a/src/test/compile-fail/feature-gate-abi.rs
+++ b/src/test/ui/feature-gate-abi.rs
diff --git a/src/test/ui/feature-gate-abi.stderr b/src/test/ui/feature-gate-abi.stderr
new file mode 100644
index 00000000000..7d2ad0be391
--- /dev/null
+++ b/src/test/ui/feature-gate-abi.stderr
@@ -0,0 +1,450 @@
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:19:1
+   |
+19 | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:20:1
+   |
+20 | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:21:1
+   |
+21 | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:22:1
+   |
+22 | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:23:1
+   |
+23 | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:24:1
+   |
+24 | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:25:1
+   |
+25 | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:26:1
+   |
+26 | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:30:5
+   |
+30 |     extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:31:5
+   |
+31 |     extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:32:5
+   |
+32 |     extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:33:5
+   |
+33 |     extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:34:5
+   |
+34 |     extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:35:5
+   |
+35 |     extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:36:5
+   |
+36 |     extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:37:5
+   |
+37 |     extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:39:5
+   |
+39 |     extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:40:5
+   |
+40 |     extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:41:5
+   |
+41 |     extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:42:5
+   |
+42 |     extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:43:5
+   |
+43 |     extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:44:5
+   |
+44 |     extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:45:5
+   |
+45 |     extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:46:5
+   |
+46 |     extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:53:5
+   |
+53 |     extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:54:5
+   |
+54 |     extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:55:5
+   |
+55 |     extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:56:5
+   |
+56 |     extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:57:5
+   |
+57 |     extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:58:5
+   |
+58 |     extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:59:5
+   |
+59 |     extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:60:5
+   |
+60 |     extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:65:5
+   |
+65 |     extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:66:5
+   |
+66 |     extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:67:5
+   |
+67 |     extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:68:5
+   |
+68 |     extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:69:5
+   |
+69 |     extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:70:5
+   |
+70 |     extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:71:5
+   |
+71 |     extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:72:5
+   |
+72 |     extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:76:11
+   |
+76 | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:77:11
+   |
+77 | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:78:11
+   |
+78 | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:79:11
+   |
+79 | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change
+   |           ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:80:11
+   |
+80 | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:81:11
+   |
+81 | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:82:11
+   |
+82 | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:83:11
+   |
+83 | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change
+   |           ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-abi.rs:86:1
+   |
+86 | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: platform intrinsics are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-abi.rs:87:1
+   |
+87 | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(platform_intrinsics)] to the crate attributes to enable
+
+error: vectorcall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:88:1
+   |
+88 | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_vectorcall)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-abi.rs:89:1
+   |
+89 | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: msp430-interrupt ABI is experimental and subject to change (see issue #38487)
+  --> $DIR/feature-gate-abi.rs:90:1
+   |
+90 | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable
+
+error: PTX ABIs are experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:91:1
+   |
+91 | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_ptx)] to the crate attributes to enable
+
+error: x86-interrupt ABI is experimental and subject to change (see issue #40180)
+  --> $DIR/feature-gate-abi.rs:92:1
+   |
+92 | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable
+
+error: thiscall is experimental and subject to change
+  --> $DIR/feature-gate-abi.rs:93:1
+   |
+93 | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change
+   | ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(abi_thiscall)] to the crate attributes to enable
+
+error: aborting due to 56 previous errors
+
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/feature-gate-advanced-slice-features.rs b/src/test/ui/feature-gate-advanced-slice-features.rs
index dc9b4e634ab..dc9b4e634ab 100644
--- a/src/test/compile-fail/feature-gate-advanced-slice-features.rs
+++ b/src/test/ui/feature-gate-advanced-slice-features.rs
diff --git a/src/test/ui/feature-gate-advanced-slice-features.stderr b/src/test/ui/feature-gate-advanced-slice-features.stderr
new file mode 100644
index 00000000000..815593d07a5
--- /dev/null
+++ b/src/test/ui/feature-gate-advanced-slice-features.stderr
@@ -0,0 +1,18 @@
+error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121)
+  --> $DIR/feature-gate-advanced-slice-features.rs:18:9
+   |
+18 |         [ xs.., 4, 5 ] => {}    //~ ERROR multiple-element slice matches
+   |         ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable
+
+error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121)
+  --> $DIR/feature-gate-advanced-slice-features.rs:19:9
+   |
+19 |         [ 1, xs.., 5 ] => {}    //~ ERROR multiple-element slice matches
+   |         ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-allocator_internals.rs b/src/test/ui/feature-gate-allocator_internals.rs
index b519a985ec5..b519a985ec5 100644
--- a/src/test/compile-fail/feature-gate-allocator_internals.rs
+++ b/src/test/ui/feature-gate-allocator_internals.rs
diff --git a/src/test/ui/feature-gate-allocator_internals.stderr b/src/test/ui/feature-gate-allocator_internals.stderr
new file mode 100644
index 00000000000..f1f4705b3bb
--- /dev/null
+++ b/src/test/ui/feature-gate-allocator_internals.stderr
@@ -0,0 +1,10 @@
+error: the `#[default_lib_allocator]` attribute is an experimental feature
+  --> $DIR/feature-gate-allocator_internals.rs:11:1
+   |
+11 | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(allocator_internals)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-allow-internal-unsafe-nested-macro.rs b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.rs
index 590dc619f2f..590dc619f2f 100644
--- a/src/test/compile-fail/feature-gate-allow-internal-unsafe-nested-macro.rs
+++ b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.rs
diff --git a/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr
new file mode 100644
index 00000000000..40bdde37ee8
--- /dev/null
+++ b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr
@@ -0,0 +1,13 @@
+error: allow_internal_unsafe side-steps the unsafe_code lint
+  --> $DIR/feature-gate-allow-internal-unsafe-nested-macro.rs:18:9
+   |
+18 |         #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+...
+25 | bar!();
+   | ------- in this macro invocation
+   |
+   = help: add #![feature(allow_internal_unsafe)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.rs
index 9af501b1419..9af501b1419 100644
--- a/src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs
+++ b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.rs
diff --git a/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr
new file mode 100644
index 00000000000..60d72fbc3b3
--- /dev/null
+++ b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr
@@ -0,0 +1,13 @@
+error: allow_internal_unstable side-steps feature gating and stability checks
+  --> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:18:9
+   |
+18 |         #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+25 | bar!();
+   | ------- in this macro invocation
+   |
+   = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-allow-internal-unstable-struct.rs b/src/test/ui/feature-gate-allow-internal-unstable-struct.rs
index b186278ef8b..b186278ef8b 100644
--- a/src/test/compile-fail/feature-gate-allow-internal-unstable-struct.rs
+++ b/src/test/ui/feature-gate-allow-internal-unstable-struct.rs
diff --git a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr
new file mode 100644
index 00000000000..2fb86ce8f4e
--- /dev/null
+++ b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr
@@ -0,0 +1,10 @@
+error: allow_internal_unstable side-steps feature gating and stability checks
+  --> $DIR/feature-gate-allow-internal-unstable-struct.rs:14:1
+   |
+14 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-allow-internal-unstable.rs b/src/test/ui/feature-gate-allow-internal-unstable.rs
index 61a362cb37f..61a362cb37f 100644
--- a/src/test/compile-fail/feature-gate-allow-internal-unstable.rs
+++ b/src/test/ui/feature-gate-allow-internal-unstable.rs
diff --git a/src/test/ui/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gate-allow-internal-unstable.stderr
new file mode 100644
index 00000000000..a5740a1a789
--- /dev/null
+++ b/src/test/ui/feature-gate-allow-internal-unstable.stderr
@@ -0,0 +1,10 @@
+error: allow_internal_unstable side-steps feature gating and stability checks
+  --> $DIR/feature-gate-allow-internal-unstable.rs:13:1
+   |
+13 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-allow_fail.rs b/src/test/ui/feature-gate-allow_fail.rs
index 11247402809..11247402809 100644
--- a/src/test/compile-fail/feature-gate-allow_fail.rs
+++ b/src/test/ui/feature-gate-allow_fail.rs
diff --git a/src/test/ui/feature-gate-allow_fail.stderr b/src/test/ui/feature-gate-allow_fail.stderr
new file mode 100644
index 00000000000..65cd137459a
--- /dev/null
+++ b/src/test/ui/feature-gate-allow_fail.stderr
@@ -0,0 +1,10 @@
+error: allow_fail attribute is currently unstable (see issue #42219)
+  --> $DIR/feature-gate-allow_fail.rs:13:1
+   |
+13 | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable
+   | ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(allow_fail)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-arbitrary-self-types.rs b/src/test/ui/feature-gate-arbitrary-self-types.rs
index ff0306f1993..ff0306f1993 100644
--- a/src/test/compile-fail/feature-gate-arbitrary-self-types.rs
+++ b/src/test/ui/feature-gate-arbitrary-self-types.rs
diff --git a/src/test/ui/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gate-arbitrary-self-types.stderr
new file mode 100644
index 00000000000..2ef517cc9e1
--- /dev/null
+++ b/src/test/ui/feature-gate-arbitrary-self-types.stderr
@@ -0,0 +1,29 @@
+error: arbitrary `self` types are unstable (see issue #44874)
+  --> $DIR/feature-gate-arbitrary-self-types.rs:14:18
+   |
+14 |     fn foo(self: Rc<Box<Self>>); //~ ERROR arbitrary `self` types are unstable
+   |                  ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable
+   = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
+
+error: arbitrary `self` types are unstable (see issue #44874)
+  --> $DIR/feature-gate-arbitrary-self-types.rs:20:18
+   |
+20 |     fn foo(self: Rc<Box<Self>>) {} //~ ERROR arbitrary `self` types are unstable
+   |                  ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable
+   = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
+
+error: arbitrary `self` types are unstable (see issue #44874)
+  --> $DIR/feature-gate-arbitrary-self-types.rs:24:18
+   |
+24 |     fn bar(self: Box<Rc<Self>>) {} //~ ERROR arbitrary `self` types are unstable
+   |                  ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable
+   = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box<Self>`
+
+error: aborting due to 3 previous errors
+
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/compile-fail/feature-gate-assoc-type-defaults.rs b/src/test/ui/feature-gate-assoc-type-defaults.rs
index de3521eb0f2..de3521eb0f2 100644
--- a/src/test/compile-fail/feature-gate-assoc-type-defaults.rs
+++ b/src/test/ui/feature-gate-assoc-type-defaults.rs
diff --git a/src/test/ui/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gate-assoc-type-defaults.stderr
new file mode 100644
index 00000000000..5e288469168
--- /dev/null
+++ b/src/test/ui/feature-gate-assoc-type-defaults.stderr
@@ -0,0 +1,10 @@
+error: associated type defaults are unstable (see issue #29661)
+  --> $DIR/feature-gate-assoc-type-defaults.rs:14:5
+   |
+14 |     type Bar = u8; //~ ERROR associated type defaults are unstable
+   |     ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(associated_type_defaults)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-box-expr.rs b/src/test/ui/feature-gate-box-expr.rs
index 65d437d0c0d..65d437d0c0d 100644
--- a/src/test/compile-fail/feature-gate-box-expr.rs
+++ b/src/test/ui/feature-gate-box-expr.rs
diff --git a/src/test/ui/feature-gate-box-expr.stderr b/src/test/ui/feature-gate-box-expr.stderr
new file mode 100644
index 00000000000..cef5adbd15a
--- /dev/null
+++ b/src/test/ui/feature-gate-box-expr.stderr
@@ -0,0 +1,10 @@
+error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779)
+  --> $DIR/feature-gate-box-expr.rs:22:13
+   |
+22 |     let x = box 'c'; //~ ERROR box expression syntax is experimental
+   |             ^^^^^^^
+   |
+   = help: add #![feature(box_syntax)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-box-pat.rs b/src/test/ui/feature-gate-box_patterns.rs
index c30f3952dbf..e64081823e7 100644
--- a/src/test/compile-fail/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_patterns.stderr b/src/test/ui/feature-gate-box_patterns.stderr
new file mode 100644
index 00000000000..0a30de58a1f
--- /dev/null
+++ b/src/test/ui/feature-gate-box_patterns.stderr
@@ -0,0 +1,10 @@
+error: box pattern syntax is experimental (see issue #29641)
+  --> $DIR/feature-gate-box_patterns.rs:12:9
+   |
+12 |     let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
+   |         ^^^^^
+   |
+   = help: add #![feature(box_patterns)] to the crate attributes to enable
+
+error: aborting due to previous error
+
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/feature-gate-catch_expr.rs b/src/test/ui/feature-gate-catch_expr.rs
index 5568a5cf0aa..5568a5cf0aa 100644
--- a/src/test/compile-fail/feature-gate-catch_expr.rs
+++ b/src/test/ui/feature-gate-catch_expr.rs
diff --git a/src/test/ui/feature-gate-catch_expr.stderr b/src/test/ui/feature-gate-catch_expr.stderr
new file mode 100644
index 00000000000..f486373d225
--- /dev/null
+++ b/src/test/ui/feature-gate-catch_expr.stderr
@@ -0,0 +1,14 @@
+error: `catch` expression is experimental (see issue #31436)
+  --> $DIR/feature-gate-catch_expr.rs:12:24
+   |
+12 |       let catch_result = do catch { //~ ERROR `catch` expression is experimental
+   |  ________________________^
+13 | |         let x = 5;
+14 | |         x
+15 | |     };
+   | |_____^
+   |
+   = help: add #![feature(catch_expr)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-cfg-target-feature.rs b/src/test/ui/feature-gate-cfg-target-feature.rs
index 7832e1c7c51..7832e1c7c51 100644
--- a/src/test/compile-fail/feature-gate-cfg-target-feature.rs
+++ b/src/test/ui/feature-gate-cfg-target-feature.rs
diff --git a/src/test/ui/feature-gate-cfg-target-feature.stderr b/src/test/ui/feature-gate-cfg-target-feature.stderr
new file mode 100644
index 00000000000..60dc6fbb57e
--- /dev/null
+++ b/src/test/ui/feature-gate-cfg-target-feature.stderr
@@ -0,0 +1,34 @@
+error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
+  --> $DIR/feature-gate-cfg-target-feature.rs:12:12
+   |
+12 | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_feature)] to the crate attributes to enable
+
+error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
+  --> $DIR/feature-gate-cfg-target-feature.rs:11:7
+   |
+11 | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental
+   |       ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_feature)] to the crate attributes to enable
+
+error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
+  --> $DIR/feature-gate-cfg-target-feature.rs:15:19
+   |
+15 | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental
+   |                   ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_feature)] to the crate attributes to enable
+
+error: `cfg(target_feature)` is experimental and subject to change (see issue #29717)
+  --> $DIR/feature-gate-cfg-target-feature.rs:19:10
+   |
+19 |     cfg!(target_feature = "x");
+   |          ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_feature)] to the crate attributes to enable
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-cfg-target-has-atomic.rs b/src/test/ui/feature-gate-cfg-target-has-atomic.rs
index aa27f8922c0..aa27f8922c0 100644
--- a/src/test/compile-fail/feature-gate-cfg-target-has-atomic.rs
+++ b/src/test/ui/feature-gate-cfg-target-has-atomic.rs
diff --git a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr
new file mode 100644
index 00000000000..5daf5de7123
--- /dev/null
+++ b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr
@@ -0,0 +1,122 @@
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:23:7
+   |
+23 | #[cfg(target_has_atomic = "8")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:29:7
+   |
+29 | #[cfg(target_has_atomic = "8")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:34:7
+   |
+34 | #[cfg(target_has_atomic = "16")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:39:7
+   |
+39 | #[cfg(target_has_atomic = "16")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:44:7
+   |
+44 | #[cfg(target_has_atomic = "32")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:49:7
+   |
+49 | #[cfg(target_has_atomic = "32")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:54:7
+   |
+54 | #[cfg(target_has_atomic = "64")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:59:7
+   |
+59 | #[cfg(target_has_atomic = "64")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:64:7
+   |
+64 | #[cfg(target_has_atomic = "ptr")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:69:7
+   |
+69 | #[cfg(target_has_atomic = "ptr")]
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:76:10
+   |
+76 |     cfg!(target_has_atomic = "8");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10
+   |
+78 |     cfg!(target_has_atomic = "16");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10
+   |
+80 |     cfg!(target_has_atomic = "32");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10
+   |
+82 |     cfg!(target_has_atomic = "64");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976)
+  --> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10
+   |
+84 |     cfg!(target_has_atomic = "ptr");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable
+
+error: aborting due to 15 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-cfg-target-thread-local.rs b/src/test/ui/feature-gate-cfg-target-thread-local.rs
index 985bd8320e0..985bd8320e0 100644
--- a/src/test/compile-fail/feature-gate-cfg-target-thread-local.rs
+++ b/src/test/ui/feature-gate-cfg-target-thread-local.rs
diff --git a/src/test/ui/feature-gate-cfg-target-thread-local.stderr b/src/test/ui/feature-gate-cfg-target-thread-local.stderr
new file mode 100644
index 00000000000..9e2eea6e0a4
--- /dev/null
+++ b/src/test/ui/feature-gate-cfg-target-thread-local.stderr
@@ -0,0 +1,10 @@
+error: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594)
+  --> $DIR/feature-gate-cfg-target-thread-local.rs:19:16
+   |
+19 |     #[cfg_attr(target_thread_local, thread_local)]
+   |                ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_thread_local)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-cfg-target-vendor.rs b/src/test/ui/feature-gate-cfg-target-vendor.rs
index e68a84d3553..e68a84d3553 100644
--- a/src/test/compile-fail/feature-gate-cfg-target-vendor.rs
+++ b/src/test/ui/feature-gate-cfg-target-vendor.rs
diff --git a/src/test/ui/feature-gate-cfg-target-vendor.stderr b/src/test/ui/feature-gate-cfg-target-vendor.stderr
new file mode 100644
index 00000000000..c5709600dba
--- /dev/null
+++ b/src/test/ui/feature-gate-cfg-target-vendor.stderr
@@ -0,0 +1,34 @@
+error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
+  --> $DIR/feature-gate-cfg-target-vendor.rs:12:12
+   |
+12 | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental
+   |            ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
+
+error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
+  --> $DIR/feature-gate-cfg-target-vendor.rs:11:7
+   |
+11 | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental
+   |       ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
+
+error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
+  --> $DIR/feature-gate-cfg-target-vendor.rs:15:19
+   |
+15 | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental
+   |                   ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
+
+error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718)
+  --> $DIR/feature-gate-cfg-target-vendor.rs:19:10
+   |
+19 |     cfg!(target_vendor = "x");
+   |          ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-clone-closures.rs b/src/test/ui/feature-gate-clone-closures.rs
index a15153ea7bf..a15153ea7bf 100644
--- a/src/test/compile-fail/feature-gate-clone-closures.rs
+++ b/src/test/ui/feature-gate-clone-closures.rs
diff --git a/src/test/ui/feature-gate-clone-closures.stderr b/src/test/ui/feature-gate-clone-closures.stderr
new file mode 100644
index 00000000000..3e07aa17440
--- /dev/null
+++ b/src/test/ui/feature-gate-clone-closures.stderr
@@ -0,0 +1,10 @@
+error[E0599]: no method named `clone` found for type `[closure@$DIR/feature-gate-clone-closures.rs:16:17: 18:6 a:_]` in the current scope
+  --> $DIR/feature-gate-clone-closures.rs:20:23
+   |
+20 |     let hello = hello.clone(); //~ ERROR no method named `clone` found for type
+   |                       ^^^^^
+   |
+   = note: hello is a function, perhaps you wish to call it
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-compiler-builtins.rs b/src/test/ui/feature-gate-compiler-builtins.rs
index f9334f1d3b0..f9334f1d3b0 100644
--- a/src/test/compile-fail/feature-gate-compiler-builtins.rs
+++ b/src/test/ui/feature-gate-compiler-builtins.rs
diff --git a/src/test/ui/feature-gate-compiler-builtins.stderr b/src/test/ui/feature-gate-compiler-builtins.stderr
new file mode 100644
index 00000000000..ebf42b2bdd8
--- /dev/null
+++ b/src/test/ui/feature-gate-compiler-builtins.stderr
@@ -0,0 +1,10 @@
+error: the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable
+  --> $DIR/feature-gate-compiler-builtins.rs:11:1
+   |
+11 | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(compiler_builtins)] 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/feature-gate-const-indexing.rs b/src/test/ui/feature-gate-const-indexing.rs
index 0d61878cd80..0d61878cd80 100644
--- a/src/test/compile-fail/feature-gate-const-indexing.rs
+++ b/src/test/ui/feature-gate-const-indexing.rs
diff --git a/src/test/ui/feature-gate-const-indexing.stderr b/src/test/ui/feature-gate-const-indexing.stderr
new file mode 100644
index 00000000000..bc4b687800d
--- /dev/null
+++ b/src/test/ui/feature-gate-const-indexing.stderr
@@ -0,0 +1,8 @@
+error[E0080]: constant evaluation error
+  --> $DIR/feature-gate-const-indexing.rs:16:24
+   |
+16 |     const BLUB: [i32; (ARR[0] - 41) as usize] = [5]; //~ ERROR constant evaluation error
+   |                        ^^^^^^ the index operation on const values is unstable
+
+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/feature-gate-copy-closures.rs b/src/test/ui/feature-gate-copy-closures.rs
index b11b09eb9fd..b11b09eb9fd 100644
--- a/src/test/compile-fail/feature-gate-copy-closures.rs
+++ b/src/test/ui/feature-gate-copy-closures.rs
diff --git a/src/test/ui/feature-gate-copy-closures.stderr b/src/test/ui/feature-gate-copy-closures.stderr
new file mode 100644
index 00000000000..9b324672f22
--- /dev/null
+++ b/src/test/ui/feature-gate-copy-closures.stderr
@@ -0,0 +1,12 @@
+error[E0382]: use of moved value: `hello`
+  --> $DIR/feature-gate-copy-closures.rs:18:9
+   |
+17 |     let b = hello;
+   |         - value moved here
+18 |     let c = hello; //~ ERROR use of moved value: `hello` [E0382]
+   |         ^ value used here after move
+   |
+   = note: move occurs because `hello` has type `[closure@$DIR/feature-gate-copy-closures.rs:13:17: 15:6 a:&i32]`, which does not implement the `Copy` trait
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/rfc-2126-crate-paths/feature-gate-crate_in_paths.rs b/src/test/ui/feature-gate-crate_in_paths.rs
index 830ec5959b7..830ec5959b7 100644
--- a/src/test/compile-fail/rfc-2126-crate-paths/feature-gate-crate_in_paths.rs
+++ b/src/test/ui/feature-gate-crate_in_paths.rs
diff --git a/src/test/ui/feature-gate-crate_in_paths.stderr b/src/test/ui/feature-gate-crate_in_paths.stderr
new file mode 100644
index 00000000000..b13c82ecfc9
--- /dev/null
+++ b/src/test/ui/feature-gate-crate_in_paths.stderr
@@ -0,0 +1,10 @@
+error: `crate` in paths is experimental (see issue #45477)
+  --> $DIR/feature-gate-crate_in_paths.rs:14:15
+   |
+14 |     let _ = ::crate::S; //~ ERROR `crate` in paths is experimental
+   |               ^^^^^
+   |
+   = help: add #![feature(crate_in_paths)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-crate_visibility_modifier.rs b/src/test/ui/feature-gate-crate_visibility_modifier.rs
index a2937d6de31..a2937d6de31 100644
--- a/src/test/compile-fail/feature-gate-crate_visibility_modifier.rs
+++ b/src/test/ui/feature-gate-crate_visibility_modifier.rs
diff --git a/src/test/ui/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gate-crate_visibility_modifier.stderr
new file mode 100644
index 00000000000..0862744b87b
--- /dev/null
+++ b/src/test/ui/feature-gate-crate_visibility_modifier.stderr
@@ -0,0 +1,10 @@
+error: `crate` visibility modifier is experimental (see issue #45388)
+  --> $DIR/feature-gate-crate_visibility_modifier.rs:11:1
+   |
+11 | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental
+   | ^^^^^
+   |
+   = help: add #![feature(crate_visibility_modifier)] to the crate attributes to enable
+
+error: aborting due to previous error
+
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/feature-gate-decl_macro.rs b/src/test/ui/feature-gate-decl_macro.rs
index c5c83977c77..c5c83977c77 100644
--- a/src/test/compile-fail/feature-gate-decl_macro.rs
+++ b/src/test/ui/feature-gate-decl_macro.rs
diff --git a/src/test/ui/feature-gate-decl_macro.stderr b/src/test/ui/feature-gate-decl_macro.stderr
new file mode 100644
index 00000000000..49ce4eb10b6
--- /dev/null
+++ b/src/test/ui/feature-gate-decl_macro.stderr
@@ -0,0 +1,10 @@
+error: `macro` is experimental (see issue #39412)
+  --> $DIR/feature-gate-decl_macro.rs:13:1
+   |
+13 | macro m() {} //~ ERROR `macro` is experimental (see issue #39412)
+   | ^^^^^^^^^^^^
+   |
+   = help: add #![feature(decl_macro)] 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/feature-gate-doc_cfg.rs b/src/test/ui/feature-gate-doc_cfg.rs
index 1a77d918014..1a77d918014 100644
--- a/src/test/compile-fail/feature-gate-doc_cfg.rs
+++ b/src/test/ui/feature-gate-doc_cfg.rs
diff --git a/src/test/ui/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gate-doc_cfg.stderr
new file mode 100644
index 00000000000..c2d8a934ab8
--- /dev/null
+++ b/src/test/ui/feature-gate-doc_cfg.stderr
@@ -0,0 +1,10 @@
+error: #[doc(cfg(...))] is experimental (see issue #43781)
+  --> $DIR/feature-gate-doc_cfg.rs:11:1
+   |
+11 | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(doc_cfg)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-doc_masked.rs b/src/test/ui/feature-gate-doc_masked.rs
index bb5be9d6971..bb5be9d6971 100644
--- a/src/test/compile-fail/feature-gate-doc_masked.rs
+++ b/src/test/ui/feature-gate-doc_masked.rs
diff --git a/src/test/ui/feature-gate-doc_masked.stderr b/src/test/ui/feature-gate-doc_masked.stderr
new file mode 100644
index 00000000000..11020765304
--- /dev/null
+++ b/src/test/ui/feature-gate-doc_masked.stderr
@@ -0,0 +1,10 @@
+error: #[doc(masked)] is experimental (see issue #44027)
+  --> $DIR/feature-gate-doc_masked.rs:11:1
+   |
+11 | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental
+   | ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(doc_masked)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-doc_spotlight.rs b/src/test/ui/feature-gate-doc_spotlight.rs
index 6369358538d..6369358538d 100644
--- a/src/test/compile-fail/feature-gate-doc_spotlight.rs
+++ b/src/test/ui/feature-gate-doc_spotlight.rs
diff --git a/src/test/ui/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gate-doc_spotlight.stderr
new file mode 100644
index 00000000000..b743a1e94bc
--- /dev/null
+++ b/src/test/ui/feature-gate-doc_spotlight.stderr
@@ -0,0 +1,10 @@
+error: #[doc(spotlight)] is experimental (see issue #45040)
+  --> $DIR/feature-gate-doc_spotlight.rs:11:1
+   |
+11 | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(doc_spotlight)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs b/src/test/ui/feature-gate-dotdoteq_in_patterns.rs
index 1fb139bf07f..1fb139bf07f 100644
--- a/src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs
+++ b/src/test/ui/feature-gate-dotdoteq_in_patterns.rs
diff --git a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr
new file mode 100644
index 00000000000..5319dcef2d5
--- /dev/null
+++ b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr
@@ -0,0 +1,10 @@
+error: `..=` syntax in patterns is experimental (see issue #28237)
+  --> $DIR/feature-gate-dotdoteq_in_patterns.rs:13:9
+   |
+13 |         0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental
+   |         ^^^^^^^
+   |
+   = help: add #![feature(dotdoteq_in_patterns)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-dropck-ugeh-2.rs b/src/test/ui/feature-gate-dropck-ugeh-2.rs
index 70ec561439c..70ec561439c 100644
--- a/src/test/compile-fail/feature-gate-dropck-ugeh-2.rs
+++ b/src/test/ui/feature-gate-dropck-ugeh-2.rs
diff --git a/src/test/ui/feature-gate-dropck-ugeh-2.stderr b/src/test/ui/feature-gate-dropck-ugeh-2.stderr
new file mode 100644
index 00000000000..0555b485d4c
--- /dev/null
+++ b/src/test/ui/feature-gate-dropck-ugeh-2.stderr
@@ -0,0 +1,14 @@
+error: use of deprecated attribute `dropck_parametricity`: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future. See https://github.com/rust-lang/rust/issues/34761
+  --> $DIR/feature-gate-dropck-ugeh-2.rs:17:5
+   |
+17 |     #[unsafe_destructor_blind_to_params]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: lint level defined here
+  --> $DIR/feature-gate-dropck-ugeh-2.rs:11:9
+   |
+11 | #![deny(deprecated)]
+   |         ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-dropck-ugeh.rs b/src/test/ui/feature-gate-dropck-ugeh.rs
index 360895d30b0..360895d30b0 100644
--- a/src/test/compile-fail/feature-gate-dropck-ugeh.rs
+++ b/src/test/ui/feature-gate-dropck-ugeh.rs
diff --git a/src/test/ui/feature-gate-dropck-ugeh.stderr b/src/test/ui/feature-gate-dropck-ugeh.stderr
new file mode 100644
index 00000000000..b030ebcd881
--- /dev/null
+++ b/src/test/ui/feature-gate-dropck-ugeh.stderr
@@ -0,0 +1,10 @@
+error: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498)
+  --> $DIR/feature-gate-dropck-ugeh.rs:29:5
+   |
+29 |     #[unsafe_destructor_blind_to_params] // This is the UGEH attribute
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(dropck_parametricity)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-dyn-trait.rs b/src/test/ui/feature-gate-dyn-trait.rs
index 4b3803d019b..4b3803d019b 100644
--- a/src/test/compile-fail/feature-gate-dyn-trait.rs
+++ b/src/test/ui/feature-gate-dyn-trait.rs
diff --git a/src/test/ui/feature-gate-dyn-trait.stderr b/src/test/ui/feature-gate-dyn-trait.stderr
new file mode 100644
index 00000000000..28ecfdf1131
--- /dev/null
+++ b/src/test/ui/feature-gate-dyn-trait.stderr
@@ -0,0 +1,10 @@
+error: `dyn Trait` syntax is unstable (see issue #44662)
+  --> $DIR/feature-gate-dyn-trait.rs:12:14
+   |
+12 | type A = Box<dyn Trait>; //~ ERROR `dyn Trait` syntax is unstable
+   |              ^^^^^^^^^
+   |
+   = help: add #![feature(dyn_trait)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-exclusive-range-pattern.rs b/src/test/ui/feature-gate-exclusive-range-pattern.rs
index e0b6d5986ff..e0b6d5986ff 100644
--- a/src/test/compile-fail/feature-gate-exclusive-range-pattern.rs
+++ b/src/test/ui/feature-gate-exclusive-range-pattern.rs
diff --git a/src/test/ui/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gate-exclusive-range-pattern.stderr
new file mode 100644
index 00000000000..c6785d6f29d
--- /dev/null
+++ b/src/test/ui/feature-gate-exclusive-range-pattern.stderr
@@ -0,0 +1,10 @@
+error: exclusive range pattern syntax is experimental (see issue #37854)
+  --> $DIR/feature-gate-exclusive-range-pattern.rs:13:9
+   |
+13 |         0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental
+   |         ^^^^^^
+   |
+   = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-extern_types.rs b/src/test/ui/feature-gate-extern_types.rs
index 1203b598df3..1203b598df3 100644
--- a/src/test/compile-fail/feature-gate-extern_types.rs
+++ b/src/test/ui/feature-gate-extern_types.rs
diff --git a/src/test/ui/feature-gate-extern_types.stderr b/src/test/ui/feature-gate-extern_types.stderr
new file mode 100644
index 00000000000..3815862e899
--- /dev/null
+++ b/src/test/ui/feature-gate-extern_types.stderr
@@ -0,0 +1,10 @@
+error: extern types are experimental (see issue #43467)
+  --> $DIR/feature-gate-extern_types.rs:12:5
+   |
+12 |     type T; //~ ERROR extern types are experimental
+   |     ^^^^^^^
+   |
+   = help: add #![feature(extern_types)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-external_doc.rs b/src/test/ui/feature-gate-external_doc.rs
index fa0a2a29078..fa0a2a29078 100644
--- a/src/test/compile-fail/feature-gate-external_doc.rs
+++ b/src/test/ui/feature-gate-external_doc.rs
diff --git a/src/test/ui/feature-gate-external_doc.stderr b/src/test/ui/feature-gate-external_doc.stderr
new file mode 100644
index 00000000000..5479ab8bc91
--- /dev/null
+++ b/src/test/ui/feature-gate-external_doc.stderr
@@ -0,0 +1,10 @@
+error: #[doc(include = "...")] is experimental (see issue #44732)
+  --> $DIR/feature-gate-external_doc.rs:11:1
+   |
+11 | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(external_doc)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-feature-gate.rs b/src/test/ui/feature-gate-feature-gate.rs
index b903b29658b..b903b29658b 100644
--- a/src/test/compile-fail/feature-gate-feature-gate.rs
+++ b/src/test/ui/feature-gate-feature-gate.rs
diff --git a/src/test/ui/feature-gate-feature-gate.stderr b/src/test/ui/feature-gate-feature-gate.stderr
new file mode 100644
index 00000000000..3d5f0d70bb2
--- /dev/null
+++ b/src/test/ui/feature-gate-feature-gate.stderr
@@ -0,0 +1,14 @@
+error: unstable feature
+  --> $DIR/feature-gate-feature-gate.rs:12:12
+   |
+12 | #![feature(intrinsics)] //~ ERROR unstable feature
+   |            ^^^^^^^^^^
+   |
+note: lint level defined here
+  --> $DIR/feature-gate-feature-gate.rs:11:11
+   |
+11 | #![forbid(unstable_features)]
+   |           ^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-fn_must_use-cap-lints-allow.rs b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.rs
index 1c04199c05f..1c04199c05f 100644
--- a/src/test/compile-fail/feature-gate-fn_must_use-cap-lints-allow.rs
+++ b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.rs
diff --git a/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr
new file mode 100644
index 00000000000..9b16e9be68a
--- /dev/null
+++ b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr
@@ -0,0 +1,6 @@
+error: compilation successful
+  --> $DIR/feature-gate-fn_must_use-cap-lints-allow.rs:22:1
+   |
+22 | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
diff --git a/src/test/compile-fail/feature-gate-fn_must_use.rs b/src/test/ui/feature-gate-fn_must_use.rs
index 72fdcc76cf4..72fdcc76cf4 100644
--- a/src/test/compile-fail/feature-gate-fn_must_use.rs
+++ b/src/test/ui/feature-gate-fn_must_use.rs
diff --git a/src/test/ui/feature-gate-fn_must_use.stderr b/src/test/ui/feature-gate-fn_must_use.stderr
new file mode 100644
index 00000000000..ed4953d27b8
--- /dev/null
+++ b/src/test/ui/feature-gate-fn_must_use.stderr
@@ -0,0 +1,22 @@
+warning: `#[must_use]` on methods is experimental (see issue #43302)
+  --> $DIR/feature-gate-fn_must_use.rs:16:5
+   |
+16 |     #[must_use] //~ WARN `#[must_use]` on methods is experimental
+   |     ^^^^^^^^^^^
+   |
+   = help: add #![feature(fn_must_use)] to the crate attributes to enable
+
+warning: `#[must_use]` on functions is experimental (see issue #43302)
+  --> $DIR/feature-gate-fn_must_use.rs:20:1
+   |
+20 | #[must_use] //~ WARN `#[must_use]` on functions is experimental
+   | ^^^^^^^^^^^
+   |
+   = help: add #![feature(fn_must_use)] to the crate attributes to enable
+
+error: compilation successful
+  --> $DIR/feature-gate-fn_must_use.rs:31:1
+   |
+31 | fn main() {} //~ ERROR compilation successful
+   | ^^^^^^^^^^^^
+
diff --git a/src/test/compile-fail/feature-gate-fundamental.rs b/src/test/ui/feature-gate-fundamental.rs
index 18718a0d0be..18718a0d0be 100644
--- a/src/test/compile-fail/feature-gate-fundamental.rs
+++ b/src/test/ui/feature-gate-fundamental.rs
diff --git a/src/test/ui/feature-gate-fundamental.stderr b/src/test/ui/feature-gate-fundamental.stderr
new file mode 100644
index 00000000000..0fc75ee30b9
--- /dev/null
+++ b/src/test/ui/feature-gate-fundamental.stderr
@@ -0,0 +1,10 @@
+error: the `#[fundamental]` attribute is an experimental feature (see issue #29635)
+  --> $DIR/feature-gate-fundamental.rs:11:1
+   |
+11 | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature
+   | ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(fundamental)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-generators.rs b/src/test/ui/feature-gate-generators.rs
index 3754f92d8cd..3754f92d8cd 100644
--- a/src/test/compile-fail/feature-gate-generators.rs
+++ b/src/test/ui/feature-gate-generators.rs
diff --git a/src/test/ui/feature-gate-generators.stderr b/src/test/ui/feature-gate-generators.stderr
new file mode 100644
index 00000000000..82acb401338
--- /dev/null
+++ b/src/test/ui/feature-gate-generators.stderr
@@ -0,0 +1,10 @@
+error: yield syntax is experimental
+  --> $DIR/feature-gate-generators.rs:12:5
+   |
+12 |     yield true; //~ ERROR yield syntax is experimental
+   |     ^^^^^^^^^^
+   |
+   = help: add #![feature(generators)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-generic_associated_types.rs b/src/test/ui/feature-gate-generic_associated_types.rs
index 724ec2496f2..724ec2496f2 100644
--- a/src/test/compile-fail/feature-gate-generic_associated_types.rs
+++ b/src/test/ui/feature-gate-generic_associated_types.rs
diff --git a/src/test/ui/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gate-generic_associated_types.stderr
new file mode 100644
index 00000000000..7b2507e1fb1
--- /dev/null
+++ b/src/test/ui/feature-gate-generic_associated_types.stderr
@@ -0,0 +1,34 @@
+error: generic associated types are unstable (see issue #44265)
+  --> $DIR/feature-gate-generic_associated_types.rs:14:5
+   |
+14 |     type Pointer<T>: Deref<Target = T>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_associated_types)] to the crate attributes to enable
+
+error: generic associated types are unstable (see issue #44265)
+  --> $DIR/feature-gate-generic_associated_types.rs:16:5
+   |
+16 |     type Pointer2<T>: Deref<Target = T> where T: Clone, U: Clone;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_associated_types)] to the crate attributes to enable
+
+error: generic associated types are unstable (see issue #44265)
+  --> $DIR/feature-gate-generic_associated_types.rs:22:5
+   |
+22 |     type Pointer<usize> = Box<usize>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_associated_types)] to the crate attributes to enable
+
+error: generic associated types are unstable (see issue #44265)
+  --> $DIR/feature-gate-generic_associated_types.rs:24:5
+   |
+24 |     type Pointer2<u32> = Box<u32>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(generic_associated_types)] to the crate attributes to enable
+
+error: aborting due to 4 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/feature-gate-global_allocator.rs b/src/test/ui/feature-gate-global_allocator.rs
index ff3c342f9e0..ff3c342f9e0 100644
--- a/src/test/compile-fail/feature-gate-global_allocator.rs
+++ b/src/test/ui/feature-gate-global_allocator.rs
diff --git a/src/test/ui/feature-gate-global_allocator.stderr b/src/test/ui/feature-gate-global_allocator.stderr
new file mode 100644
index 00000000000..7e6c4288ff3
--- /dev/null
+++ b/src/test/ui/feature-gate-global_allocator.stderr
@@ -0,0 +1,10 @@
+error: the `#[global_allocator]` attribute is an experimental feature
+  --> $DIR/feature-gate-global_allocator.rs:11:1
+   |
+11 | #[global_allocator] //~ ERROR: attribute is an experimental feature
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(global_allocator)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-global_asm.rs b/src/test/ui/feature-gate-global_asm.rs
index 77f61ba47b0..77f61ba47b0 100644
--- a/src/test/compile-fail/feature-gate-global_asm.rs
+++ b/src/test/ui/feature-gate-global_asm.rs
diff --git a/src/test/ui/feature-gate-global_asm.stderr b/src/test/ui/feature-gate-global_asm.stderr
new file mode 100644
index 00000000000..de0ba1a7b32
--- /dev/null
+++ b/src/test/ui/feature-gate-global_asm.stderr
@@ -0,0 +1,10 @@
+error: `global_asm!` is not stable enough for use and is subject to change (see issue #35119)
+  --> $DIR/feature-gate-global_asm.rs:11:1
+   |
+11 | global_asm!(""); //~ ERROR `global_asm!` is not stable
+   | ^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(global_asm)] to the crate attributes to enable
+
+error: aborting due to previous error
+
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/feature-gate-in_band_lifetimes.rs b/src/test/ui/feature-gate-in_band_lifetimes.rs
index ae1f81c2f57..ae1f81c2f57 100644
--- a/src/test/compile-fail/feature-gate-in_band_lifetimes.rs
+++ b/src/test/ui/feature-gate-in_band_lifetimes.rs
diff --git a/src/test/ui/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gate-in_band_lifetimes.stderr
new file mode 100644
index 00000000000..3b03ef2dd33
--- /dev/null
+++ b/src/test/ui/feature-gate-in_band_lifetimes.stderr
@@ -0,0 +1,104 @@
+error[E0261]: use of undeclared lifetime name `'x`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:13:12
+   |
+13 | fn foo(x: &'x u8) -> &'x u8 { x }
+   |            ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'x`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:13:23
+   |
+13 | fn foo(x: &'x u8) -> &'x u8 { x }
+   |                       ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:25:12
+   |
+25 | impl<'a> X<'b> {
+   |            ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:27:27
+   |
+27 |     fn inner_2(&self) -> &'b u8 {
+   |                           ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:33:8
+   |
+33 | impl X<'b> {
+   |        ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:35:27
+   |
+35 |     fn inner_3(&self) -> &'b u8 {
+   |                           ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:43:9
+   |
+43 | impl Y<&'a u8> {
+   |         ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:45:25
+   |
+45 |     fn inner(&self) -> &'a u8 {
+   |                         ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:53:27
+   |
+53 |     fn any_lifetime() -> &'b u8;
+   |                           ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:55:27
+   |
+55 |     fn borrowed_lifetime(&'b self) -> &'b u8;
+   |                           ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:55:40
+   |
+55 |     fn borrowed_lifetime(&'b self) -> &'b u8;
+   |                                        ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:60:14
+   |
+60 | impl MyTrait<'a> for Y<&'a u8> {
+   |              ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:60:25
+   |
+60 | impl MyTrait<'a> for Y<&'a u8> {
+   |                         ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:63:31
+   |
+63 |     fn my_lifetime(&self) -> &'a u8 { self.0 }
+   |                               ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:65:27
+   |
+65 |     fn any_lifetime() -> &'b u8 { &0 }
+   |                           ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:67:27
+   |
+67 |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
+   |                           ^^ undeclared lifetime
+
+error[E0261]: use of undeclared lifetime name `'b`
+  --> $DIR/feature-gate-in_band_lifetimes.rs:67:40
+   |
+67 |     fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 }
+   |                                        ^^ undeclared lifetime
+
+error: aborting due to 17 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-intrinsics.rs b/src/test/ui/feature-gate-intrinsics.rs
index a4c09b21c90..a4c09b21c90 100644
--- a/src/test/compile-fail/feature-gate-intrinsics.rs
+++ b/src/test/ui/feature-gate-intrinsics.rs
diff --git a/src/test/ui/feature-gate-intrinsics.stderr b/src/test/ui/feature-gate-intrinsics.stderr
new file mode 100644
index 00000000000..5382122e30e
--- /dev/null
+++ b/src/test/ui/feature-gate-intrinsics.stderr
@@ -0,0 +1,21 @@
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-intrinsics.rs:11:1
+   |
+11 | / extern "rust-intrinsic" {   //~ ERROR intrinsics are subject to change
+12 | |     fn bar();
+13 | | }
+   | |_^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: intrinsics are subject to change
+  --> $DIR/feature-gate-intrinsics.rs:15:1
+   |
+15 | / extern "rust-intrinsic" fn baz() {  //~ ERROR intrinsics are subject to change
+16 | | }
+   | |_^
+   |
+   = help: add #![feature(intrinsics)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-lang-items.rs b/src/test/ui/feature-gate-lang-items.rs
index 0435ff4c332..0435ff4c332 100644
--- a/src/test/compile-fail/feature-gate-lang-items.rs
+++ b/src/test/ui/feature-gate-lang-items.rs
diff --git a/src/test/ui/feature-gate-lang-items.stderr b/src/test/ui/feature-gate-lang-items.stderr
new file mode 100644
index 00000000000..dab8ce23192
--- /dev/null
+++ b/src/test/ui/feature-gate-lang-items.stderr
@@ -0,0 +1,10 @@
+error: language items are subject to change
+  --> $DIR/feature-gate-lang-items.rs:11:1
+   |
+11 | #[lang="foo"]   //~ ERROR language items are subject to change
+   | ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(lang_items)] to the crate attributes to enable
+
+error: aborting due to previous error
+
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/feature-gate-linker-flavor.rs b/src/test/ui/feature-gate-linker-flavor.rs
index 955ec39cda1..955ec39cda1 100644
--- a/src/test/compile-fail/feature-gate-linker-flavor.rs
+++ b/src/test/ui/feature-gate-linker-flavor.rs
diff --git a/src/test/ui/feature-gate-linker-flavor.stderr b/src/test/ui/feature-gate-linker-flavor.stderr
new file mode 100644
index 00000000000..383e75e3d17
--- /dev/null
+++ b/src/test/ui/feature-gate-linker-flavor.stderr
@@ -0,0 +1,10 @@
+error: the `#[used]` attribute is an experimental feature (see issue #40289)
+  --> $DIR/feature-gate-linker-flavor.rs:16:1
+   |
+16 | #[used]
+   | ^^^^^^^
+   |
+   = help: add #![feature(used)] 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/feature-gate-macro-vis-matcher.rs b/src/test/ui/feature-gate-macro-vis-matcher.rs
index 5d6f2acea83..5d6f2acea83 100644
--- a/src/test/compile-fail/feature-gate-macro-vis-matcher.rs
+++ b/src/test/ui/feature-gate-macro-vis-matcher.rs
diff --git a/src/test/ui/feature-gate-macro-vis-matcher.stderr b/src/test/ui/feature-gate-macro-vis-matcher.stderr
new file mode 100644
index 00000000000..09db5009165
--- /dev/null
+++ b/src/test/ui/feature-gate-macro-vis-matcher.stderr
@@ -0,0 +1,10 @@
+error: :vis fragment specifier is experimental and subject to change (see issue #41022)
+  --> $DIR/feature-gate-macro-vis-matcher.rs:14:19
+   |
+14 | macro_rules! m { ($v:vis) => {} }
+   |                   ^^^^^^
+   |
+   = help: add #![feature(macro_vis_matcher)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-main.rs b/src/test/ui/feature-gate-main.rs
index db1c1a94417..db1c1a94417 100644
--- a/src/test/compile-fail/feature-gate-main.rs
+++ b/src/test/ui/feature-gate-main.rs
diff --git a/src/test/ui/feature-gate-main.stderr b/src/test/ui/feature-gate-main.stderr
new file mode 100644
index 00000000000..90cf12822c8
--- /dev/null
+++ b/src/test/ui/feature-gate-main.stderr
@@ -0,0 +1,10 @@
+error: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634)
+  --> $DIR/feature-gate-main.rs:12:1
+   |
+12 | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time
+   | ^^^^^^^^^^^
+   |
+   = help: add #![feature(main)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-match_beginning_vert.rs b/src/test/ui/feature-gate-match_beginning_vert.rs
index 9085563c99d..9085563c99d 100644
--- a/src/test/compile-fail/feature-gate-match_beginning_vert.rs
+++ b/src/test/ui/feature-gate-match_beginning_vert.rs
diff --git a/src/test/ui/feature-gate-match_beginning_vert.stderr b/src/test/ui/feature-gate-match_beginning_vert.stderr
new file mode 100644
index 00000000000..88053adfafa
--- /dev/null
+++ b/src/test/ui/feature-gate-match_beginning_vert.stderr
@@ -0,0 +1,26 @@
+error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101)
+  --> $DIR/feature-gate-match_beginning_vert.rs:24:9
+   |
+24 |         | A => println!("A"),
+   |         ^
+   |
+   = help: add #![feature(match_beginning_vert)] to the crate attributes to enable
+
+error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101)
+  --> $DIR/feature-gate-match_beginning_vert.rs:26:9
+   |
+26 |         | B | C => println!("BC!"),
+   |         ^
+   |
+   = help: add #![feature(match_beginning_vert)] to the crate attributes to enable
+
+error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101)
+  --> $DIR/feature-gate-match_beginning_vert.rs:28:9
+   |
+28 |         | _ => {},
+   |         ^
+   |
+   = help: add #![feature(match_beginning_vert)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-match_default_bindings.rs b/src/test/ui/feature-gate-match_default_bindings.rs
index 4ee2c1e2936..4ee2c1e2936 100644
--- a/src/test/compile-fail/feature-gate-match_default_bindings.rs
+++ b/src/test/ui/feature-gate-match_default_bindings.rs
diff --git a/src/test/ui/feature-gate-match_default_bindings.stderr b/src/test/ui/feature-gate-match_default_bindings.stderr
new file mode 100644
index 00000000000..d86e8248f08
--- /dev/null
+++ b/src/test/ui/feature-gate-match_default_bindings.stderr
@@ -0,0 +1,10 @@
+error: non-reference pattern used to match a reference (see issue #42640)
+  --> $DIR/feature-gate-match_default_bindings.rs:13:9
+   |
+13 |         Some(n) => {},
+   |         ^^^^^^^ help: consider using a reference: `&Some(n)`
+   |
+   = help: add #![feature(match_default_bindings)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-may-dangle.rs b/src/test/ui/feature-gate-may-dangle.rs
index 0bf1e93d9aa..0bf1e93d9aa 100644
--- a/src/test/compile-fail/feature-gate-may-dangle.rs
+++ b/src/test/ui/feature-gate-may-dangle.rs
diff --git a/src/test/ui/feature-gate-may-dangle.stderr b/src/test/ui/feature-gate-may-dangle.stderr
new file mode 100644
index 00000000000..e51723d058e
--- /dev/null
+++ b/src/test/ui/feature-gate-may-dangle.stderr
@@ -0,0 +1,10 @@
+error: may_dangle has unstable semantics and may be removed in the future (see issue #34761)
+  --> $DIR/feature-gate-may-dangle.rs:18:6
+   |
+18 | impl<#[may_dangle] A> Drop for Pt<A> {
+   |      ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(dropck_eyepatch)] 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/feature-gate-needs-allocator.rs b/src/test/ui/feature-gate-needs-allocator.rs
index 1809564f5de..1809564f5de 100644
--- a/src/test/compile-fail/feature-gate-needs-allocator.rs
+++ b/src/test/ui/feature-gate-needs-allocator.rs
diff --git a/src/test/ui/feature-gate-needs-allocator.stderr b/src/test/ui/feature-gate-needs-allocator.stderr
new file mode 100644
index 00000000000..5124c10cb47
--- /dev/null
+++ b/src/test/ui/feature-gate-needs-allocator.stderr
@@ -0,0 +1,10 @@
+error: the `#[needs_allocator]` attribute is an experimental feature
+  --> $DIR/feature-gate-needs-allocator.rs:11:1
+   |
+11 | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(allocator_internals)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-negate-unsigned.rs b/src/test/ui/feature-gate-negate-unsigned.rs
index 599e31341f2..599e31341f2 100644
--- a/src/test/compile-fail/feature-gate-negate-unsigned.rs
+++ b/src/test/ui/feature-gate-negate-unsigned.rs
diff --git a/src/test/ui/feature-gate-negate-unsigned.stderr b/src/test/ui/feature-gate-negate-unsigned.stderr
new file mode 100644
index 00000000000..d4311594517
--- /dev/null
+++ b/src/test/ui/feature-gate-negate-unsigned.stderr
@@ -0,0 +1,14 @@
+error[E0600]: cannot apply unary operator `-` to type `usize`
+  --> $DIR/feature-gate-negate-unsigned.rs:20:23
+   |
+20 |     let _max: usize = -1;
+   |                       ^^
+
+error[E0600]: cannot apply unary operator `-` to type `u8`
+  --> $DIR/feature-gate-negate-unsigned.rs:24:14
+   |
+24 |     let _y = -x;
+   |              ^^
+
+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/feature-gate-no-debug-2.rs b/src/test/ui/feature-gate-no-debug-2.rs
index b663c136ee5..b663c136ee5 100644
--- a/src/test/compile-fail/feature-gate-no-debug-2.rs
+++ b/src/test/ui/feature-gate-no-debug-2.rs
diff --git a/src/test/ui/feature-gate-no-debug-2.stderr b/src/test/ui/feature-gate-no-debug-2.stderr
new file mode 100644
index 00000000000..231fc400115
--- /dev/null
+++ b/src/test/ui/feature-gate-no-debug-2.stderr
@@ -0,0 +1,14 @@
+error: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721
+  --> $DIR/feature-gate-no-debug-2.rs:14:1
+   |
+14 | #[no_debug] //~ ERROR use of deprecated attribute `no_debug`
+   | ^^^^^^^^^^^ help: remove this attribute
+   |
+note: lint level defined here
+  --> $DIR/feature-gate-no-debug-2.rs:11:9
+   |
+11 | #![deny(deprecated)]
+   |         ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-no-debug.rs b/src/test/ui/feature-gate-no-debug.rs
index d21493de50a..d21493de50a 100644
--- a/src/test/compile-fail/feature-gate-no-debug.rs
+++ b/src/test/ui/feature-gate-no-debug.rs
diff --git a/src/test/ui/feature-gate-no-debug.stderr b/src/test/ui/feature-gate-no-debug.stderr
new file mode 100644
index 00000000000..83a8189c095
--- /dev/null
+++ b/src/test/ui/feature-gate-no-debug.stderr
@@ -0,0 +1,10 @@
+error: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721)
+  --> $DIR/feature-gate-no-debug.rs:13:1
+   |
+13 | #[no_debug] //~ ERROR the `#[no_debug]` attribute was
+   | ^^^^^^^^^^^
+   |
+   = help: add #![feature(no_debug)] to the crate attributes to enable
+
+error: aborting due to previous error
+
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/feature-gate-non_exhaustive.rs b/src/test/ui/feature-gate-non_exhaustive.rs
index d2711084a4d..d2711084a4d 100644
--- a/src/test/compile-fail/feature-gate-non_exhaustive.rs
+++ b/src/test/ui/feature-gate-non_exhaustive.rs
diff --git a/src/test/ui/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gate-non_exhaustive.stderr
new file mode 100644
index 00000000000..775e65b90fa
--- /dev/null
+++ b/src/test/ui/feature-gate-non_exhaustive.stderr
@@ -0,0 +1,10 @@
+error: non exhaustive is an experimental feature (see issue #44109)
+  --> $DIR/feature-gate-non_exhaustive.rs:13:1
+   |
+13 | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109)
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(non_exhaustive)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.rs
index a837a7f213e..a837a7f213e 100644
--- a/src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs
+++ b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.rs
diff --git a/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr
new file mode 100644
index 00000000000..e50e1b4c0b5
--- /dev/null
+++ b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr
@@ -0,0 +1,10 @@
+error: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite
+  --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:11:1
+   |
+11 | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(omit_gdb_pretty_printer_section)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-on-unimplemented.rs b/src/test/ui/feature-gate-on-unimplemented.rs
index 5d32bba6a76..5d32bba6a76 100644
--- a/src/test/compile-fail/feature-gate-on-unimplemented.rs
+++ b/src/test/ui/feature-gate-on-unimplemented.rs
diff --git a/src/test/ui/feature-gate-on-unimplemented.stderr b/src/test/ui/feature-gate-on-unimplemented.stderr
new file mode 100644
index 00000000000..06944a14736
--- /dev/null
+++ b/src/test/ui/feature-gate-on-unimplemented.stderr
@@ -0,0 +1,10 @@
+error: the `#[rustc_on_unimplemented]` attribute is an experimental feature (see issue #29628)
+  --> $DIR/feature-gate-on-unimplemented.rs:14:1
+   |
+14 | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(on_unimplemented)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-optin-builtin-traits.rs b/src/test/ui/feature-gate-optin-builtin-traits.rs
index 4c5502cec18..4c5502cec18 100644
--- a/src/test/compile-fail/feature-gate-optin-builtin-traits.rs
+++ b/src/test/ui/feature-gate-optin-builtin-traits.rs
diff --git a/src/test/ui/feature-gate-optin-builtin-traits.stderr b/src/test/ui/feature-gate-optin-builtin-traits.stderr
new file mode 100644
index 00000000000..c5e9614c29a
--- /dev/null
+++ b/src/test/ui/feature-gate-optin-builtin-traits.stderr
@@ -0,0 +1,26 @@
+error: auto traits are experimental and possibly buggy (see issue #13231)
+  --> $DIR/feature-gate-optin-builtin-traits.rs:20:1
+   |
+20 | auto trait AutoDummyTrait {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable
+
+error: auto trait implementations are experimental and possibly buggy (see issue #13231)
+  --> $DIR/feature-gate-optin-builtin-traits.rs:24:1
+   |
+24 | impl DummyTrait for .. {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable
+
+error: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231)
+  --> $DIR/feature-gate-optin-builtin-traits.rs:27:1
+   |
+27 | impl !DummyTrait for DummyStruct {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-overlapping_marker_traits.rs b/src/test/ui/feature-gate-overlapping_marker_traits.rs
index d2aa4e59b5b..d2aa4e59b5b 100644
--- a/src/test/compile-fail/feature-gate-overlapping_marker_traits.rs
+++ b/src/test/ui/feature-gate-overlapping_marker_traits.rs
diff --git a/src/test/ui/feature-gate-overlapping_marker_traits.stderr b/src/test/ui/feature-gate-overlapping_marker_traits.stderr
new file mode 100644
index 00000000000..9028b14fcd7
--- /dev/null
+++ b/src/test/ui/feature-gate-overlapping_marker_traits.stderr
@@ -0,0 +1,10 @@
+error[E0119]: conflicting implementations of trait `MyMarker`:
+  --> $DIR/feature-gate-overlapping_marker_traits.rs:16:1
+   |
+15 | impl<T: Display> MyMarker for T {}
+   | ---------------------------------- first implementation here
+16 | impl<T: Debug> MyMarker for T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-placement-expr.rs b/src/test/ui/feature-gate-placement-expr.rs
index e3478876763..e3478876763 100644
--- a/src/test/compile-fail/feature-gate-placement-expr.rs
+++ b/src/test/ui/feature-gate-placement-expr.rs
diff --git a/src/test/ui/feature-gate-placement-expr.stderr b/src/test/ui/feature-gate-placement-expr.stderr
new file mode 100644
index 00000000000..fdb7b506711
--- /dev/null
+++ b/src/test/ui/feature-gate-placement-expr.stderr
@@ -0,0 +1,10 @@
+error: placement-in expression syntax is experimental and subject to change. (see issue #27779)
+  --> $DIR/feature-gate-placement-expr.rs:24:13
+   |
+24 |     let x = HEAP <- 'c'; //~ ERROR placement-in expression syntax is experimental
+   |             ^^^^^^^^^^^
+   |
+   = help: add #![feature(placement_in_syntax)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-plugin.rs b/src/test/ui/feature-gate-plugin.rs
index 3b5d7626ce3..3b5d7626ce3 100644
--- a/src/test/compile-fail/feature-gate-plugin.rs
+++ b/src/test/ui/feature-gate-plugin.rs
diff --git a/src/test/ui/feature-gate-plugin.stderr b/src/test/ui/feature-gate-plugin.stderr
new file mode 100644
index 00000000000..b94d3299abc
--- /dev/null
+++ b/src/test/ui/feature-gate-plugin.stderr
@@ -0,0 +1,10 @@
+error: compiler plugins are experimental and possibly buggy (see issue #29597)
+  --> $DIR/feature-gate-plugin.rs:13:1
+   |
+13 | #![plugin(foo)]
+   | ^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(plugin)] to the crate attributes to enable
+
+error: aborting due to previous error
+
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/feature-gate-prelude_import.rs b/src/test/ui/feature-gate-prelude_import.rs
index 8bc3df247ec..8bc3df247ec 100644
--- a/src/test/compile-fail/feature-gate-prelude_import.rs
+++ b/src/test/ui/feature-gate-prelude_import.rs
diff --git a/src/test/ui/feature-gate-prelude_import.stderr b/src/test/ui/feature-gate-prelude_import.stderr
new file mode 100644
index 00000000000..df44dfff40b
--- /dev/null
+++ b/src/test/ui/feature-gate-prelude_import.stderr
@@ -0,0 +1,10 @@
+error: `#[prelude_import]` is for use by rustc only
+  --> $DIR/feature-gate-prelude_import.rs:11:1
+   |
+11 | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(prelude_import)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-profiler-runtime.rs b/src/test/ui/feature-gate-profiler-runtime.rs
index c6b2cb2eb07..c6b2cb2eb07 100644
--- a/src/test/compile-fail/feature-gate-profiler-runtime.rs
+++ b/src/test/ui/feature-gate-profiler-runtime.rs
diff --git a/src/test/ui/feature-gate-profiler-runtime.stderr b/src/test/ui/feature-gate-profiler-runtime.stderr
new file mode 100644
index 00000000000..c3165438cdb
--- /dev/null
+++ b/src/test/ui/feature-gate-profiler-runtime.stderr
@@ -0,0 +1,10 @@
+error: the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable
+  --> $DIR/feature-gate-profiler-runtime.rs:11:1
+   |
+11 | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is
+   | ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(profiler_runtime)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-repr-simd.rs b/src/test/ui/feature-gate-repr-simd.rs
index 429cec7ec90..429cec7ec90 100644
--- a/src/test/compile-fail/feature-gate-repr-simd.rs
+++ b/src/test/ui/feature-gate-repr-simd.rs
diff --git a/src/test/ui/feature-gate-repr-simd.stderr b/src/test/ui/feature-gate-repr-simd.stderr
new file mode 100644
index 00000000000..a2ff06dd59f
--- /dev/null
+++ b/src/test/ui/feature-gate-repr-simd.stderr
@@ -0,0 +1,10 @@
+error: SIMD types are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-repr-simd.rs:11:1
+   |
+11 | #[repr(simd)] //~ error: SIMD types are experimental
+   | ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(repr_simd)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-repr128.rs b/src/test/ui/feature-gate-repr128.rs
index 96fffa6cdd0..96fffa6cdd0 100644
--- a/src/test/compile-fail/feature-gate-repr128.rs
+++ b/src/test/ui/feature-gate-repr128.rs
diff --git a/src/test/ui/feature-gate-repr128.stderr b/src/test/ui/feature-gate-repr128.stderr
new file mode 100644
index 00000000000..2d32eda3b37
--- /dev/null
+++ b/src/test/ui/feature-gate-repr128.stderr
@@ -0,0 +1,13 @@
+error: repr with 128-bit type is unstable (see issue #35118)
+  --> $DIR/feature-gate-repr128.rs:12:1
+   |
+12 | / enum A { //~ ERROR repr with 128-bit type is unstable
+13 | |     //~| HELP: add #![feature(repr128)]
+14 | |     A(u64)
+15 | | }
+   | |_^
+   |
+   = help: add #![feature(repr128)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-repr_align.rs b/src/test/ui/feature-gate-repr_align.rs
index 9591d367a2d..9591d367a2d 100644
--- a/src/test/compile-fail/feature-gate-repr_align.rs
+++ b/src/test/ui/feature-gate-repr_align.rs
diff --git a/src/test/ui/feature-gate-repr_align.stderr b/src/test/ui/feature-gate-repr_align.stderr
new file mode 100644
index 00000000000..16fdc135a5f
--- /dev/null
+++ b/src/test/ui/feature-gate-repr_align.stderr
@@ -0,0 +1,10 @@
+error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626)
+  --> $DIR/feature-gate-repr_align.rs:12:1
+   |
+12 | #[repr(align(64))] //~ error: the struct `#[repr(align(u16))]` attribute is experimental
+   | ^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(repr_align)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-rustc-attrs.rs b/src/test/ui/feature-gate-rustc-attrs.rs
index 8cfd3e020c6..8cfd3e020c6 100644
--- a/src/test/compile-fail/feature-gate-rustc-attrs.rs
+++ b/src/test/ui/feature-gate-rustc-attrs.rs
diff --git a/src/test/ui/feature-gate-rustc-attrs.stderr b/src/test/ui/feature-gate-rustc-attrs.stderr
new file mode 100644
index 00000000000..c818b57ef12
--- /dev/null
+++ b/src/test/ui/feature-gate-rustc-attrs.stderr
@@ -0,0 +1,26 @@
+error: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642)
+  --> $DIR/feature-gate-rustc-attrs.rs:15:1
+   |
+15 | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable
+   | ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(rustc_attrs)] to the crate attributes to enable
+
+error: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642)
+  --> $DIR/feature-gate-rustc-attrs.rs:16:1
+   |
+16 | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable
+   | ^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(rustc_attrs)] to the crate attributes to enable
+
+error: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642)
+  --> $DIR/feature-gate-rustc-attrs.rs:17:1
+   |
+17 | #[rustc_foo]
+   | ^^^^^^^^^^^^
+   |
+   = help: add #![feature(rustc_attrs)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-rustc-diagnostic-macros.rs b/src/test/ui/feature-gate-rustc-diagnostic-macros.rs
index bbdf248780f..bbdf248780f 100644
--- a/src/test/compile-fail/feature-gate-rustc-diagnostic-macros.rs
+++ b/src/test/ui/feature-gate-rustc-diagnostic-macros.rs
diff --git a/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr
new file mode 100644
index 00000000000..843879036ed
--- /dev/null
+++ b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr
@@ -0,0 +1,20 @@
+error: cannot find macro `__build_diagnostic_array!` in this scope
+  --> $DIR/feature-gate-rustc-diagnostic-macros.rs:22:1
+   |
+22 | __build_diagnostic_array!(DIAGNOSTICS);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: cannot find macro `__register_diagnostic!` in this scope
+  --> $DIR/feature-gate-rustc-diagnostic-macros.rs:14:1
+   |
+14 | __register_diagnostic!(E0001);
+   | ^^^^^^^^^^^^^^^^^^^^^
+
+error: cannot find macro `__diagnostic_used!` in this scope
+  --> $DIR/feature-gate-rustc-diagnostic-macros.rs:18:5
+   |
+18 |     __diagnostic_used!(E0001);
+   |     ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-rustc_const_unstable.rs b/src/test/ui/feature-gate-rustc_const_unstable.rs
index 38a3e15fd7e..38a3e15fd7e 100644
--- a/src/test/compile-fail/feature-gate-rustc_const_unstable.rs
+++ b/src/test/ui/feature-gate-rustc_const_unstable.rs
diff --git a/src/test/ui/feature-gate-rustc_const_unstable.stderr b/src/test/ui/feature-gate-rustc_const_unstable.stderr
new file mode 100644
index 00000000000..c32abb8b857
--- /dev/null
+++ b/src/test/ui/feature-gate-rustc_const_unstable.stderr
@@ -0,0 +1,10 @@
+error: the `#[rustc_const_unstable]` attribute is an internal feature
+  --> $DIR/feature-gate-rustc_const_unstable.rs:18:1
+   |
+18 | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(rustc_const_unstable)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-sanitizer-runtime.rs b/src/test/ui/feature-gate-sanitizer-runtime.rs
index a18641d8246..a18641d8246 100644
--- a/src/test/compile-fail/feature-gate-sanitizer-runtime.rs
+++ b/src/test/ui/feature-gate-sanitizer-runtime.rs
diff --git a/src/test/ui/feature-gate-sanitizer-runtime.stderr b/src/test/ui/feature-gate-sanitizer-runtime.stderr
new file mode 100644
index 00000000000..b9a43f8098d
--- /dev/null
+++ b/src/test/ui/feature-gate-sanitizer-runtime.stderr
@@ -0,0 +1,10 @@
+error: the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable
+  --> $DIR/feature-gate-sanitizer-runtime.rs:11:1
+   |
+11 | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is
+   | ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(sanitizer_runtime)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-simd-ffi.rs b/src/test/ui/feature-gate-simd-ffi.rs
index 31c055f229c..31c055f229c 100644
--- a/src/test/compile-fail/feature-gate-simd-ffi.rs
+++ b/src/test/ui/feature-gate-simd-ffi.rs
diff --git a/src/test/ui/feature-gate-simd-ffi.stderr b/src/test/ui/feature-gate-simd-ffi.stderr
new file mode 100644
index 00000000000..fa47e1a2903
--- /dev/null
+++ b/src/test/ui/feature-gate-simd-ffi.stderr
@@ -0,0 +1,18 @@
+error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code
+  --> $DIR/feature-gate-simd-ffi.rs:20:17
+   |
+20 |     fn baz() -> LocalSimd; //~ ERROR use of SIMD type
+   |                 ^^^^^^^^^
+   |
+   = help: add #![feature(simd_ffi)] to the crate attributes to enable
+
+error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code
+  --> $DIR/feature-gate-simd-ffi.rs:21:15
+   |
+21 |     fn qux(x: LocalSimd); //~ ERROR use of SIMD type
+   |               ^^^^^^^^^
+   |
+   = help: add #![feature(simd_ffi)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-simd.rs b/src/test/ui/feature-gate-simd.rs
index 025eaca5533..025eaca5533 100644
--- a/src/test/compile-fail/feature-gate-simd.rs
+++ b/src/test/ui/feature-gate-simd.rs
diff --git a/src/test/ui/feature-gate-simd.stderr b/src/test/ui/feature-gate-simd.stderr
new file mode 100644
index 00000000000..b3225d580bf
--- /dev/null
+++ b/src/test/ui/feature-gate-simd.stderr
@@ -0,0 +1,10 @@
+error: SIMD types are experimental and possibly buggy (see issue #27731)
+  --> $DIR/feature-gate-simd.rs:14:1
+   |
+14 | #[repr(simd)] //~ ERROR SIMD types are experimental
+   | ^^^^^^^^^^^^^
+   |
+   = help: add #![feature(repr_simd)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-slice-patterns.rs b/src/test/ui/feature-gate-slice-patterns.rs
index 625cb2d3515..625cb2d3515 100644
--- a/src/test/compile-fail/feature-gate-slice-patterns.rs
+++ b/src/test/ui/feature-gate-slice-patterns.rs
diff --git a/src/test/ui/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gate-slice-patterns.stderr
new file mode 100644
index 00000000000..e5ba318b336
--- /dev/null
+++ b/src/test/ui/feature-gate-slice-patterns.stderr
@@ -0,0 +1,10 @@
+error: slice pattern syntax is experimental (see issue #23121)
+  --> $DIR/feature-gate-slice-patterns.rs:16:9
+   |
+16 |         [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental
+   |         ^^^^^^^^^^^^
+   |
+   = help: add #![feature(slice_patterns)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-staged_api.rs b/src/test/ui/feature-gate-staged_api.rs
index 014a0aaaf68..014a0aaaf68 100644
--- a/src/test/compile-fail/feature-gate-staged_api.rs
+++ b/src/test/ui/feature-gate-staged_api.rs
diff --git a/src/test/ui/feature-gate-staged_api.stderr b/src/test/ui/feature-gate-staged_api.stderr
new file mode 100644
index 00000000000..30593d45760
--- /dev/null
+++ b/src/test/ui/feature-gate-staged_api.stderr
@@ -0,0 +1,14 @@
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/feature-gate-staged_api.rs:11:1
+   |
+11 | #![stable(feature = "a", since = "b")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/feature-gate-staged_api.rs:18:1
+   |
+18 | #[stable(feature = "a", since = "b")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-start.rs b/src/test/ui/feature-gate-start.rs
index 7a0924d8adf..7a0924d8adf 100644
--- a/src/test/compile-fail/feature-gate-start.rs
+++ b/src/test/ui/feature-gate-start.rs
diff --git a/src/test/ui/feature-gate-start.stderr b/src/test/ui/feature-gate-start.stderr
new file mode 100644
index 00000000000..b36fae2aacf
--- /dev/null
+++ b/src/test/ui/feature-gate-start.stderr
@@ -0,0 +1,10 @@
+error: a #[start] function is an experimental feature whose signature may change over time (see issue #29633)
+  --> $DIR/feature-gate-start.rs:12:1
+   |
+12 | fn foo() {} //~ ERROR: a #[start] function is an experimental feature
+   | ^^^^^^^^^^^
+   |
+   = help: add #![feature(start)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-static-nobundle.rs b/src/test/ui/feature-gate-static-nobundle.rs
index 0d13a4937c4..0d13a4937c4 100644
--- a/src/test/compile-fail/feature-gate-static-nobundle.rs
+++ b/src/test/ui/feature-gate-static-nobundle.rs
diff --git a/src/test/ui/feature-gate-static-nobundle.stderr b/src/test/ui/feature-gate-static-nobundle.stderr
new file mode 100644
index 00000000000..052516fad76
--- /dev/null
+++ b/src/test/ui/feature-gate-static-nobundle.stderr
@@ -0,0 +1,10 @@
+error: kind="static-nobundle" is feature gated (see issue #37403)
+  --> $DIR/feature-gate-static-nobundle.rs:11:1
+   |
+11 | #[link(name="foo", kind="static-nobundle")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(static_nobundle)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-stmt_expr_attributes.rs b/src/test/ui/feature-gate-stmt_expr_attributes.rs
index 831d8862e10..831d8862e10 100644
--- a/src/test/compile-fail/feature-gate-stmt_expr_attributes.rs
+++ b/src/test/ui/feature-gate-stmt_expr_attributes.rs
diff --git a/src/test/ui/feature-gate-stmt_expr_attributes.stderr b/src/test/ui/feature-gate-stmt_expr_attributes.stderr
new file mode 100644
index 00000000000..80910594d1c
--- /dev/null
+++ b/src/test/ui/feature-gate-stmt_expr_attributes.stderr
@@ -0,0 +1,10 @@
+error: attributes on non-item statements and expressions are experimental. (see issue #15701)
+  --> $DIR/feature-gate-stmt_expr_attributes.rs:11:16
+   |
+11 | const X: i32 = #[allow(dead_code)] 8;
+   |                ^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(stmt_expr_attributes)] 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/feature-gate-unboxed-closures-manual-impls.rs b/src/test/ui/feature-gate-unboxed-closures-manual-impls.rs
index 5df309321d3..5df309321d3 100644
--- a/src/test/compile-fail/feature-gate-unboxed-closures-manual-impls.rs
+++ b/src/test/ui/feature-gate-unboxed-closures-manual-impls.rs
diff --git a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr
new file mode 100644
index 00000000000..280fc12f1a6
--- /dev/null
+++ b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr
@@ -0,0 +1,34 @@
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:20:5
+   |
+20 |     extern "rust-call" fn call(self, args: ()) -> () {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:25:5
+   |
+25 |     extern "rust-call" fn call_once(self, args: ()) -> () {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:5
+   |
+30 |     extern "rust-call" fn call_mut(&self, args: ()) -> () {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:5
+   |
+35 |     extern "rust-call" fn call_once(&self, args: ()) -> () {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: aborting due to 4 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-unboxed-closures-method-calls.rs b/src/test/ui/feature-gate-unboxed-closures-method-calls.rs
index 253d1633b1c..253d1633b1c 100644
--- a/src/test/compile-fail/feature-gate-unboxed-closures-method-calls.rs
+++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.rs
diff --git a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr
new file mode 100644
index 00000000000..1167bf0a696
--- /dev/null
+++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr
@@ -0,0 +1,26 @@
+error: use of unstable library feature 'fn_traits' (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-method-calls.rs:14:7
+   |
+14 |     f.call(()); //~ ERROR use of unstable library feature 'fn_traits'
+   |       ^^^^
+   |
+   = help: add #![feature(fn_traits)] to the crate attributes to enable
+
+error: use of unstable library feature 'fn_traits' (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-method-calls.rs:15:7
+   |
+15 |     f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits'
+   |       ^^^^^^^^
+   |
+   = help: add #![feature(fn_traits)] to the crate attributes to enable
+
+error: use of unstable library feature 'fn_traits' (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-method-calls.rs:16:7
+   |
+16 |     f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits'
+   |       ^^^^^^^^^
+   |
+   = help: add #![feature(fn_traits)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-unboxed-closures-ufcs-calls.rs b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.rs
index 902b3c1774c..902b3c1774c 100644
--- a/src/test/compile-fail/feature-gate-unboxed-closures-ufcs-calls.rs
+++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.rs
diff --git a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr
new file mode 100644
index 00000000000..7eb491cebfe
--- /dev/null
+++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr
@@ -0,0 +1,26 @@
+error: use of unstable library feature 'fn_traits' (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:14:5
+   |
+14 |     Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits'
+   |     ^^^^^^^^
+   |
+   = help: add #![feature(fn_traits)] to the crate attributes to enable
+
+error: use of unstable library feature 'fn_traits' (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:15:5
+   |
+15 |     FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits'
+   |     ^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(fn_traits)] to the crate attributes to enable
+
+error: use of unstable library feature 'fn_traits' (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:16:5
+   |
+16 |     FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits'
+   |     ^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(fn_traits)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-unboxed-closures.rs b/src/test/ui/feature-gate-unboxed-closures.rs
index 40050217744..40050217744 100644
--- a/src/test/compile-fail/feature-gate-unboxed-closures.rs
+++ b/src/test/ui/feature-gate-unboxed-closures.rs
diff --git a/src/test/ui/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gate-unboxed-closures.stderr
new file mode 100644
index 00000000000..b79165147e5
--- /dev/null
+++ b/src/test/ui/feature-gate-unboxed-closures.stderr
@@ -0,0 +1,12 @@
+error: rust-call ABI is subject to change (see issue #29625)
+  --> $DIR/feature-gate-unboxed-closures.rs:16:5
+   |
+16 | /     extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 {
+17 | |         a + b
+18 | |     }
+   | |_____^
+   |
+   = help: add #![feature(unboxed_closures)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-underscore-lifetimes.rs b/src/test/ui/feature-gate-underscore-lifetimes.rs
index 9da50c5c877..9da50c5c877 100644
--- a/src/test/compile-fail/feature-gate-underscore-lifetimes.rs
+++ b/src/test/ui/feature-gate-underscore-lifetimes.rs
diff --git a/src/test/ui/feature-gate-underscore-lifetimes.stderr b/src/test/ui/feature-gate-underscore-lifetimes.stderr
new file mode 100644
index 00000000000..875b958aa88
--- /dev/null
+++ b/src/test/ui/feature-gate-underscore-lifetimes.stderr
@@ -0,0 +1,10 @@
+error: underscore lifetimes are unstable (see issue #44524)
+  --> $DIR/feature-gate-underscore-lifetimes.rs:13:23
+   |
+13 | fn foo(x: &u8) -> Foo<'_> { //~ ERROR underscore lifetimes are unstable
+   |                       ^^
+   |
+   = help: add #![feature(underscore_lifetimes)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/impl-trait/feature-gate-universal.rs b/src/test/ui/feature-gate-universal.rs
index e5bdf3a42eb..e5bdf3a42eb 100644
--- a/src/test/compile-fail/impl-trait/feature-gate-universal.rs
+++ b/src/test/ui/feature-gate-universal.rs
diff --git a/src/test/ui/feature-gate-universal.stderr b/src/test/ui/feature-gate-universal.stderr
new file mode 100644
index 00000000000..7f889f96224
--- /dev/null
+++ b/src/test/ui/feature-gate-universal.stderr
@@ -0,0 +1,10 @@
+error: `impl Trait` in argument position is experimental (see issue #34511)
+  --> $DIR/feature-gate-universal.rs:13:11
+   |
+13 | fn foo(x: impl std::fmt::Debug) { print!("{:?}", x); }
+   |           ^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(universal_impl_trait)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-unsized_tuple_coercion.rs b/src/test/ui/feature-gate-unsized_tuple_coercion.rs
index 4ddde011263..4ddde011263 100644
--- a/src/test/compile-fail/feature-gate-unsized_tuple_coercion.rs
+++ b/src/test/ui/feature-gate-unsized_tuple_coercion.rs
diff --git a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr
new file mode 100644
index 00000000000..f166b10613a
--- /dev/null
+++ b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr
@@ -0,0 +1,10 @@
+error: Unsized tuple coercion is not stable enough for use and is subject to change (see issue #42877)
+  --> $DIR/feature-gate-unsized_tuple_coercion.rs:12:24
+   |
+12 |     let _ : &(Send,) = &((),);
+   |                        ^^^^^^
+   |
+   = help: add #![feature(unsized_tuple_coercion)] 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/feature-gate-unwind-attributes.rs b/src/test/ui/feature-gate-unwind-attributes.rs
index c8f9cd943cd..c8f9cd943cd 100644
--- a/src/test/compile-fail/feature-gate-unwind-attributes.rs
+++ b/src/test/ui/feature-gate-unwind-attributes.rs
diff --git a/src/test/ui/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gate-unwind-attributes.stderr
new file mode 100644
index 00000000000..02d8bf914eb
--- /dev/null
+++ b/src/test/ui/feature-gate-unwind-attributes.stderr
@@ -0,0 +1,10 @@
+error: #[unwind] is experimental
+  --> $DIR/feature-gate-unwind-attributes.rs:21:5
+   |
+21 |     #[unwind] //~ ERROR #[unwind] is experimental
+   |     ^^^^^^^^^
+   |
+   = help: add #![feature(unwind_attributes)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-use_nested_groups.rs b/src/test/ui/feature-gate-use_nested_groups.rs
index 56413a999d7..56413a999d7 100644
--- a/src/test/compile-fail/feature-gate-use_nested_groups.rs
+++ b/src/test/ui/feature-gate-use_nested_groups.rs
diff --git a/src/test/ui/feature-gate-use_nested_groups.stderr b/src/test/ui/feature-gate-use_nested_groups.stderr
new file mode 100644
index 00000000000..79f1d1a168f
--- /dev/null
+++ b/src/test/ui/feature-gate-use_nested_groups.stderr
@@ -0,0 +1,26 @@
+error: nested groups in `use` are experimental (see issue #44494)
+  --> $DIR/feature-gate-use_nested_groups.rs:27:12
+   |
+27 | use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
+   |            ^^^^^^^^^^^^
+   |
+   = help: add #![feature(use_nested_groups)] to the crate attributes to enable
+
+error: glob imports in `use` groups are experimental (see issue #44494)
+  --> $DIR/feature-gate-use_nested_groups.rs:27:16
+   |
+27 | use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
+   |                ^
+   |
+   = help: add #![feature(use_nested_groups)] to the crate attributes to enable
+
+error: paths in `use` groups are experimental (see issue #44494)
+  --> $DIR/feature-gate-use_nested_groups.rs:27:19
+   |
+27 | use a::{B, d::{*, g::H}};  //~ ERROR glob imports in `use` groups are experimental
+   |                   ^^^^
+   |
+   = help: add #![feature(use_nested_groups)] to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate-used.rs b/src/test/ui/feature-gate-used.rs
index 68679d7dac8..68679d7dac8 100644
--- a/src/test/compile-fail/feature-gate-used.rs
+++ b/src/test/ui/feature-gate-used.rs
diff --git a/src/test/ui/feature-gate-used.stderr b/src/test/ui/feature-gate-used.stderr
new file mode 100644
index 00000000000..228cf12a08b
--- /dev/null
+++ b/src/test/ui/feature-gate-used.stderr
@@ -0,0 +1,10 @@
+error: the `#[used]` attribute is an experimental feature (see issue #40289)
+  --> $DIR/feature-gate-used.rs:11:1
+   |
+11 | #[used]
+   | ^^^^^^^
+   |
+   = help: add #![feature(used)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate-wasm_import_memory.rs b/src/test/ui/feature-gate-wasm_import_memory.rs
index a010ebb3551..a010ebb3551 100644
--- a/src/test/compile-fail/feature-gate-wasm_import_memory.rs
+++ b/src/test/ui/feature-gate-wasm_import_memory.rs
diff --git a/src/test/ui/feature-gate-wasm_import_memory.stderr b/src/test/ui/feature-gate-wasm_import_memory.stderr
new file mode 100644
index 00000000000..c0486d0d5f5
--- /dev/null
+++ b/src/test/ui/feature-gate-wasm_import_memory.stderr
@@ -0,0 +1,10 @@
+error: wasm_import_memory attribute is currently unstable
+  --> $DIR/feature-gate-wasm_import_memory.rs:11:1
+   |
+11 | #![wasm_import_memory] //~ ERROR: currently unstable
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(wasm_import_memory)] to the crate attributes to enable
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-bench.rs b/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs
index a34f98f0355..a34f98f0355 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-bench.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr
new file mode 100644
index 00000000000..f7d5473f443
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr
@@ -0,0 +1,4 @@
+error[E0601]: main function not found
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs
index ab2fe02bb14..ab2fe02bb14 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-builtin-attrs.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
new file mode 100644
index 00000000000..0e72442143b
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
@@ -0,0 +1,1354 @@
+warning: macro_escape is a deprecated synonym for macro_use
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1
+    |
+532 | #[macro_escape]
+    | ^^^^^^^^^^^^^^^
+
+warning: macro_escape is a deprecated synonym for macro_use
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:535:17
+    |
+535 |     mod inner { #![macro_escape] }
+    |                 ^^^^^^^^^^^^^^^^
+    |
+    = help: consider an outer attribute, #[macro_use] mod ...
+
+warning: `#[must_use]` on functions is experimental (see issue #43302)
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:682:5
+    |
+682 |     #[must_use = "1400"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^
+    |
+    = help: add #![feature(fn_must_use)] to the crate attributes to enable
+
+warning: unknown lint: `x5400`
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:49:33
+   |
+49 | #![warn                        (x5400)] //~ WARN unknown lint: `x5400`
+   |                                 ^^^^^
+   |
+note: lint level defined here
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:28
+   |
+44 | #![warn(unused_attributes, unknown_lints)]
+   |                            ^^^^^^^^^^^^^
+
+warning: unknown lint: `x5300`
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:50:33
+   |
+50 | #![allow                       (x5300)] //~ WARN unknown lint: `x5300`
+   |                                 ^^^^^
+
+warning: unknown lint: `x5200`
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:51:33
+   |
+51 | #![forbid                      (x5200)] //~ WARN unknown lint: `x5200`
+   |                                 ^^^^^
+
+warning: unknown lint: `x5100`
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:33
+   |
+52 | #![deny                        (x5100)] //~ WARN unknown lint: `x5100`
+   |                                 ^^^^^
+
+warning: unknown lint: `x5400`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:114:8
+    |
+114 | #[warn(x5400)]
+    |        ^^^^^
+
+warning: unknown lint: `x5400`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:117:25
+    |
+117 |     mod inner { #![warn(x5400)] }
+    |                         ^^^^^
+
+warning: unknown lint: `x5400`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:120:12
+    |
+120 |     #[warn(x5400)] fn f() { }
+    |            ^^^^^
+
+warning: unknown lint: `x5400`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:123:12
+    |
+123 |     #[warn(x5400)] struct S;
+    |            ^^^^^
+
+warning: unknown lint: `x5400`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:126:12
+    |
+126 |     #[warn(x5400)] type T = S;
+    |            ^^^^^
+
+warning: unknown lint: `x5400`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:12
+    |
+129 |     #[warn(x5400)] impl S { }
+    |            ^^^^^
+
+warning: unknown lint: `x5300`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:133:9
+    |
+133 | #[allow(x5300)]
+    |         ^^^^^
+
+warning: unknown lint: `x5300`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:136:26
+    |
+136 |     mod inner { #![allow(x5300)] }
+    |                          ^^^^^
+
+warning: unknown lint: `x5300`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:139:13
+    |
+139 |     #[allow(x5300)] fn f() { }
+    |             ^^^^^
+
+warning: unknown lint: `x5300`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:142:13
+    |
+142 |     #[allow(x5300)] struct S;
+    |             ^^^^^
+
+warning: unknown lint: `x5300`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:145:13
+    |
+145 |     #[allow(x5300)] type T = S;
+    |             ^^^^^
+
+warning: unknown lint: `x5300`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:13
+    |
+148 |     #[allow(x5300)] impl S { }
+    |             ^^^^^
+
+warning: unknown lint: `x5200`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:152:10
+    |
+152 | #[forbid(x5200)]
+    |          ^^^^^
+
+warning: unknown lint: `x5200`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:155:27
+    |
+155 |     mod inner { #![forbid(x5200)] }
+    |                           ^^^^^
+
+warning: unknown lint: `x5200`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:158:14
+    |
+158 |     #[forbid(x5200)] fn f() { }
+    |              ^^^^^
+
+warning: unknown lint: `x5200`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:161:14
+    |
+161 |     #[forbid(x5200)] struct S;
+    |              ^^^^^
+
+warning: unknown lint: `x5200`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:164:14
+    |
+164 |     #[forbid(x5200)] type T = S;
+    |              ^^^^^
+
+warning: unknown lint: `x5200`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:14
+    |
+167 |     #[forbid(x5200)] impl S { }
+    |              ^^^^^
+
+warning: unknown lint: `x5100`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:171:8
+    |
+171 | #[deny(x5100)]
+    |        ^^^^^
+
+warning: unknown lint: `x5100`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:174:25
+    |
+174 |     mod inner { #![deny(x5100)] }
+    |                         ^^^^^
+
+warning: unknown lint: `x5100`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:177:12
+    |
+177 |     #[deny(x5100)] fn f() { }
+    |            ^^^^^
+
+warning: unknown lint: `x5100`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:180:12
+    |
+180 |     #[deny(x5100)] struct S;
+    |            ^^^^^
+
+warning: unknown lint: `x5100`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:183:12
+    |
+183 |     #[deny(x5100)] type T = S;
+    |            ^^^^^
+
+warning: unknown lint: `x5100`
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:186:12
+    |
+186 |     #[deny(x5100)] impl S { }
+    |            ^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:17
+    |
+193 |     mod inner { #![macro_reexport="5000"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+note: lint level defined here
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:9
+    |
+44  | #![warn(unused_attributes, unknown_lints)]
+    |         ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:196:5
+    |
+196 |     #[macro_reexport = "5000"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:199:5
+    |
+199 |     #[macro_reexport = "5000"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:202:5
+    |
+202 |     #[macro_reexport = "5000"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:205:5
+    |
+205 |     #[macro_reexport = "5000"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:1
+    |
+190 | #[macro_reexport = "5000"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:213:5
+    |
+213 |     #[macro_use] fn f() { }
+    |     ^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:216:5
+    |
+216 |     #[macro_use] struct S;
+    |     ^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:219:5
+    |
+219 |     #[macro_use] type T = S;
+    |     ^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:5
+    |
+222 |     #[macro_use] impl S { }
+    |     ^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:229:17
+    |
+229 |     mod inner { #![macro_export="4800"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:232:5
+    |
+232 |     #[macro_export = "4800"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5
+    |
+235 |     #[macro_export = "4800"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:238:5
+    |
+238 |     #[macro_export = "4800"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:241:5
+    |
+241 |     #[macro_export = "4800"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:226:1
+    |
+226 | #[macro_export = "4800"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:248:17
+    |
+248 |     mod inner { #![plugin_registrar="4700"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:253:5
+    |
+253 |     #[plugin_registrar = "4700"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:256:5
+    |
+256 |     #[plugin_registrar = "4700"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:259:5
+    |
+259 |     #[plugin_registrar = "4700"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:1
+    |
+245 | #[plugin_registrar = "4700"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:266:17
+    |
+266 |     mod inner { #![main="4300"] }
+    |                 ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5
+    |
+271 |     #[main = "4400"] struct S;
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5
+    |
+274 |     #[main = "4400"] type T = S;
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:277:5
+    |
+277 |     #[main = "4400"] impl S { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:263:1
+    |
+263 | #[main = "4400"]
+    | ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:284:17
+    |
+284 |     mod inner { #![start="4300"] }
+    |                 ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:289:5
+    |
+289 |     #[start = "4300"] struct S;
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:292:5
+    |
+292 |     #[start = "4300"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:295:5
+    |
+295 |     #[start = "4300"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:281:1
+    |
+281 | #[start = "4300"]
+    | ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:334:17
+    |
+334 |     mod inner { #![simd="4000"] }
+    |                 ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:337:5
+    |
+337 |     #[simd = "4000"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:342:5
+    |
+342 |     #[simd = "4000"] type T = S;
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:345:5
+    |
+345 |     #[simd = "4000"] impl S { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:331:1
+    |
+331 | #[simd = "4000"]
+    | ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:352:17
+    |
+352 |     mod inner { #![repr="3900"] }
+    |                 ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5
+    |
+355 |     #[repr = "3900"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:360:5
+    |
+360 |     #[repr = "3900"] type T = S;
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:5
+    |
+363 |     #[repr = "3900"] impl S { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:349:1
+    |
+349 | #[repr = "3900"]
+    | ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5
+    |
+371 |     #[path = "3800"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5
+    |
+374 |     #[path = "3800"]  struct S;
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:5
+    |
+377 |     #[path = "3800"] type T = S;
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5
+    |
+380 |     #[path = "3800"] impl S { }
+    |     ^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:17
+    |
+387 |     mod inner { #![abi="3700"] }
+    |                 ^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5
+    |
+390 |     #[abi = "3700"] fn f() { }
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5
+    |
+393 |     #[abi = "3700"] struct S;
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5
+    |
+396 |     #[abi = "3700"] type T = S;
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:5
+    |
+399 |     #[abi = "3700"] impl S { }
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:1
+    |
+384 | #[abi = "3700"]
+    | ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:406:17
+    |
+406 |     mod inner { #![automatically_derived="3600"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5
+    |
+409 |     #[automatically_derived = "3600"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5
+    |
+412 |     #[automatically_derived = "3600"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:415:5
+    |
+415 |     #[automatically_derived = "3600"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:5
+    |
+418 |     #[automatically_derived = "3600"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:403:1
+    |
+403 | #[automatically_derived = "3600"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: function is marked #[no_mangle], but not exported
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:27
+    |
+426 |     #[no_mangle = "3500"] fn f() { }
+    |                           -^^^^^^^^^
+    |                           |
+    |                           help: try making it public: `pub `
+    |
+    = note: #[warn(private_no_mangle_fns)] on by default
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:17
+    |
+439 |     mod inner { #![no_link="3400"] }
+    |                 ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5
+    |
+442 |     #[no_link = "3400"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5
+    |
+445 |     #[no_link = "3400"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5
+    |
+448 |     #[no_link = "3400"]type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5
+    |
+451 |     #[no_link = "3400"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:436:1
+    |
+436 | #[no_link = "3400"]
+    | ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17
+    |
+458 |     mod inner { #![should_panic="3200"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5
+    |
+461 |     #[should_panic = "3200"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5
+    |
+464 |     #[should_panic = "3200"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5
+    |
+467 |     #[should_panic = "3200"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5
+    |
+470 |     #[should_panic = "3200"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1
+    |
+455 | #[should_panic = "3200"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:17
+    |
+477 |     mod inner { #![ignore="3100"] }
+    |                 ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:5
+    |
+480 |     #[ignore = "3100"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5
+    |
+483 |     #[ignore = "3100"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5
+    |
+486 |     #[ignore = "3100"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5
+    |
+489 |     #[ignore = "3100"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1
+    |
+474 | #[ignore = "3100"]
+    | ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:17
+    |
+496 |     mod inner { #![no_implicit_prelude="3000"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5
+    |
+499 |     #[no_implicit_prelude = "3000"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5
+    |
+502 |     #[no_implicit_prelude = "3000"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5
+    |
+505 |     #[no_implicit_prelude = "3000"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5
+    |
+508 |     #[no_implicit_prelude = "3000"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1
+    |
+493 | #[no_implicit_prelude = "3000"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:515:17
+    |
+515 |     mod inner { #![reexport_test_harness_main="2900"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:518:5
+    |
+518 |     #[reexport_test_harness_main = "2900"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:521:5
+    |
+521 |     #[reexport_test_harness_main = "2900"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:524:5
+    |
+524 |     #[reexport_test_harness_main = "2900"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:527:5
+    |
+527 |     #[reexport_test_harness_main = "2900"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:512:1
+    |
+512 | #[reexport_test_harness_main = "2900"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:538:5
+    |
+538 |     #[macro_escape] fn f() { }
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:5
+    |
+541 |     #[macro_escape] struct S;
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5
+    |
+544 |     #[macro_escape] type T = S;
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:547:5
+    |
+547 |     #[macro_escape] impl S { }
+    |     ^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:555:17
+    |
+555 |     mod inner { #![no_std="2600"] }
+    |                 ^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:555:17
+    |
+555 |     mod inner { #![no_std="2600"] }
+    |                 ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:559:5
+    |
+559 |     #[no_std = "2600"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:559:5
+    |
+559 |     #[no_std = "2600"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:563:5
+    |
+563 |     #[no_std = "2600"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:563:5
+    |
+563 |     #[no_std = "2600"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:5
+    |
+567 |     #[no_std = "2600"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:5
+    |
+567 |     #[no_std = "2600"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:5
+    |
+571 |     #[no_std = "2600"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:5
+    |
+571 |     #[no_std = "2600"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:1
+    |
+551 | #[no_std = "2600"]
+    | ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:1
+    |
+551 | #[no_std = "2600"]
+    | ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:17
+    |
+711 |     mod inner { #![crate_name="0900"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:17
+    |
+711 |     mod inner { #![crate_name="0900"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5
+    |
+715 |     #[crate_name = "0900"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5
+    |
+715 |     #[crate_name = "0900"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5
+    |
+719 |     #[crate_name = "0900"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5
+    |
+719 |     #[crate_name = "0900"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5
+    |
+723 |     #[crate_name = "0900"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5
+    |
+723 |     #[crate_name = "0900"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5
+    |
+727 |     #[crate_name = "0900"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5
+    |
+727 |     #[crate_name = "0900"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:1
+    |
+707 | #[crate_name = "0900"]
+    | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:1
+    |
+707 | #[crate_name = "0900"]
+    | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:736:17
+    |
+736 |     mod inner { #![crate_type="0800"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:736:17
+    |
+736 |     mod inner { #![crate_type="0800"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:740:5
+    |
+740 |     #[crate_type = "0800"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:740:5
+    |
+740 |     #[crate_type = "0800"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:5
+    |
+744 |     #[crate_type = "0800"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:5
+    |
+744 |     #[crate_type = "0800"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:748:5
+    |
+748 |     #[crate_type = "0800"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:748:5
+    |
+748 |     #[crate_type = "0800"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5
+    |
+752 |     #[crate_type = "0800"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5
+    |
+752 |     #[crate_type = "0800"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:1
+    |
+732 | #[crate_type = "0800"]
+    | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:1
+    |
+732 | #[crate_type = "0800"]
+    | ^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:17
+    |
+761 |     mod inner { #![feature(x0600)] }
+    |                 ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:17
+    |
+761 |     mod inner { #![feature(x0600)] }
+    |                 ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5
+    |
+765 |     #[feature(x0600)] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5
+    |
+765 |     #[feature(x0600)] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:5
+    |
+769 |     #[feature(x0600)] struct S;
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:5
+    |
+769 |     #[feature(x0600)] struct S;
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:5
+    |
+773 |     #[feature(x0600)] type T = S;
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:5
+    |
+773 |     #[feature(x0600)] type T = S;
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5
+    |
+777 |     #[feature(x0600)] impl S { }
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5
+    |
+777 |     #[feature(x0600)] impl S { }
+    |     ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:1
+    |
+757 | #[feature(x0600)]
+    | ^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:1
+    |
+757 | #[feature(x0600)]
+    | ^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:787:17
+    |
+787 |     mod inner { #![no_main="0400"] }
+    |                 ^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:787:17
+    |
+787 |     mod inner { #![no_main="0400"] }
+    |                 ^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:791:5
+    |
+791 |     #[no_main = "0400"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:791:5
+    |
+791 |     #[no_main = "0400"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:5
+    |
+795 |     #[no_main = "0400"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:5
+    |
+795 |     #[no_main = "0400"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:799:5
+    |
+799 |     #[no_main = "0400"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:799:5
+    |
+799 |     #[no_main = "0400"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:803:5
+    |
+803 |     #[no_main = "0400"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:803:5
+    |
+803 |     #[no_main = "0400"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:783:1
+    |
+783 | #[no_main = "0400"]
+    | ^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:783:1
+    |
+783 | #[no_main = "0400"]
+    | ^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:825:17
+    |
+825 |     mod inner { #![recursion_limit="0200"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:825:17
+    |
+825 |     mod inner { #![recursion_limit="0200"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:829:5
+    |
+829 |     #[recursion_limit="0200"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:829:5
+    |
+829 |     #[recursion_limit="0200"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:833:5
+    |
+833 |     #[recursion_limit="0200"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:833:5
+    |
+833 |     #[recursion_limit="0200"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:837:5
+    |
+837 |     #[recursion_limit="0200"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:837:5
+    |
+837 |     #[recursion_limit="0200"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:841:5
+    |
+841 |     #[recursion_limit="0200"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:841:5
+    |
+841 |     #[recursion_limit="0200"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:1
+    |
+821 | #[recursion_limit="0200"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:1
+    |
+821 | #[recursion_limit="0200"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:17
+    |
+850 |     mod inner { #![type_length_limit="0100"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be in the root module
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:17
+    |
+850 |     mod inner { #![type_length_limit="0100"] }
+    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:5
+    |
+854 |     #[type_length_limit="0100"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:5
+    |
+854 |     #[type_length_limit="0100"] fn f() { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:5
+    |
+858 |     #[type_length_limit="0100"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:5
+    |
+858 |     #[type_length_limit="0100"] struct S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:5
+    |
+862 |     #[type_length_limit="0100"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:5
+    |
+862 |     #[type_length_limit="0100"] type T = S;
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:866:5
+    |
+866 |     #[type_length_limit="0100"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:866:5
+    |
+866 |     #[type_length_limit="0100"] impl S { }
+    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:1
+    |
+846 | #[type_length_limit="0100"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo]
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:1
+    |
+846 | #[type_length_limit="0100"]
+    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1
+   |
+53 | #![macro_reexport             = "5000"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:1
+   |
+55 | #![macro_export               = "4800"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:56:1
+   |
+56 | #![plugin_registrar           = "4700"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1
+   |
+59 | #![main                      = "x4400"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1
+   |
+60 | #![start                     = "x4300"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:63:1
+   |
+63 | #![simd                       = "4000"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:64:1
+   |
+64 | #![repr                       = "3900"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1
+   |
+65 | #![path                       = "3800"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1
+   |
+66 | #![abi                        = "3700"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:67:1
+   |
+67 | #![automatically_derived      = "3600"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:69:1
+   |
+69 | #![no_link                    = "3400"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:71:1
+   |
+71 | #![should_panic               = "3200"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:72:1
+   |
+72 | #![ignore                     = "3100"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: unused attribute
+  --> $DIR/issue-43106-gating-of-builtin-attrs.rs:78:1
+   |
+78 | #![proc_macro_derive          = "2500"] //~ WARN unused attribute
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: compilation successful
+   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:877:1
+    |
+877 | / fn main() { //~ ERROR compilation successful
+878 | |     println!("Hello World");
+879 | | }
+    | |_^
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-deprecated.rs b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs
index 98da43c3a22..98da43c3a22 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-deprecated.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr
new file mode 100644
index 00000000000..a413fcc56a0
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr
@@ -0,0 +1,8 @@
+error: compilation successful
+  --> $DIR/issue-43106-gating-of-deprecated.rs:29:1
+   |
+29 | / fn main() { //~ ERROR compilation successful
+30 | |     println!("Hello World");
+31 | | }
+   | |_^
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-derive-2.rs b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.rs
index 2dbc6cb140d..2dbc6cb140d 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-derive-2.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr
new file mode 100644
index 00000000000..c5b33384b91
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr
@@ -0,0 +1,20 @@
+error: cannot find derive macro `x3300` in this scope
+  --> $DIR/issue-43106-gating-of-derive-2.rs:14:14
+   |
+14 |     #[derive(x3300)]
+   |              ^^^^^
+
+error: cannot find derive macro `x3300` in this scope
+  --> $DIR/issue-43106-gating-of-derive-2.rs:18:14
+   |
+18 |     #[derive(x3300)]
+   |              ^^^^^
+
+error: cannot find derive macro `x3300` in this scope
+  --> $DIR/issue-43106-gating-of-derive-2.rs:22:14
+   |
+22 |     #[derive(x3300)]
+   |              ^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-derive.rs b/src/test/ui/feature-gate/issue-43106-gating-of-derive.rs
index e5293ebb94d..e5293ebb94d 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-derive.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr
new file mode 100644
index 00000000000..a0b12585f3c
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr
@@ -0,0 +1,38 @@
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43106-gating-of-derive.rs:14:1
+   |
+14 | #![derive(Debug)]
+   | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]`
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43106-gating-of-derive.rs:17:1
+   |
+17 | #[derive(Debug)]
+   | ^^^^^^^^^^^^^^^^
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43106-gating-of-derive.rs:20:17
+   |
+20 |     mod inner { #![derive(Debug)] }
+   |                 ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]`
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43106-gating-of-derive.rs:23:5
+   |
+23 |     #[derive(Debug)]
+   |     ^^^^^^^^^^^^^^^^
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43106-gating-of-derive.rs:36:5
+   |
+36 |     #[derive(Debug)]
+   |     ^^^^^^^^^^^^^^^^
+
+error: `derive` may only be applied to structs, enums and unions
+  --> $DIR/issue-43106-gating-of-derive.rs:40:5
+   |
+40 |     #[derive(Debug)]
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs b/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs
index 24e77bf60a8..24e77bf60a8 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr
new file mode 100644
index 00000000000..92bda4d0446
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr
@@ -0,0 +1,43 @@
+error[E0518]: attribute should be applied to function
+  --> $DIR/issue-43106-gating-of-inline.rs:21:1
+   |
+21 |   #[inline = "2100"]
+   |   ^^^^^^^^^^^^^^^^^^
+22 |   //~^ ERROR attribute should be applied to function
+23 | / mod inline {
+24 | |     mod inner { #![inline="2100"] }
+25 | |     //~^ ERROR attribute should be applied to function
+26 | |
+...  |
+36 | |     //~^ ERROR attribute should be applied to function
+37 | | }
+   | |_- not a function
+
+error[E0518]: attribute should be applied to function
+  --> $DIR/issue-43106-gating-of-inline.rs:24:17
+   |
+24 |     mod inner { #![inline="2100"] }
+   |     ------------^^^^^^^^^^^^^^^^^-- not a function
+
+error[E0518]: attribute should be applied to function
+  --> $DIR/issue-43106-gating-of-inline.rs:29:5
+   |
+29 |     #[inline = "2100"] struct S;
+   |     ^^^^^^^^^^^^^^^^^^ --------- not a function
+
+error[E0518]: attribute should be applied to function
+  --> $DIR/issue-43106-gating-of-inline.rs:32:5
+   |
+32 |     #[inline = "2100"] type T = S;
+   |     ^^^^^^^^^^^^^^^^^^ ----------- not a function
+
+error[E0518]: attribute should be applied to function
+  --> $DIR/issue-43106-gating-of-inline.rs:35:5
+   |
+35 |     #[inline = "2100"] impl S { }
+   |     ^^^^^^^^^^^^^^^^^^ ---------- not a function
+
+error[E0601]: main function not found
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_escape.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs
index 3b2dbdefeba..3b2dbdefeba 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_escape.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
new file mode 100644
index 00000000000..60a9382bdb8
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
@@ -0,0 +1,12 @@
+warning: macro_escape is a deprecated synonym for macro_use
+  --> $DIR/issue-43106-gating-of-macro_escape.rs:16:1
+   |
+16 | #![macro_escape]
+   | ^^^^^^^^^^^^^^^^
+   |
+   = help: consider an outer attribute, #[macro_use] mod ...
+
+error[E0601]: main function not found
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_use.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs
index cf5619da3c7..cf5619da3c7 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_use.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr
new file mode 100644
index 00000000000..2977384f62d
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr
@@ -0,0 +1,20 @@
+error: arguments to macro_use are not allowed here
+  --> $DIR/issue-43106-gating-of-macro_use.rs:16:1
+   |
+16 | #![macro_use                  = "4900"] //~ ERROR arguments to macro_use are not allowed here
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: arguments to macro_use are not allowed here
+  --> $DIR/issue-43106-gating-of-macro_use.rs:18:1
+   |
+18 | #[macro_use = "2700"]
+   | ^^^^^^^^^^^^^^^^^^^^^
+
+error: arguments to macro_use are not allowed here
+  --> $DIR/issue-43106-gating-of-macro_use.rs:21:17
+   |
+21 |     mod inner { #![macro_use="2700"] }
+   |                 ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-proc_macro_derive.rs b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs
index 133f70e0f3b..133f70e0f3b 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-proc_macro_derive.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr
new file mode 100644
index 00000000000..a76f0219f7a
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr
@@ -0,0 +1,40 @@
+error: the `#[proc_macro_derive]` attribute may only be used on bare functions
+  --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:20:1
+   |
+20 | #[proc_macro_derive = "2500"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `#[proc_macro_derive]` attribute may only be used on bare functions
+  --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:28:17
+   |
+28 |     mod inner { #![proc_macro_derive="2500"] }
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
+  --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:31:5
+   |
+31 |     #[proc_macro_derive = "2500"] fn f() { }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `#[proc_macro_derive]` attribute may only be used on bare functions
+  --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:34:5
+   |
+34 |     #[proc_macro_derive = "2500"] struct S;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `#[proc_macro_derive]` attribute may only be used on bare functions
+  --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:37:5
+   |
+37 |     #[proc_macro_derive = "2500"] type T = S;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: the `#[proc_macro_derive]` attribute may only be used on bare functions
+  --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:40:5
+   |
+40 |     #[proc_macro_derive = "2500"] impl S { }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0601]: main function not found
+
+error: aborting due to 7 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.rs
index 10c13986349..10c13986349 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr
new file mode 100644
index 00000000000..6f6f587cb53
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr
@@ -0,0 +1,46 @@
+error[E0601]: main function not found
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:17:1
+   |
+17 | #![rustc_deprecated           = "1500"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:20:1
+   |
+20 | #[rustc_deprecated = "1500"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:23:17
+   |
+23 |     mod inner { #![rustc_deprecated="1500"] }
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:26:5
+   |
+26 |     #[rustc_deprecated = "1500"] fn f() { }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:29:5
+   |
+29 |     #[rustc_deprecated = "1500"] struct S;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:32:5
+   |
+32 |     #[rustc_deprecated = "1500"] type T = S;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:35:5
+   |
+35 |     #[rustc_deprecated = "1500"] impl S { }
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 9 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs b/src/test/ui/feature-gate/issue-43106-gating-of-stable.rs
index a6eaabf7a38..a6eaabf7a38 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-stable.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr
new file mode 100644
index 00000000000..59f0431c708
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr
@@ -0,0 +1,46 @@
+error[E0601]: main function not found
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:17:1
+   |
+17 | #![stable                     = "1300"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:20:1
+   |
+20 | #[stable = "1300"]
+   | ^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:23:17
+   |
+23 |     mod inner { #![stable="1300"] }
+   |                 ^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:26:5
+   |
+26 |     #[stable = "1300"] fn f() { }
+   |     ^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:29:5
+   |
+29 |     #[stable = "1300"] struct S;
+   |     ^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:32:5
+   |
+32 |     #[stable = "1300"] type T = S;
+   |     ^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-stable.rs:35:5
+   |
+35 |     #[stable = "1300"] impl S { }
+   |     ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 9 previous errors
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-test.rs b/src/test/ui/feature-gate/issue-43106-gating-of-test.rs
index adcbfe77280..adcbfe77280 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-test.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-test.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-test.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-test.stderr
new file mode 100644
index 00000000000..f7d5473f443
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-test.stderr
@@ -0,0 +1,4 @@
+error[E0601]: main function not found
+
+error: aborting due to previous error
+
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.rs
index ff0600deb19..ff0600deb19 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.rs
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr
new file mode 100644
index 00000000000..00cbc62ab47
--- /dev/null
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr
@@ -0,0 +1,46 @@
+error[E0601]: main function not found
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:17:1
+   |
+17 | #![unstable                   = "1200"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:20:1
+   |
+20 | #[unstable = "1200"]
+   | ^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:23:17
+   |
+23 |     mod inner { #![unstable="1200"] }
+   |                 ^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:26:5
+   |
+26 |     #[unstable = "1200"] fn f() { }
+   |     ^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:29:5
+   |
+29 |     #[unstable = "1200"] struct S;
+   |     ^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:32:5
+   |
+32 |     #[unstable = "1200"] type T = S;
+   |     ^^^^^^^^^^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/issue-43106-gating-of-unstable.rs:35:5
+   |
+35 |     #[unstable = "1200"] impl S { }
+   |     ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 9 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
+
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 9736c039930..eca225ee8a8 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -89,7 +89,9 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) {
 
     let mut contents = String::new();
 
-    super::walk_many(&[&path.join("test/compile-fail"),
+    super::walk_many(&[&path.join("test/ui-fulldeps"),
+                       &path.join("test/ui"),
+                       &path.join("test/compile-fail"),
                        &path.join("test/compile-fail-fulldeps"),
                        &path.join("test/parse-fail"),],
                      &mut |path| super::filter_dirs(path),
@@ -150,9 +152,9 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) {
 
     for &(name, _) in gate_untested.iter() {
         println!("Expected a gate test for the feature '{}'.", name);
-        println!("Hint: create a file named 'feature-gate-{}.rs' in the compile-fail\
-                \n      test suite, with its failures due to missing usage of\
-                \n      #![feature({})].", name, name);
+        println!("Hint: create a failing test file named 'feature-gate-{}.rs'\
+                \n      in the 'ui' test suite, with its failures due to\
+                \n      missing usage of #![feature({})].", name, name);
         println!("Hint: If you already have such a test and don't want to rename it,\
                 \n      you can also add a // gate-test-{} line to the test file.",
                  name);