about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/liballoc/lib.rs1
-rw-r--r--src/libcore/lib.rs1
-rw-r--r--src/librustc_lint/builtin.rs37
-rw-r--r--src/librustc_lint/lib.rs1
-rw-r--r--src/libsyntax/feature_gate.rs17
-rw-r--r--src/test/ui/associated-type-bounds/duplicate.stderr2
-rw-r--r--src/test/ui/associated-type-bounds/dyn-lcsit.stderr2
-rw-r--r--src/test/ui/associated-type-bounds/lcsit.stderr2
-rw-r--r--src/test/ui/const-generics/apit-with-const-param.stderr2
-rw-r--r--src/test/ui/const-generics/array-wrapper-struct-ctor.stderr2
-rw-r--r--src/test/ui/const-generics/broken-mir-1.stderr2
-rw-r--r--src/test/ui/const-generics/broken-mir-2.stderr2
-rw-r--r--src/test/ui/const-generics/cannot-infer-const-args.stderr2
-rw-r--r--src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr2
-rw-r--r--src/test/ui/const-generics/concrete-const-as-fn-arg.stderr2
-rw-r--r--src/test/ui/const-generics/concrete-const-impl-method.stderr2
-rw-r--r--src/test/ui/const-generics/condition-in-trait-const-arg.stderr2
-rw-r--r--src/test/ui/const-generics/const-arg-in-fn.stderr2
-rw-r--r--src/test/ui/const-generics/const-expression-parameter.stderr2
-rw-r--r--src/test/ui/const-generics/const-fn-with-const-param.stderr14
-rw-r--r--src/test/ui/const-generics/const-generic-array-wrapper.stderr2
-rw-r--r--src/test/ui/const-generics/const-param-before-other-params.rs1
-rw-r--r--src/test/ui/const-generics/const-param-before-other-params.stderr10
-rw-r--r--src/test/ui/const-generics/const-param-from-outer-fn.stderr14
-rw-r--r--src/test/ui/const-generics/const-param-in-trait.stderr2
-rw-r--r--src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr12
-rw-r--r--src/test/ui/const-generics/const-parameter-uppercase-lint.stderr2
-rw-r--r--src/test/ui/const-generics/const-types.stderr2
-rw-r--r--src/test/ui/const-generics/derive-debug-array-wrapper.stderr2
-rw-r--r--src/test/ui/const-generics/fn-taking-const-generic-array.stderr2
-rw-r--r--src/test/ui/const-generics/impl-const-generic-struct.stderr2
-rw-r--r--src/test/ui/const-generics/incorrect-number-of-const-args.stderr2
-rw-r--r--src/test/ui/const-generics/issue-60818-struct-constructors.stderr2
-rw-r--r--src/test/ui/const-generics/issue-61336-1.stderr2
-rw-r--r--src/test/ui/const-generics/issue-61336-2.stderr2
-rw-r--r--src/test/ui/const-generics/issue-61336.stderr2
-rw-r--r--src/test/ui/const-generics/issue-61422.stderr2
-rw-r--r--src/test/ui/const-generics/mut-ref-const-param-array.stderr2
-rw-r--r--src/test/ui/const-generics/struct-with-invalid-const-param.stderr12
-rw-r--r--src/test/ui/const-generics/transparent-maybeunit-array-wrapper.stderr2
-rw-r--r--src/test/ui/const-generics/uninferred-consts-during-codegen-1.stderr2
-rw-r--r--src/test/ui/const-generics/uninferred-consts-during-codegen-2.stderr2
-rw-r--r--src/test/ui/const-generics/unused-const-param.stderr2
-rw-r--r--src/test/ui/error-codes/E0730.stderr2
-rw-r--r--src/test/ui/existential_types/existential_type_const.stderr2
-rw-r--r--src/test/ui/hygiene/generic_params.stderr2
-rw-r--r--src/test/ui/hygiene/issue-61574-const-parameters.stderr2
-rw-r--r--src/test/ui/impl-trait-in-bindings.stderr2
-rw-r--r--src/test/ui/impl-trait/bindings-opaque.stderr2
-rw-r--r--src/test/ui/impl-trait/bindings.stderr14
-rw-r--r--src/test/ui/impl-trait/bound-normalization-fail.stderr2
-rw-r--r--src/test/ui/impl-trait/bound-normalization-pass.stderr2
-rw-r--r--src/test/ui/issues/issue-59508-1.stderr12
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr26
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/collections.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/iterable.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/shadowing.stderr2
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr2
65 files changed, 204 insertions, 70 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 3a7dce88a16..98fa754759a 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -69,6 +69,7 @@
 #![warn(missing_debug_implementations)]
 #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
 #![allow(explicit_outlives_requirements)]
+#![cfg_attr(not(bootstrap), allow(incomplete_features))]
 
 #![cfg_attr(not(test), feature(generator_trait))]
 #![cfg_attr(test, feature(test))]
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index bdfc1e66fd4..4d627383fd7 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -63,6 +63,7 @@
 #![warn(missing_debug_implementations)]
 #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
 #![allow(explicit_outlives_requirements)]
+#![cfg_attr(not(bootstrap), allow(incomplete_features))]
 
 #![feature(allow_internal_unstable)]
 #![feature(arbitrary_self_types)]
diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs
index b63d14ca949..6ac68e86e4b 100644
--- a/src/librustc_lint/builtin.rs
+++ b/src/librustc_lint/builtin.rs
@@ -33,13 +33,12 @@ use lint::{LintPass, LateLintPass, EarlyLintPass, EarlyContext};
 use rustc::util::nodemap::FxHashSet;
 
 use syntax::tokenstream::{TokenTree, TokenStream};
-use syntax::ast;
+use syntax::ast::{self, Expr};
 use syntax::ptr::P;
-use syntax::ast::Expr;
 use syntax::attr::{self, HasAttrs, AttributeTemplate};
 use syntax::source_map::Spanned;
 use syntax::edition::Edition;
-use syntax::feature_gate::{AttributeGate, AttributeType};
+use syntax::feature_gate::{self, AttributeGate, AttributeType};
 use syntax::feature_gate::{Stability, deprecated_attributes};
 use syntax_pos::{BytePos, Span, SyntaxContext};
 use syntax::symbol::{Symbol, kw, sym};
@@ -1831,3 +1830,35 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ExplicitOutlivesRequirements {
         }
     }
 }
+
+declare_lint! {
+    pub INCOMPLETE_FEATURES,
+    Warn,
+    "incomplete features that may function improperly in some or all cases"
+}
+
+declare_lint_pass!(
+    /// Check for used feature gates in `INCOMPLETE_FEATURES` in `feature_gate.rs`.
+    IncompleteFeatures => [INCOMPLETE_FEATURES]
+);
+
+impl EarlyLintPass for IncompleteFeatures {
+    fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) {
+        let features = cx.sess.features_untracked();
+        features.declared_lang_features
+            .iter().map(|(name, span, _)| (name, span))
+            .chain(features.declared_lib_features.iter().map(|(name, span)| (name, span)))
+            .filter(|(name, _)| feature_gate::INCOMPLETE_FEATURES.iter().any(|f| name == &f))
+            .for_each(|(name, &span)| {
+                cx.struct_span_lint(
+                    INCOMPLETE_FEATURES,
+                    span,
+                    &format!(
+                        "the feature `{}` is incomplete and may cause the compiler to crash",
+                        name,
+                    )
+                )
+                .emit();
+            });
+    }
+}
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index d3975360525..78bc164ba1a 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -97,6 +97,7 @@ macro_rules! early_lint_passes {
             DeprecatedAttr: DeprecatedAttr::new(),
             WhileTrue: WhileTrue,
             NonAsciiIdents: NonAsciiIdents,
+            IncompleteFeatures: IncompleteFeatures,
         ]);
     )
 }
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d11deeb8645..4f637a23e69 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -565,10 +565,10 @@ declare_features! (
     // -------------------------------------------------------------------------
 );
 
-// Some features are known to be incomplete and using them is likely to have
-// unanticipated results, such as compiler crashes. We warn the user about these
-// to alert them.
-const INCOMPLETE_FEATURES: &[Symbol] = &[
+/// Some features are known to be incomplete and using them is likely to have
+/// unanticipated results, such as compiler crashes. We warn the user about these
+/// to alert them.
+pub const INCOMPLETE_FEATURES: &[Symbol] = &[
     sym::impl_trait_in_bindings,
     sym::generic_associated_types,
     sym::const_generics,
@@ -2325,15 +2325,6 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
             }
 
             let name = mi.name_or_empty();
-            if INCOMPLETE_FEATURES.iter().any(|f| name == *f) {
-                span_handler.struct_span_warn(
-                    mi.span(),
-                    &format!(
-                        "the feature `{}` is incomplete and may cause the compiler to crash",
-                        name
-                    )
-                ).emit();
-            }
 
             if let Some(edition) = ALL_EDITIONS.iter().find(|e| name == e.feature_name()) {
                 if *edition <= crate_edition {
diff --git a/src/test/ui/associated-type-bounds/duplicate.stderr b/src/test/ui/associated-type-bounds/duplicate.stderr
index 68367c91654..7f14a033688 100644
--- a/src/test/ui/associated-type-bounds/duplicate.stderr
+++ b/src/test/ui/associated-type-bounds/duplicate.stderr
@@ -3,6 +3,8 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
   --> $DIR/duplicate.rs:12:36
diff --git a/src/test/ui/associated-type-bounds/dyn-lcsit.stderr b/src/test/ui/associated-type-bounds/dyn-lcsit.stderr
index 5fe4818ef8f..1b3975f0999 100644
--- a/src/test/ui/associated-type-bounds/dyn-lcsit.stderr
+++ b/src/test/ui/associated-type-bounds/dyn-lcsit.stderr
@@ -3,4 +3,6 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/associated-type-bounds/lcsit.stderr b/src/test/ui/associated-type-bounds/lcsit.stderr
index 8fda11beddc..7c4349541e0 100644
--- a/src/test/ui/associated-type-bounds/lcsit.stderr
+++ b/src/test/ui/associated-type-bounds/lcsit.stderr
@@ -3,4 +3,6 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/apit-with-const-param.stderr b/src/test/ui/const-generics/apit-with-const-param.stderr
index b3038ee6488..c4ad38a5711 100644
--- a/src/test/ui/const-generics/apit-with-const-param.stderr
+++ b/src/test/ui/const-generics/apit-with-const-param.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/array-wrapper-struct-ctor.stderr b/src/test/ui/const-generics/array-wrapper-struct-ctor.stderr
index bd18264c163..5a5eaba0b19 100644
--- a/src/test/ui/const-generics/array-wrapper-struct-ctor.stderr
+++ b/src/test/ui/const-generics/array-wrapper-struct-ctor.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/broken-mir-1.stderr b/src/test/ui/const-generics/broken-mir-1.stderr
index 55dc7fcb7cc..51de98ad523 100644
--- a/src/test/ui/const-generics/broken-mir-1.stderr
+++ b/src/test/ui/const-generics/broken-mir-1.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/broken-mir-2.stderr b/src/test/ui/const-generics/broken-mir-2.stderr
index 7cad4017712..b72bc6a46a0 100644
--- a/src/test/ui/const-generics/broken-mir-2.stderr
+++ b/src/test/ui/const-generics/broken-mir-2.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0277]: arrays only have std trait implementations for lengths 0..=32
   --> $DIR/broken-mir-2.rs:7:36
diff --git a/src/test/ui/const-generics/cannot-infer-const-args.stderr b/src/test/ui/const-generics/cannot-infer-const-args.stderr
index 544cd05cdbe..32adc63156a 100644
--- a/src/test/ui/const-generics/cannot-infer-const-args.stderr
+++ b/src/test/ui/const-generics/cannot-infer-const-args.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0282]: type annotations needed
   --> $DIR/cannot-infer-const-args.rs:9:5
diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr b/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr
index 52907bbb677..00a98e3ba9b 100644
--- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr
+++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr b/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr
index 955b319d700..0392488fce1 100644
--- a/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr
+++ b/src/test/ui/const-generics/concrete-const-as-fn-arg.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/concrete-const-impl-method.stderr b/src/test/ui/const-generics/concrete-const-impl-method.stderr
index 3ce488c6275..5e730b5643a 100644
--- a/src/test/ui/const-generics/concrete-const-impl-method.stderr
+++ b/src/test/ui/const-generics/concrete-const-impl-method.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/condition-in-trait-const-arg.stderr b/src/test/ui/const-generics/condition-in-trait-const-arg.stderr
index 7c85651e708..c9e22ab3901 100644
--- a/src/test/ui/const-generics/condition-in-trait-const-arg.stderr
+++ b/src/test/ui/const-generics/condition-in-trait-const-arg.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/const-arg-in-fn.stderr b/src/test/ui/const-generics/const-arg-in-fn.stderr
index e32b714b25d..61ba9cdaf55 100644
--- a/src/test/ui/const-generics/const-arg-in-fn.stderr
+++ b/src/test/ui/const-generics/const-arg-in-fn.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/const-expression-parameter.stderr b/src/test/ui/const-generics/const-expression-parameter.stderr
index c255127c280..7311e27c289 100644
--- a/src/test/ui/const-generics/const-expression-parameter.stderr
+++ b/src/test/ui/const-generics/const-expression-parameter.stderr
@@ -9,6 +9,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/const-generics/const-fn-with-const-param.stderr b/src/test/ui/const-generics/const-fn-with-const-param.stderr
index c0cd7bace47..3437ed33d0c 100644
--- a/src/test/ui/const-generics/const-fn-with-const-param.stderr
+++ b/src/test/ui/const-generics/const-fn-with-const-param.stderr
@@ -1,9 +1,3 @@
-warning: the feature `const_generics` is incomplete and may cause the compiler to crash
-  --> $DIR/const-fn-with-const-param.rs:1:12
-   |
-LL | #![feature(const_generics)]
-   |            ^^^^^^^^^^^^^^
-
 error: const parameters are not permitted in `const fn`
   --> $DIR/const-fn-with-const-param.rs:4:1
    |
@@ -13,5 +7,13 @@ LL | |     X
 LL | | }
    | |_^
 
+warning: the feature `const_generics` is incomplete and may cause the compiler to crash
+  --> $DIR/const-fn-with-const-param.rs:1:12
+   |
+LL | #![feature(const_generics)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
 error: aborting due to previous error
 
diff --git a/src/test/ui/const-generics/const-generic-array-wrapper.stderr b/src/test/ui/const-generics/const-generic-array-wrapper.stderr
index f92e11d47ed..5c7b6a70d3b 100644
--- a/src/test/ui/const-generics/const-generic-array-wrapper.stderr
+++ b/src/test/ui/const-generics/const-generic-array-wrapper.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/const-param-before-other-params.rs b/src/test/ui/const-generics/const-param-before-other-params.rs
index 2c81681b85e..5bdbfd8ff1f 100644
--- a/src/test/ui/const-generics/const-param-before-other-params.rs
+++ b/src/test/ui/const-generics/const-param-before-other-params.rs
@@ -1,5 +1,4 @@
 #![feature(const_generics)]
-//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
 
 fn bar<const X: (), 'a>(_: &'a ()) {
     //~^ ERROR lifetime parameters must be declared prior to const parameters
diff --git a/src/test/ui/const-generics/const-param-before-other-params.stderr b/src/test/ui/const-generics/const-param-before-other-params.stderr
index 33f981d1eba..87622f7e500 100644
--- a/src/test/ui/const-generics/const-param-before-other-params.stderr
+++ b/src/test/ui/const-generics/const-param-before-other-params.stderr
@@ -1,17 +1,11 @@
-warning: the feature `const_generics` is incomplete and may cause the compiler to crash
-  --> $DIR/const-param-before-other-params.rs:1:12
-   |
-LL | #![feature(const_generics)]
-   |            ^^^^^^^^^^^^^^
-
 error: lifetime parameters must be declared prior to const parameters
-  --> $DIR/const-param-before-other-params.rs:4:21
+  --> $DIR/const-param-before-other-params.rs:3:21
    |
 LL | fn bar<const X: (), 'a>(_: &'a ()) {
    |       --------------^^- help: reorder the parameters: lifetimes, then types, then consts: `<'a, const X: ()>`
 
 error: type parameters must be declared prior to const parameters
-  --> $DIR/const-param-before-other-params.rs:8:21
+  --> $DIR/const-param-before-other-params.rs:7:21
    |
 LL | fn foo<const X: (), T>(_: &T) {
    |       --------------^- help: reorder the parameters: lifetimes, then types, then consts: `<T, const X: ()>`
diff --git a/src/test/ui/const-generics/const-param-from-outer-fn.stderr b/src/test/ui/const-generics/const-param-from-outer-fn.stderr
index f0b7562f621..90ca85cd62f 100644
--- a/src/test/ui/const-generics/const-param-from-outer-fn.stderr
+++ b/src/test/ui/const-generics/const-param-from-outer-fn.stderr
@@ -1,9 +1,3 @@
-warning: the feature `const_generics` is incomplete and may cause the compiler to crash
-  --> $DIR/const-param-from-outer-fn.rs:1:12
-   |
-LL | #![feature(const_generics)]
-   |            ^^^^^^^^^^^^^^
-
 error[E0401]: can't use generic parameters from outer function
   --> $DIR/const-param-from-outer-fn.rs:6:9
    |
@@ -14,6 +8,14 @@ LL |     fn bar() -> u32 {
 LL |         X
    |         ^ use of generic parameter from outer function
 
+warning: the feature `const_generics` is incomplete and may cause the compiler to crash
+  --> $DIR/const-param-from-outer-fn.rs:1:12
+   |
+LL | #![feature(const_generics)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
 error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0401`.
diff --git a/src/test/ui/const-generics/const-param-in-trait.stderr b/src/test/ui/const-generics/const-param-in-trait.stderr
index a48eefddaa8..c45523d2fa6 100644
--- a/src/test/ui/const-generics/const-param-in-trait.stderr
+++ b/src/test/ui/const-generics/const-param-in-trait.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
index c7dcbe13542..142efe45ac2 100644
--- a/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
+++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
@@ -1,14 +1,16 @@
+error[E0671]: const parameters cannot depend on type parameters
+  --> $DIR/const-param-type-depends-on-type-param.rs:9:34
+   |
+LL | pub struct Dependent<T, const X: T>([(); X]);
+   |                                  ^ const parameter depends on type parameter
+
 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
   --> $DIR/const-param-type-depends-on-type-param.rs:1:12
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
-
-error[E0671]: const parameters cannot depend on type parameters
-  --> $DIR/const-param-type-depends-on-type-param.rs:9:34
    |
-LL | pub struct Dependent<T, const X: T>([(); X]);
-   |                                  ^ const parameter depends on type parameter
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0392]: parameter `T` is never used
   --> $DIR/const-param-type-depends-on-type-param.rs:9:22
diff --git a/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr b/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr
index 190798d202b..fddb06981bc 100644
--- a/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr
+++ b/src/test/ui/const-generics/const-parameter-uppercase-lint.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: const parameter `x` should have an upper case name
   --> $DIR/const-parameter-uppercase-lint.rs:6:15
diff --git a/src/test/ui/const-generics/const-types.stderr b/src/test/ui/const-generics/const-types.stderr
index fbf5d537541..ca3d7810ca5 100644
--- a/src/test/ui/const-generics/const-types.stderr
+++ b/src/test/ui/const-generics/const-types.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/derive-debug-array-wrapper.stderr b/src/test/ui/const-generics/derive-debug-array-wrapper.stderr
index 799ab145edf..08a9037a207 100644
--- a/src/test/ui/const-generics/derive-debug-array-wrapper.stderr
+++ b/src/test/ui/const-generics/derive-debug-array-wrapper.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0277]: arrays only have std trait implementations for lengths 0..=32
   --> $DIR/derive-debug-array-wrapper.rs:6:5
diff --git a/src/test/ui/const-generics/fn-taking-const-generic-array.stderr b/src/test/ui/const-generics/fn-taking-const-generic-array.stderr
index 36704128325..d7f8f1364ee 100644
--- a/src/test/ui/const-generics/fn-taking-const-generic-array.stderr
+++ b/src/test/ui/const-generics/fn-taking-const-generic-array.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/impl-const-generic-struct.stderr b/src/test/ui/const-generics/impl-const-generic-struct.stderr
index d443e060a97..1eae9c40389 100644
--- a/src/test/ui/const-generics/impl-const-generic-struct.stderr
+++ b/src/test/ui/const-generics/impl-const-generic-struct.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/incorrect-number-of-const-args.stderr b/src/test/ui/const-generics/incorrect-number-of-const-args.stderr
index 11727733eb5..6aa1c23176b 100644
--- a/src/test/ui/const-generics/incorrect-number-of-const-args.stderr
+++ b/src/test/ui/const-generics/incorrect-number-of-const-args.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0107]: wrong number of const arguments: expected 2, found 1
   --> $DIR/incorrect-number-of-const-args.rs:9:5
diff --git a/src/test/ui/const-generics/issue-60818-struct-constructors.stderr b/src/test/ui/const-generics/issue-60818-struct-constructors.stderr
index 4b8f50b9b02..3e0cd816881 100644
--- a/src/test/ui/const-generics/issue-60818-struct-constructors.stderr
+++ b/src/test/ui/const-generics/issue-60818-struct-constructors.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/issue-61336-1.stderr b/src/test/ui/const-generics/issue-61336-1.stderr
index 1a5bb9f763b..949fa896d87 100644
--- a/src/test/ui/const-generics/issue-61336-1.stderr
+++ b/src/test/ui/const-generics/issue-61336-1.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: array lengths can't depend on generic parameters
   --> $DIR/issue-61336-1.rs:5:9
diff --git a/src/test/ui/const-generics/issue-61336-2.stderr b/src/test/ui/const-generics/issue-61336-2.stderr
index 473ed46b104..63f86c81b1e 100644
--- a/src/test/ui/const-generics/issue-61336-2.stderr
+++ b/src/test/ui/const-generics/issue-61336-2.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: array lengths can't depend on generic parameters
   --> $DIR/issue-61336-2.rs:5:9
diff --git a/src/test/ui/const-generics/issue-61336.stderr b/src/test/ui/const-generics/issue-61336.stderr
index ae4ef3a906a..f96e8e02d4e 100644
--- a/src/test/ui/const-generics/issue-61336.stderr
+++ b/src/test/ui/const-generics/issue-61336.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: array lengths can't depend on generic parameters
   --> $DIR/issue-61336.rs:5:9
diff --git a/src/test/ui/const-generics/issue-61422.stderr b/src/test/ui/const-generics/issue-61422.stderr
index 4cb76ec4fe1..166bd3c2d3b 100644
--- a/src/test/ui/const-generics/issue-61422.stderr
+++ b/src/test/ui/const-generics/issue-61422.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/mut-ref-const-param-array.stderr b/src/test/ui/const-generics/mut-ref-const-param-array.stderr
index 261d3578a11..bd7ae49193e 100644
--- a/src/test/ui/const-generics/mut-ref-const-param-array.stderr
+++ b/src/test/ui/const-generics/mut-ref-const-param-array.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/struct-with-invalid-const-param.stderr b/src/test/ui/const-generics/struct-with-invalid-const-param.stderr
index 64354752fd2..dfa2557e9f6 100644
--- a/src/test/ui/const-generics/struct-with-invalid-const-param.stderr
+++ b/src/test/ui/const-generics/struct-with-invalid-const-param.stderr
@@ -1,14 +1,16 @@
+error[E0573]: expected type, found const parameter `C`
+  --> $DIR/struct-with-invalid-const-param.rs:4:23
+   |
+LL | struct S<const C: u8>(C);
+   |                       ^ help: a struct with a similar name exists: `S`
+
 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
   --> $DIR/struct-with-invalid-const-param.rs:1:12
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
-
-error[E0573]: expected type, found const parameter `C`
-  --> $DIR/struct-with-invalid-const-param.rs:4:23
    |
-LL | struct S<const C: u8>(C);
-   |                       ^ help: a struct with a similar name exists: `S`
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.stderr b/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.stderr
index 661bbd113bc..156eddafff0 100644
--- a/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.stderr
+++ b/src/test/ui/const-generics/transparent-maybeunit-array-wrapper.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/uninferred-consts-during-codegen-1.stderr b/src/test/ui/const-generics/uninferred-consts-during-codegen-1.stderr
index eb2e446396c..3c05a354440 100644
--- a/src/test/ui/const-generics/uninferred-consts-during-codegen-1.stderr
+++ b/src/test/ui/const-generics/uninferred-consts-during-codegen-1.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/uninferred-consts-during-codegen-2.stderr b/src/test/ui/const-generics/uninferred-consts-during-codegen-2.stderr
index eaa20bb7892..f27fc531031 100644
--- a/src/test/ui/const-generics/uninferred-consts-during-codegen-2.stderr
+++ b/src/test/ui/const-generics/uninferred-consts-during-codegen-2.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/const-generics/unused-const-param.stderr b/src/test/ui/const-generics/unused-const-param.stderr
index 0e7acfb673d..27f023eeeff 100644
--- a/src/test/ui/const-generics/unused-const-param.stderr
+++ b/src/test/ui/const-generics/unused-const-param.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/error-codes/E0730.stderr b/src/test/ui/error-codes/E0730.stderr
index f9281262bb7..9309ee99064 100644
--- a/src/test/ui/error-codes/E0730.stderr
+++ b/src/test/ui/error-codes/E0730.stderr
@@ -3,6 +3,8 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0730]: cannot pattern-match on an array without a fixed length
   --> $DIR/E0730.rs:6:9
diff --git a/src/test/ui/existential_types/existential_type_const.stderr b/src/test/ui/existential_types/existential_type_const.stderr
index 049b4f75dd2..81754c8f706 100644
--- a/src/test/ui/existential_types/existential_type_const.stderr
+++ b/src/test/ui/existential_types/existential_type_const.stderr
@@ -3,4 +3,6 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/hygiene/generic_params.stderr b/src/test/ui/hygiene/generic_params.stderr
index ecd228a5db5..b3e4fef08c2 100644
--- a/src/test/ui/hygiene/generic_params.stderr
+++ b/src/test/ui/hygiene/generic_params.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(decl_macro, rustc_attrs, const_generics)]
    |                                     ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/hygiene/issue-61574-const-parameters.stderr b/src/test/ui/hygiene/issue-61574-const-parameters.stderr
index 302b5fde887..c9aac6609a1 100644
--- a/src/test/ui/hygiene/issue-61574-const-parameters.stderr
+++ b/src/test/ui/hygiene/issue-61574-const-parameters.stderr
@@ -3,4 +3,6 @@ warning: the feature `const_generics` is incomplete and may cause the compiler t
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/impl-trait-in-bindings.stderr b/src/test/ui/impl-trait-in-bindings.stderr
index 54b42a102fa..629089d8c5c 100644
--- a/src/test/ui/impl-trait-in-bindings.stderr
+++ b/src/test/ui/impl-trait-in-bindings.stderr
@@ -3,4 +3,6 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/impl-trait/bindings-opaque.stderr b/src/test/ui/impl-trait/bindings-opaque.stderr
index d0a6a4ee578..ad108173a7a 100644
--- a/src/test/ui/impl-trait/bindings-opaque.stderr
+++ b/src/test/ui/impl-trait/bindings-opaque.stderr
@@ -3,6 +3,8 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0599]: no method named `count_ones` found for type `impl std::marker::Copy` in the current scope
   --> $DIR/bindings-opaque.rs:11:17
diff --git a/src/test/ui/impl-trait/bindings.stderr b/src/test/ui/impl-trait/bindings.stderr
index c66836ab8e5..e9385955197 100644
--- a/src/test/ui/impl-trait/bindings.stderr
+++ b/src/test/ui/impl-trait/bindings.stderr
@@ -1,9 +1,3 @@
-warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
-  --> $DIR/bindings.rs:1:12
-   |
-LL | #![feature(impl_trait_in_bindings)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^
-
 error[E0435]: attempt to use a non-constant value in a constant
   --> $DIR/bindings.rs:5:29
    |
@@ -28,6 +22,14 @@ error[E0435]: attempt to use a non-constant value in a constant
 LL |         const foo: impl Clone = x;
    |                                 ^ non-constant value
 
+warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
+  --> $DIR/bindings.rs:1:12
+   |
+LL | #![feature(impl_trait_in_bindings)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
 error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0435`.
diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr
index fa2dd20a6ee..24a687491e5 100644
--- a/src/test/ui/impl-trait/bound-normalization-fail.stderr
+++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr
@@ -3,6 +3,8 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as impl_trait::Trait>::Assoc`
   --> $DIR/bound-normalization-fail.rs:30:32
diff --git a/src/test/ui/impl-trait/bound-normalization-pass.stderr b/src/test/ui/impl-trait/bound-normalization-pass.stderr
index c1b7fb2c253..229acdb2b14 100644
--- a/src/test/ui/impl-trait/bound-normalization-pass.stderr
+++ b/src/test/ui/impl-trait/bound-normalization-pass.stderr
@@ -3,4 +3,6 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the co
    |
 LL | #![feature(impl_trait_in_bindings)]
    |            ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/issues/issue-59508-1.stderr b/src/test/ui/issues/issue-59508-1.stderr
index 8fb7d7c3c84..dd78c7c8313 100644
--- a/src/test/ui/issues/issue-59508-1.stderr
+++ b/src/test/ui/issues/issue-59508-1.stderr
@@ -1,14 +1,16 @@
+error: lifetime parameters must be declared prior to type parameters
+  --> $DIR/issue-59508-1.rs:12:25
+   |
+LL |     pub fn do_things<T, 'a, 'b: 'a>() {
+   |                     ----^^--^^----- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b: 'a, T>`
+
 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
   --> $DIR/issue-59508-1.rs:2:12
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
-
-error: lifetime parameters must be declared prior to type parameters
-  --> $DIR/issue-59508-1.rs:12:25
    |
-LL |     pub fn do_things<T, 'a, 'b: 'a>() {
-   |                     ----^^--^^----- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b: 'a, T>`
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
index 207d0d6d6b8..4edc00efc7e 100644
--- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
@@ -4,18 +4,6 @@ error: expected one of `,` or `>`, found `&&`
 LL |         true && let 1 = 1
    |              ^^ expected one of `,` or `>` here
 
-warning: the feature `const_generics` is incomplete and may cause the compiler to crash
-  --> $DIR/disallowed-positions.rs:20:12
-   |
-LL | #![feature(const_generics)]
-   |            ^^^^^^^^^^^^^^
-
-warning: the feature `let_chains` is incomplete and may cause the compiler to crash
-  --> $DIR/disallowed-positions.rs:22:12
-   |
-LL | #![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test.
-   |            ^^^^^^^^^^
-
 error: `let` expressions are not supported here
   --> $DIR/disallowed-positions.rs:32:9
    |
@@ -511,6 +499,20 @@ LL |         true && let 1 = 1
    = note: only supported directly in conditions of `if`- and `while`-expressions
    = note: as well as when nested within `&&` and parenthesis in those conditions
 
+warning: the feature `const_generics` is incomplete and may cause the compiler to crash
+  --> $DIR/disallowed-positions.rs:20:12
+   |
+LL | #![feature(const_generics)]
+   |            ^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: the feature `let_chains` is incomplete and may cause the compiler to crash
+  --> $DIR/disallowed-positions.rs:22:12
+   |
+LL | #![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test.
+   |            ^^^^^^^^^^
+
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:32:8
    |
diff --git a/src/test/ui/rfc1598-generic-associated-types/collections.stderr b/src/test/ui/rfc1598-generic-associated-types/collections.stderr
index d0fe5035bca..fa8fcc99240 100644
--- a/src/test/ui/rfc1598-generic-associated-types/collections.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/collections.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0109]: type arguments are not allowed for this type
   --> $DIR/collections.rs:56:90
diff --git a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr
index b2dd523c8f5..ab161ae21bb 100644
--- a/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/construct_with_other_type.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0109]: lifetime arguments are not allowed for this type
   --> $DIR/construct_with_other_type.rs:17:46
diff --git a/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr b/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr
index 5b98302924e..749032dbcc2 100644
--- a/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/empty_generics.stderr
@@ -9,6 +9,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr b/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr
index 6953a28a23b..d75f9fb8451 100644
--- a/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/gat-incomplete-warning.stderr
@@ -3,4 +3,6 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr
index b323104048f..0d319a7a599 100644
--- a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr
@@ -3,4 +3,6 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr
index f8c0a1f3bff..40ea42f6243 100644
--- a/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0261]: use of undeclared lifetime name `'b`
   --> $DIR/generic_associated_type_undeclared_lifetimes.rs:13:37
diff --git a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr
index 6d5d0cc3828..51246d3c902 100644
--- a/src/test/ui/rfc1598-generic-associated-types/iterable.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/iterable.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0109]: lifetime arguments are not allowed for this type
   --> $DIR/iterable.rs:11:47
diff --git a/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr b/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr
index 817d911184d..65dbd00c5b1 100644
--- a/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/parameter_number_and_kind.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0109]: lifetime arguments are not allowed for this type
   --> $DIR/parameter_number_and_kind.rs:17:27
diff --git a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr
index 0966f8f9422..626495350a7 100644
--- a/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/pointer_family.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0109]: type arguments are not allowed for this type
   --> $DIR/pointer_family.rs:37:21
diff --git a/src/test/ui/rfc1598-generic-associated-types/shadowing.stderr b/src/test/ui/rfc1598-generic-associated-types/shadowing.stderr
index cba6bbd8512..9526df258c4 100644
--- a/src/test/ui/rfc1598-generic-associated-types/shadowing.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/shadowing.stderr
@@ -3,4 +3,6 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
diff --git a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr
index 5fc1e3dddbe..09dd654b575 100644
--- a/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr
+++ b/src/test/ui/rfc1598-generic-associated-types/streaming_iterator.stderr
@@ -3,6 +3,8 @@ warning: the feature `generic_associated_types` is incomplete and may cause the
    |
 LL | #![feature(generic_associated_types)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0109]: lifetime arguments are not allowed for this type
   --> $DIR/streaming_iterator.rs:18:41