about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-06-04 08:46:49 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-06-30 08:06:08 +0000
commit9b5d57d0a9d8ba75fd1602f62d0bfd9f2f6acd1e (patch)
tree237925507e6d88ad8e649ab24f2a9dfea62e726c /tests
parentcca072ca151d766bc9a40b82b1fc5e67ef5fee1e (diff)
downloadrust-9b5d57d0a9d8ba75fd1602f62d0bfd9f2f6acd1e.tar.gz
rust-9b5d57d0a9d8ba75fd1602f62d0bfd9f2f6acd1e.zip
Unconditionally run `check_item_type` on all items
Diffstat (limited to 'tests')
-rw-r--r--tests/incremental/issue-54242.rs2
-rw-r--r--tests/ui/associated-types/impl-wf-cycle-4.stderr6
-rw-r--r--tests/ui/associated-types/issue-38821.stderr20
-rw-r--r--tests/ui/async-await/async-fn/impl-header.stderr16
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr16
-rw-r--r--tests/ui/coherence/fuzzing/best-obligation-ICE.stderr18
-rw-r--r--tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs1
-rw-r--r--tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr23
-rw-r--r--tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr16
-rw-r--r--tests/ui/const-generics/ice-unexpected-inference-var-122549.rs1
-rw-r--r--tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr22
-rw-r--r--tests/ui/const-generics/normalizing_with_unconstrained_impl_params.rs1
-rw-r--r--tests/ui/const-generics/normalizing_with_unconstrained_impl_params.stderr15
-rw-r--r--tests/ui/const-generics/not_wf_param_in_rpitit.stderr2
-rw-r--r--tests/ui/consts/issue-103790.stderr2
-rw-r--r--tests/ui/delegation/unsupported.stderr16
-rw-r--r--tests/ui/dropck/explicit-drop-bounds.bad1.stderr12
-rw-r--r--tests/ui/dropck/explicit-drop-bounds.bad2.stderr12
-rw-r--r--tests/ui/dropck/unconstrained_const_param_on_drop.rs1
-rw-r--r--tests/ui/dropck/unconstrained_const_param_on_drop.stderr14
-rw-r--r--tests/ui/enum-discriminant/eval-error.stderr24
-rw-r--r--tests/ui/error-codes/E0081.stderr16
-rw-r--r--tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr48
-rw-r--r--tests/ui/fn/issue-39259.stderr16
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs1
-rw-r--r--tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr15
-rw-r--r--tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr40
-rw-r--r--tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.current.stderr8
-rw-r--r--tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.next.stderr16
-rw-r--r--tests/ui/impl-trait/in-trait/refine-resolution-errors.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr29
-rw-r--r--tests/ui/impl-trait/in-trait/span-bug-issue-121457.stderr24
-rw-r--r--tests/ui/impl-trait/in-trait/unconstrained-lt.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/unconstrained-lt.stderr20
-rw-r--r--tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr24
-rw-r--r--tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr30
-rw-r--r--tests/ui/lifetimes/issue-95023.stderr16
-rw-r--r--tests/ui/macros/macro-span-issue-116502.stderr8
-rw-r--r--tests/ui/simd/array-trait.stderr12
-rw-r--r--tests/ui/specialization/defaultimpl/validation.stderr16
-rw-r--r--tests/ui/specialization/min_specialization/issue-79224.stderr12
-rw-r--r--tests/ui/stability-attribute/generics-default-stability-where.stderr18
-rw-r--r--tests/ui/statics/uninhabited-static.stderr24
-rw-r--r--tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr12
-rw-r--r--tests/ui/traits/deep-norm-pending.stderr38
-rw-r--r--tests/ui/traits/issue-78372.stderr12
-rw-r--r--tests/ui/traits/issue-87558.stderr16
-rw-r--r--tests/ui/traits/unconstrained-projection-normalization-2.current.stderr29
-rw-r--r--tests/ui/traits/unconstrained-projection-normalization-2.next.stderr30
-rw-r--r--tests/ui/traits/unconstrained-projection-normalization-2.rs3
-rw-r--r--tests/ui/traits/unconstrained-projection-normalization.current.stderr29
-rw-r--r--tests/ui/traits/unconstrained-projection-normalization.next.stderr29
-rw-r--r--tests/ui/traits/unconstrained-projection-normalization.rs3
-rw-r--r--tests/ui/typeck/issue-13853-5.rs3
-rw-r--r--tests/ui/typeck/issue-13853-5.stderr15
-rw-r--r--tests/ui/union/issue-81199.stderr24
-rw-r--r--tests/ui/union/union-unsized.stderr30
-rw-r--r--tests/ui/unsized/unsized-trait-impl-self-type.stderr18
-rw-r--r--tests/ui/unsized/unsized-trait-impl-trait-arg.stderr18
-rw-r--r--tests/ui/unsized/unsized7.stderr18
-rw-r--r--tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr2
-rw-r--r--tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr4
62 files changed, 589 insertions, 379 deletions
diff --git a/tests/incremental/issue-54242.rs b/tests/incremental/issue-54242.rs
index 9fa5363e004..17bbd619a8f 100644
--- a/tests/incremental/issue-54242.rs
+++ b/tests/incremental/issue-54242.rs
@@ -14,7 +14,7 @@ impl Tr for str {
     type Arr = [u8; 8];
     #[cfg(cfail)]
     type Arr = [u8; Self::C];
-    //[cfail]~^ ERROR cycle detected when evaluating type-level constant
+    //[cfail]~^ ERROR cycle detected when caching mir
 }
 
 fn main() {}
diff --git a/tests/ui/associated-types/impl-wf-cycle-4.stderr b/tests/ui/associated-types/impl-wf-cycle-4.stderr
index c966579aecf..fac06e64a31 100644
--- a/tests/ui/associated-types/impl-wf-cycle-4.stderr
+++ b/tests/ui/associated-types/impl-wf-cycle-4.stderr
@@ -1,4 +1,4 @@
-error[E0391]: cycle detected when computing normalized predicates of `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>`
+error[E0391]: cycle detected when computing whether `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>` has a guaranteed unsized self type
   --> $DIR/impl-wf-cycle-4.rs:5:1
    |
 LL | / impl<T> Filter for T
@@ -6,14 +6,14 @@ LL | | where
 LL | |     T: Fn(Self::ToMatch),
    | |_________________________^
    |
-note: ...which requires computing whether `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>` has a guaranteed unsized self type...
+note: ...which requires computing normalized predicates of `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>`...
   --> $DIR/impl-wf-cycle-4.rs:5:1
    |
 LL | / impl<T> Filter for T
 LL | | where
 LL | |     T: Fn(Self::ToMatch),
    | |_________________________^
-   = note: ...which again requires computing normalized predicates of `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>`, completing the cycle
+   = note: ...which again requires computing whether `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>` has a guaranteed unsized self type, completing the cycle
 note: cycle used when checking that `<impl at $DIR/impl-wf-cycle-4.rs:5:1: 7:26>` is well-formed
   --> $DIR/impl-wf-cycle-4.rs:5:1
    |
diff --git a/tests/ui/associated-types/issue-38821.stderr b/tests/ui/associated-types/issue-38821.stderr
index 8a19142b730..8aeefb84f85 100644
--- a/tests/ui/associated-types/issue-38821.stderr
+++ b/tests/ui/associated-types/issue-38821.stderr
@@ -71,11 +71,6 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         -------  ^^^^^^^^^^^^     ^
    |         |
    |         unsatisfied trait bound introduced here
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: consider further restricting the associated type
-   |
-LL |     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull,
-   |                                                                       +++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:10
@@ -90,6 +85,7 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         -------  ^^^^^^^^^^^^     ^
    |         |
    |         unsatisfied trait bound introduced here
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:10
@@ -105,6 +101,10 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         |
    |         unsatisfied trait bound introduced here
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider further restricting the associated type
+   |
+LL |     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull,
+   |                                                                       +++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:17
@@ -174,11 +174,6 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         -------  ^^^^^^^^^^^^     ^
    |         |
    |         unsatisfied trait bound introduced here
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: consider further restricting the associated type
-   |
-LL |     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull,
-   |                                                                       +++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:23
@@ -193,6 +188,7 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         -------  ^^^^^^^^^^^^     ^
    |         |
    |         unsatisfied trait bound introduced here
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:23
@@ -208,6 +204,10 @@ LL | impl<T: NotNull> IntoNullable for T {
    |         |
    |         unsatisfied trait bound introduced here
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: consider further restricting the associated type
+   |
+LL |     Expr: Expression<SqlType=<Col::SqlType as IntoNullable>::Nullable>, <Col as Expression>::SqlType: NotNull,
+   |                                                                       +++++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not satisfied
   --> $DIR/issue-38821.rs:23:10
diff --git a/tests/ui/async-await/async-fn/impl-header.stderr b/tests/ui/async-await/async-fn/impl-header.stderr
index 64a98aab17b..2fc7a900a1e 100644
--- a/tests/ui/async-await/async-fn/impl-header.stderr
+++ b/tests/ui/async-await/async-fn/impl-header.stderr
@@ -22,6 +22,14 @@ LL | impl async Fn<()> for F {}
    |
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/impl-header.rs:5:1
+   |
+LL | impl async Fn<()> for F {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+   |
+   = help: implement the missing item: `fn call(&self, _: ()) -> <Self as FnOnce<()>>::Output { todo!() }`
+
 error[E0277]: expected a `FnMut()` closure, found `F`
   --> $DIR/impl-header.rs:5:23
    |
@@ -33,14 +41,6 @@ LL | impl async Fn<()> for F {}
 note: required by a bound in `Fn`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error[E0046]: not all trait items implemented, missing: `call`
-  --> $DIR/impl-header.rs:5:1
-   |
-LL | impl async Fn<()> for F {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
-   |
-   = help: implement the missing item: `fn call(&self, _: ()) -> <Self as FnOnce<()>>::Output { todo!() }`
-
 error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0046, E0183, E0277, E0658.
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
index 033bfee226f..aafedc30b17 100644
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-dyn-compatible.stderr
@@ -1,3 +1,11 @@
+error[E0046]: not all trait items implemented, missing: `eq`
+  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:1
+   |
+LL | trait DynIncompatible { fn eq(&self, other: Self); }
+   |                         -------------------------- `eq` from trait
+LL | impl DynIncompatible for dyn DynIncompatible { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
+
 error[E0038]: the trait `DynIncompatible` is not dyn compatible
   --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:26
    |
@@ -14,14 +22,6 @@ LL | trait DynIncompatible { fn eq(&self, other: Self); }
    |       this trait is not dyn compatible...
    = help: consider moving `eq` to another trait
 
-error[E0046]: not all trait items implemented, missing: `eq`
-  --> $DIR/coherence-impl-trait-for-trait-dyn-compatible.rs:7:1
-   |
-LL | trait DynIncompatible { fn eq(&self, other: Self); }
-   |                         -------------------------- `eq` from trait
-LL | impl DynIncompatible for dyn DynIncompatible { }
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0038, E0046.
diff --git a/tests/ui/coherence/fuzzing/best-obligation-ICE.stderr b/tests/ui/coherence/fuzzing/best-obligation-ICE.stderr
index 01b6eaf422e..fe28f4ff136 100644
--- a/tests/ui/coherence/fuzzing/best-obligation-ICE.stderr
+++ b/tests/ui/coherence/fuzzing/best-obligation-ICE.stderr
@@ -1,3 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `Assoc`
+  --> $DIR/best-obligation-ICE.rs:10:1
+   |
+LL |     type Assoc;
+   |     ---------- `Assoc` from trait
+...
+LL | impl<T> Trait for W<W<W<T>>> {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Assoc` in implementation
+
 error[E0277]: the trait bound `W<W<T>>: Trait` is not satisfied
   --> $DIR/best-obligation-ICE.rs:10:19
    |
@@ -46,15 +55,6 @@ help: consider restricting type parameter `T` with trait `Trait`
 LL | impl<T: Trait> Trait for W<W<W<T>>> {}
    |       +++++++
 
-error[E0046]: not all trait items implemented, missing: `Assoc`
-  --> $DIR/best-obligation-ICE.rs:10:1
-   |
-LL |     type Assoc;
-   |     ---------- `Assoc` from trait
-...
-LL | impl<T> Trait for W<W<W<T>>> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Assoc` in implementation
-
 error[E0119]: conflicting implementations of trait `NoOverlap` for type `W<W<W<W<_>>>>`
   --> $DIR/best-obligation-ICE.rs:18:1
    |
diff --git a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs
index e5af632da75..478fa3706e8 100644
--- a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs
+++ b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.rs
@@ -5,6 +5,7 @@
 struct Foo;
 impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
 //~^ ERROR the const parameter `NUM` is not constrained by the impl trait, self type, or predicates
+//~| ERROR missing: `Output`, `add`
 where
     [(); 1 + 0]: Sized,
 {
diff --git a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr
index ade18eb88b9..29bbd23a469 100644
--- a/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/post-analysis-user-facing-param-env.stderr
@@ -1,5 +1,5 @@
 error[E0407]: method `unimplemented` is not a member of trait `std::ops::Add`
-  --> $DIR/post-analysis-user-facing-param-env.rs:11:5
+  --> $DIR/post-analysis-user-facing-param-env.rs:12:5
    |
 LL | /     fn unimplemented(self, _: &Foo) -> Self::Output {
 LL | |
@@ -17,6 +17,19 @@ LL | #![feature(generic_const_exprs)]
    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
    = note: `#[warn(incomplete_features)]` on by default
 
+error[E0046]: not all trait items implemented, missing: `Output`, `add`
+  --> $DIR/post-analysis-user-facing-param-env.rs:6:1
+   |
+LL | / impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
+LL | |
+LL | |
+LL | | where
+LL | |     [(); 1 + 0]: Sized,
+   | |_______________________^ missing `Output`, `add` in implementation
+   |
+   = help: implement the missing item: `type Output = /* Type */;`
+   = help: implement the missing item: `fn add(self, _: &'a Foo) -> <Self as Add<&'a Foo>>::Output { todo!() }`
+
 error[E0207]: the const parameter `NUM` is not constrained by the impl trait, self type, or predicates
   --> $DIR/post-analysis-user-facing-param-env.rs:6:10
    |
@@ -27,7 +40,7 @@ LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
    = note: proving the result of expressions other than the parameter are unique is not supported
 
 error[E0284]: type annotations needed
-  --> $DIR/post-analysis-user-facing-param-env.rs:11:40
+  --> $DIR/post-analysis-user-facing-param-env.rs:12:40
    |
 LL |     fn unimplemented(self, _: &Foo) -> Self::Output {
    |                                        ^^^^^^^^^^^^ cannot infer the value of const parameter `NUM`
@@ -40,7 +53,7 @@ LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
    |          |
    |          unsatisfied trait bound introduced here
 
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 4 previous errors; 1 warning emitted
 
-Some errors have detailed explanations: E0207, E0284, E0407.
-For more information about an error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0046, E0207, E0284, E0407.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr b/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
index 7cb67252da5..3b4b5798c80 100644
--- a/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
@@ -1,11 +1,3 @@
-error: the constant `N` is not of type `usize`
-  --> $DIR/type_mismatch.rs:8:26
-   |
-LL | impl<const N: u64> Q for [u8; N] {}
-   |                          ^^^^^^^ expected `usize`, found `u64`
-   |
-   = note: the length of array `[u8; N]` must be type `usize`
-
 error[E0046]: not all trait items implemented, missing: `ASSOC`
   --> $DIR/type_mismatch.rs:8:1
    |
@@ -15,6 +7,14 @@ LL |     const ASSOC: usize;
 LL | impl<const N: u64> Q for [u8; N] {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `ASSOC` in implementation
 
+error: the constant `N` is not of type `usize`
+  --> $DIR/type_mismatch.rs:8:26
+   |
+LL | impl<const N: u64> Q for [u8; N] {}
+   |                          ^^^^^^^ expected `usize`, found `u64`
+   |
+   = note: the length of array `[u8; N]` must be type `usize`
+
 error: the constant `13` is not of type `u64`
   --> $DIR/type_mismatch.rs:12:26
    |
diff --git a/tests/ui/const-generics/ice-unexpected-inference-var-122549.rs b/tests/ui/const-generics/ice-unexpected-inference-var-122549.rs
index 126ea667290..34c7a252f11 100644
--- a/tests/ui/const-generics/ice-unexpected-inference-var-122549.rs
+++ b/tests/ui/const-generics/ice-unexpected-inference-var-122549.rs
@@ -15,6 +15,7 @@ struct ConstChunksExact<'rem, T: 'a, const N: usize> {}
 impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
 //~^ ERROR the const parameter `N` is not constrained by the impl trait, self type, or predicates
 //~^^ ERROR mismatched types
+//~| ERROR missing: `next`
     type Item = &'a [T; N];
 }
 
diff --git a/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr b/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr
index 3b24808cd16..311caaede09 100644
--- a/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr
+++ b/tests/ui/const-generics/ice-unexpected-inference-var-122549.stderr
@@ -49,6 +49,20 @@ LL | struct ConstChunksExact<'rem, T: 'a, const N: usize> {}
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
 
+error[E0308]: mismatched types
+  --> $DIR/ice-unexpected-inference-var-122549.rs:15:66
+   |
+LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
+   |                                                                  ^^ expected `usize`, found `()`
+
+error[E0046]: not all trait items implemented, missing: `next`
+  --> $DIR/ice-unexpected-inference-var-122549.rs:15:1
+   |
+LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `next` in implementation
+   |
+   = help: implement the missing item: `fn next(&mut self) -> Option<<Self as Iterator>::Item> { todo!() }`
+
 error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
   --> $DIR/ice-unexpected-inference-var-122549.rs:15:13
    |
@@ -58,13 +72,7 @@ LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
    = note: expressions using a const parameter must map each value to a distinct output value
    = note: proving the result of expressions other than the parameter are unique is not supported
 
-error[E0308]: mismatched types
-  --> $DIR/ice-unexpected-inference-var-122549.rs:15:66
-   |
-LL | impl<'a, T, const N: usize> Iterator for ConstChunksExact<'a, T, {}> {
-   |                                                                  ^^ expected `usize`, found `()`
-
-error: aborting due to 7 previous errors
+error: aborting due to 8 previous errors
 
 Some errors have detailed explanations: E0046, E0207, E0261, E0308, E0392.
 For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.rs b/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.rs
index ba37087135f..9a39ab1ba02 100644
--- a/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.rs
+++ b/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.rs
@@ -14,5 +14,6 @@ impl<'a, T: std::fmt::Debug, const N: usize> Iterator for ConstChunksExact<'a, T
     //~^ ERROR mismatched types [E0308]
     //~| ERROR the const parameter `N` is not constrained by the impl trait, self type, or predicates [E0207]
     type Item = &'a [T; N]; }
+    //~^ ERROR: `Item` specializes an item from a parent `impl`, but that item is not marked `default`
 
 fn main() {}
diff --git a/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.stderr b/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.stderr
index 1ee68647594..ad89705e1dc 100644
--- a/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.stderr
+++ b/tests/ui/const-generics/normalizing_with_unconstrained_impl_params.stderr
@@ -34,6 +34,17 @@ LL | struct ConstChunksExact<'a, T: '_, const assert: usize> {}
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
 
+error[E0520]: `Item` specializes an item from a parent `impl`, but that item is not marked `default`
+  --> $DIR/normalizing_with_unconstrained_impl_params.rs:16:5
+   |
+LL | impl<'a, T: std::fmt::Debug, const N: usize> Iterator for ConstChunksExact<'a, T, { N }> {
+   | ---------------------------------------------------------------------------------------- parent `impl` is here
+...
+LL |     type Item = &'a [T; N]; }
+   |     ^^^^^^^^^ cannot specialize default item `Item`
+   |
+   = note: to specialize, `Item` in the parent `impl` must be marked `default`
+
 error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
   --> $DIR/normalizing_with_unconstrained_impl_params.rs:13:30
    |
@@ -54,7 +65,7 @@ LL |     fn next(&mut self) -> Option<Self::Item> {}
    = note:   expected enum `Option<_>`
            found unit type `()`
 
-error: aborting due to 7 previous errors
+error: aborting due to 8 previous errors
 
-Some errors have detailed explanations: E0046, E0207, E0308, E0392, E0637.
+Some errors have detailed explanations: E0046, E0207, E0308, E0392, E0520, E0637.
 For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
index 42ae012fa55..3612cfad0d4 100644
--- a/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
+++ b/tests/ui/const-generics/not_wf_param_in_rpitit.stderr
@@ -11,7 +11,7 @@ LL | trait Trait<const N: dyn Trait = bar> {
    |                          ^^^^^
    |
    = note: ...which immediately requires computing type of `Trait::N` again
-note: cycle used when computing explicit predicates of trait `Trait`
+note: cycle used when checking that `Trait` is well-formed
   --> $DIR/not_wf_param_in_rpitit.rs:3:1
    |
 LL | trait Trait<const N: dyn Trait = bar> {
diff --git a/tests/ui/consts/issue-103790.stderr b/tests/ui/consts/issue-103790.stderr
index 1515fa60a5c..adfac02bd0c 100644
--- a/tests/ui/consts/issue-103790.stderr
+++ b/tests/ui/consts/issue-103790.stderr
@@ -29,7 +29,7 @@ LL | struct S<const S: (), const S: S = { S }>;
    |                                ^
    |
    = note: ...which immediately requires computing type of `S::S` again
-note: cycle used when computing explicit predicates of `S`
+note: cycle used when checking that `S` is well-formed
   --> $DIR/issue-103790.rs:4:1
    |
 LL | struct S<const S: (), const S: S = { S }>;
diff --git a/tests/ui/delegation/unsupported.stderr b/tests/ui/delegation/unsupported.stderr
index 53d05c3db8c..f69be60133e 100644
--- a/tests/ui/delegation/unsupported.stderr
+++ b/tests/ui/delegation/unsupported.stderr
@@ -10,11 +10,11 @@ note: ...which requires comparing an impl and trait method signature, inferring
 LL |         reuse to_reuse::opaque_ret;
    |                         ^^^^^^^^^^
    = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>::opaque_ret::{anon_assoc#0}`, completing the cycle
-note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>` is well-formed
-  --> $DIR/unsupported.rs:21:5
+note: cycle used when checking assoc item `opaque::<impl at $DIR/unsupported.rs:21:5: 21:24>::opaque_ret` is compatible with trait definition
+  --> $DIR/unsupported.rs:22:25
    |
-LL |     impl ToReuse for u8 {
-   |     ^^^^^^^^^^^^^^^^^^^
+LL |         reuse to_reuse::opaque_ret;
+   |                         ^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::opaque_ret::{anon_assoc#0}`
@@ -29,11 +29,11 @@ note: ...which requires comparing an impl and trait method signature, inferring
 LL |         reuse ToReuse::opaque_ret;
    |                        ^^^^^^^^^^
    = note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::opaque_ret::{anon_assoc#0}`, completing the cycle
-note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>` is well-formed
-  --> $DIR/unsupported.rs:24:5
+note: cycle used when checking assoc item `opaque::<impl at $DIR/unsupported.rs:24:5: 24:25>::opaque_ret` is compatible with trait definition
+  --> $DIR/unsupported.rs:25:24
    |
-LL |     impl ToReuse for u16 {
-   |     ^^^^^^^^^^^^^^^^^^^^
+LL |         reuse ToReuse::opaque_ret;
+   |                        ^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error: recursive delegation is not supported yet
diff --git a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
index 28d7546d0c9..d898f2f9761 100644
--- a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
+++ b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `T: Copy` is not satisfied
-  --> $DIR/explicit-drop-bounds.rs:27:18
+  --> $DIR/explicit-drop-bounds.rs:32:5
    |
-LL | impl<T> Drop for DropMe<T>
-   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
+LL |     fn drop(&mut self) {}
+   |     ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
    |
 note: required by a bound in `DropMe`
   --> $DIR/explicit-drop-bounds.rs:7:18
@@ -15,10 +15,10 @@ LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply
    |                   ++++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
-  --> $DIR/explicit-drop-bounds.rs:32:5
+  --> $DIR/explicit-drop-bounds.rs:27:18
    |
-LL |     fn drop(&mut self) {}
-   |     ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
+LL | impl<T> Drop for DropMe<T>
+   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
    |
 note: required by a bound in `DropMe`
   --> $DIR/explicit-drop-bounds.rs:7:18
diff --git a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr
index c363676edea..8155bd4134d 100644
--- a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr
+++ b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `T: Copy` is not satisfied
-  --> $DIR/explicit-drop-bounds.rs:38:18
+  --> $DIR/explicit-drop-bounds.rs:41:5
    |
-LL | impl<T> Drop for DropMe<T>
-   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
+LL |     fn drop(&mut self) {}
+   |     ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
    |
 note: required by a bound in `DropMe`
   --> $DIR/explicit-drop-bounds.rs:7:18
@@ -15,10 +15,10 @@ LL | impl<T: std::marker::Copy> Drop for DropMe<T>
    |       +++++++++++++++++++
 
 error[E0277]: the trait bound `T: Copy` is not satisfied
-  --> $DIR/explicit-drop-bounds.rs:41:5
+  --> $DIR/explicit-drop-bounds.rs:38:18
    |
-LL |     fn drop(&mut self) {}
-   |     ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
+LL | impl<T> Drop for DropMe<T>
+   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
    |
 note: required by a bound in `DropMe`
   --> $DIR/explicit-drop-bounds.rs:7:18
diff --git a/tests/ui/dropck/unconstrained_const_param_on_drop.rs b/tests/ui/dropck/unconstrained_const_param_on_drop.rs
index de77fa55fb2..839aca07a6a 100644
--- a/tests/ui/dropck/unconstrained_const_param_on_drop.rs
+++ b/tests/ui/dropck/unconstrained_const_param_on_drop.rs
@@ -3,5 +3,6 @@ struct Foo {}
 impl<const UNUSED: usize> Drop for Foo {}
 //~^ ERROR: `Drop` impl requires `the constant `_` has type `usize``
 //~| ERROR: the const parameter `UNUSED` is not constrained by the impl trait, self type, or predicates
+//~| ERROR: missing: `drop`
 
 fn main() {}
diff --git a/tests/ui/dropck/unconstrained_const_param_on_drop.stderr b/tests/ui/dropck/unconstrained_const_param_on_drop.stderr
index 851888534ee..515637dd47f 100644
--- a/tests/ui/dropck/unconstrained_const_param_on_drop.stderr
+++ b/tests/ui/dropck/unconstrained_const_param_on_drop.stderr
@@ -10,6 +10,14 @@ note: the implementor must specify the same requirement
 LL | struct Foo {}
    | ^^^^^^^^^^
 
+error[E0046]: not all trait items implemented, missing: `drop`
+  --> $DIR/unconstrained_const_param_on_drop.rs:3:1
+   |
+LL | impl<const UNUSED: usize> Drop for Foo {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation
+   |
+   = help: implement the missing item: `fn drop(&mut self) { todo!() }`
+
 error[E0207]: the const parameter `UNUSED` is not constrained by the impl trait, self type, or predicates
   --> $DIR/unconstrained_const_param_on_drop.rs:3:6
    |
@@ -19,7 +27,7 @@ LL | impl<const UNUSED: usize> Drop for Foo {}
    = note: expressions using a const parameter must map each value to a distinct output value
    = note: proving the result of expressions other than the parameter are unique is not supported
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0207, E0367.
-For more information about an error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0046, E0207, E0367.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/enum-discriminant/eval-error.stderr b/tests/ui/enum-discriminant/eval-error.stderr
index c29d258a90b..77449656ea6 100644
--- a/tests/ui/enum-discriminant/eval-error.stderr
+++ b/tests/ui/enum-discriminant/eval-error.stderr
@@ -15,6 +15,18 @@ LL | |     A
 LL | | }
    | |_- not a struct or union
 
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/eval-error.rs:2:5
+   |
+LL |     a: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     a: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/eval-error.rs:2:8
    |
@@ -33,18 +45,6 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |     a: Box<str>,
    |        ++++   +
 
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/eval-error.rs:2:5
-   |
-LL |     a: str,
-   |     ^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     a: std::mem::ManuallyDrop<str>,
-   |        +++++++++++++++++++++++   +
-
 error[E0080]: the type `Foo` has an unknown layout
   --> $DIR/eval-error.rs:9:30
    |
diff --git a/tests/ui/error-codes/E0081.stderr b/tests/ui/error-codes/E0081.stderr
index 91445eedf4d..e90d7316423 100644
--- a/tests/ui/error-codes/E0081.stderr
+++ b/tests/ui/error-codes/E0081.stderr
@@ -73,14 +73,6 @@ LL |
 LL |     V9,
    |     -- `-2` assigned here
 
-error[E0370]: enum discriminant overflowed
-  --> $DIR/E0081.rs:87:5
-   |
-LL |     X256,
-   |     ^^^^ overflowed on value after 255
-   |
-   = note: explicitly set `X256 = 0` if that is desired outcome
-
 error[E0081]: discriminant value `0` assigned more than once
   --> $DIR/E0081.rs:57:1
    |
@@ -96,6 +88,14 @@ LL |     X000, X001, X002, X003, X004, X005, X006, X007, X008, X009,
 LL |     X256,
    |     ---- `0` assigned here
 
+error[E0370]: enum discriminant overflowed
+  --> $DIR/E0081.rs:87:5
+   |
+LL |     X256,
+   |     ^^^^ overflowed on value after 255
+   |
+   = note: explicitly set `X256 = 0` if that is desired outcome
+
 error: aborting due to 7 previous errors
 
 Some errors have detailed explanations: E0081, E0370.
diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr
index 7768c25bd2c..334bc63b7ee 100644
--- a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr
+++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr
@@ -56,6 +56,19 @@ LL | impl Fn<()> for Foo {
    |
    = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
 
+error[E0053]: method `call` has an incompatible type for trait
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:32
+   |
+LL |     extern "rust-call" fn call(self, args: ()) -> () {}
+   |                                ^^^^ expected `&Foo`, found `Foo`
+   |
+   = note: expected signature `extern "rust-call" fn(&Foo, ()) -> _`
+              found signature `extern "rust-call" fn(Foo, ()) -> ()`
+help: change the self-receiver type to match the trait
+   |
+LL |     extern "rust-call" fn call(&self, args: ()) -> () {}
+   |                                +
+
 error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
   --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:6
    |
@@ -85,19 +98,6 @@ LL | impl Fn<()> for Foo {
 note: required by a bound in `Fn`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error[E0053]: method `call` has an incompatible type for trait
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:13:32
-   |
-LL |     extern "rust-call" fn call(self, args: ()) -> () {}
-   |                                ^^^^ expected `&Foo`, found `Foo`
-   |
-   = note: expected signature `extern "rust-call" fn(&Foo, ()) -> _`
-              found signature `extern "rust-call" fn(Foo, ()) -> ()`
-help: change the self-receiver type to match the trait
-   |
-LL |     extern "rust-call" fn call(&self, args: ()) -> () {}
-   |                                +
-
 error[E0183]: manual implementations of `FnOnce` are experimental
   --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:18:6
    |
@@ -144,17 +144,6 @@ LL | impl FnOnce() for Foo1 {
    |
    = help: implement the missing item: `type Output = /* Type */;`
 
-error[E0277]: expected a `FnOnce()` closure, found `Bar`
-  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:20
-   |
-LL | impl FnMut<()> for Bar {
-   |                    ^^^ expected an `FnOnce()` closure, found `Bar`
-   |
-   = help: the trait `FnOnce()` is not implemented for `Bar`
-   = note: wrap the `Bar` in a closure with no arguments: `|| { /* code */ }`
-note: required by a bound in `FnMut`
-  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
-
 error[E0053]: method `call_mut` has an incompatible type for trait
   --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:36
    |
@@ -168,6 +157,17 @@ help: change the self-receiver type to match the trait
 LL |     extern "rust-call" fn call_mut(&mut self, args: ()) -> () {}
    |                                     +++
 
+error[E0277]: expected a `FnOnce()` closure, found `Bar`
+  --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:20
+   |
+LL | impl FnMut<()> for Bar {
+   |                    ^^^ expected an `FnOnce()` closure, found `Bar`
+   |
+   = help: the trait `FnOnce()` is not implemented for `Bar`
+   = note: wrap the `Bar` in a closure with no arguments: `|| { /* code */ }`
+note: required by a bound in `FnMut`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+
 error[E0046]: not all trait items implemented, missing: `Output`
   --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:1
    |
diff --git a/tests/ui/fn/issue-39259.stderr b/tests/ui/fn/issue-39259.stderr
index a923d7b26ef..90e305ca17a 100644
--- a/tests/ui/fn/issue-39259.stderr
+++ b/tests/ui/fn/issue-39259.stderr
@@ -10,6 +10,14 @@ help: parenthesized trait syntax expands to `Fn<(u32,), Output=u32>`
 LL | impl Fn(u32) -> u32 for S {
    |      ^^^^^^^^^^^^^^
 
+error[E0050]: method `call` has 1 parameter but the declaration in trait `call` has 2
+  --> $DIR/issue-39259.rs:9:13
+   |
+LL |     fn call(&self) -> u32 {
+   |             ^^^^^ expected 2 parameters, found 1
+   |
+   = note: `call` from trait: `extern "rust-call" fn(&Self, Args) -> <Self as FnOnce<Args>>::Output`
+
 error[E0277]: expected a `FnMut(u32)` closure, found `S`
   --> $DIR/issue-39259.rs:6:25
    |
@@ -20,14 +28,6 @@ LL | impl Fn(u32) -> u32 for S {
 note: required by a bound in `Fn`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error[E0050]: method `call` has 1 parameter but the declaration in trait `call` has 2
-  --> $DIR/issue-39259.rs:9:13
-   |
-LL |     fn call(&self) -> u32 {
-   |             ^^^^^ expected 2 parameters, found 1
-   |
-   = note: `call` from trait: `extern "rust-call" fn(&Self, Args) -> <Self as FnOnce<Args>>::Output`
-
 error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0050, E0229, E0277.
diff --git a/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs b/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs
index d00c036fbd5..81e2db182bc 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs
+++ b/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs
@@ -9,6 +9,7 @@ impl <T, T1> Foo for T {
     type F<T1> = &[u8];
       //~^ ERROR: the name `T1` is already used for
       //~| ERROR: `&` without an explicit lifetime name cannot be used here
+      //~| ERROR: has 1 type parameter but its trait declaration has 0 type parameters
 }
 
 fn main() {}
diff --git a/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr b/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
index cb2b9f32bfe..42aa83c8f43 100644
--- a/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
+++ b/tests/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr
@@ -13,13 +13,22 @@ error[E0637]: `&` without an explicit lifetime name cannot be used here
 LL |     type F<T1> = &[u8];
    |                  ^ explicit lifetime name needed here
 
+error[E0049]: associated type `F` has 1 type parameter but its trait declaration has 0 type parameters
+  --> $DIR/gat-trait-path-generic-type-arg.rs:9:12
+   |
+LL |     type F<'a>;
+   |            -- expected 0 type parameters
+...
+LL |     type F<T1> = &[u8];
+   |            ^^ found 1 type parameter
+
 error[E0207]: the type parameter `T1` is not constrained by the impl trait, self type, or predicates
   --> $DIR/gat-trait-path-generic-type-arg.rs:7:10
    |
 LL | impl <T, T1> Foo for T {
    |          ^^ unconstrained type parameter
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0207, E0403, E0637.
-For more information about an error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0049, E0207, E0403, E0637.
+For more information about an error, try `rustc --explain E0049`.
diff --git a/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr b/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr
index b6e7e02f331..2351b18fdfc 100644
--- a/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr
+++ b/tests/ui/impl-trait/in-trait/false-positive-predicate-entailment-error.current.stderr
@@ -19,11 +19,14 @@ help: consider further restricting type parameter `F` with trait `MyFn`
 LL |         F: Callback<Self::CallbackArg> + MyFn<i32>,
    |                                        +++++++++++
 
-error[E0277]: the trait bound `F: Callback<i32>` is not satisfied
-  --> $DIR/false-positive-predicate-entailment-error.rs:42:12
+error[E0277]: the trait bound `F: MyFn<i32>` is not satisfied
+  --> $DIR/false-positive-predicate-entailment-error.rs:36:5
    |
-LL |         F: Callback<Self::CallbackArg>,
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyFn<i32>` is not implemented for `F`
+LL | /     fn autobatch<F>(self) -> impl Trait
+...  |
+LL | |     where
+LL | |         F: Callback<Self::CallbackArg>,
+   | |_______________________________________^ the trait `MyFn<i32>` is not implemented for `F`
    |
 note: required for `F` to implement `Callback<i32>`
   --> $DIR/false-positive-predicate-entailment-error.rs:14:21
@@ -32,27 +35,17 @@ LL | impl<A, F: MyFn<A>> Callback<A> for F {
    |            -------  ^^^^^^^^^^^     ^
    |            |
    |            unsatisfied trait bound introduced here
-note: the requirement `F: Callback<i32>` appears on the `impl`'s method `autobatch` but not on the corresponding trait's method
-  --> $DIR/false-positive-predicate-entailment-error.rs:25:8
-   |
-LL | trait ChannelSender {
-   |       ------------- in this trait
-...
-LL |     fn autobatch<F>(self) -> impl Trait
-   |        ^^^^^^^^^ this trait's method doesn't have the requirement `F: Callback<i32>`
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider further restricting type parameter `F` with trait `MyFn`
    |
 LL |         F: Callback<Self::CallbackArg> + MyFn<i32>,
    |                                        +++++++++++
 
-error[E0277]: the trait bound `F: MyFn<i32>` is not satisfied
-  --> $DIR/false-positive-predicate-entailment-error.rs:36:5
+error[E0277]: the trait bound `F: Callback<i32>` is not satisfied
+  --> $DIR/false-positive-predicate-entailment-error.rs:42:12
    |
-LL | /     fn autobatch<F>(self) -> impl Trait
-...  |
-LL | |     where
-LL | |         F: Callback<Self::CallbackArg>,
-   | |_______________________________________^ the trait `MyFn<i32>` is not implemented for `F`
+LL |         F: Callback<Self::CallbackArg>,
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `MyFn<i32>` is not implemented for `F`
    |
 note: required for `F` to implement `Callback<i32>`
   --> $DIR/false-positive-predicate-entailment-error.rs:14:21
@@ -61,7 +54,14 @@ LL | impl<A, F: MyFn<A>> Callback<A> for F {
    |            -------  ^^^^^^^^^^^     ^
    |            |
    |            unsatisfied trait bound introduced here
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+note: the requirement `F: Callback<i32>` appears on the `impl`'s method `autobatch` but not on the corresponding trait's method
+  --> $DIR/false-positive-predicate-entailment-error.rs:25:8
+   |
+LL | trait ChannelSender {
+   |       ------------- in this trait
+...
+LL |     fn autobatch<F>(self) -> impl Trait
+   |        ^^^^^^^^^ this trait's method doesn't have the requirement `F: Callback<i32>`
 help: consider further restricting type parameter `F` with trait `MyFn`
    |
 LL |         F: Callback<Self::CallbackArg> + MyFn<i32>,
diff --git a/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.current.stderr b/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.current.stderr
index 5d651245746..ff3a726477e 100644
--- a/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.current.stderr
+++ b/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.current.stderr
@@ -46,11 +46,11 @@ note: ...which requires type-checking `<impl at $DIR/method-compatability-via-le
 LL |     fn foo(b: bool) -> impl Sized {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires computing type of `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo::{anon_assoc#0}`, completing the cycle
-note: cycle used when checking that `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>` is well-formed
-  --> $DIR/method-compatability-via-leakage-cycle.rs:17:1
+note: cycle used when checking assoc item `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo` is compatible with trait definition
+  --> $DIR/method-compatability-via-leakage-cycle.rs:21:5
    |
-LL | impl Trait for u32 {
-   | ^^^^^^^^^^^^^^^^^^
+LL |     fn foo(b: bool) -> impl Sized {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.next.stderr b/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.next.stderr
index 4bbba62bd71..f0a20367a4a 100644
--- a/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.next.stderr
+++ b/tests/ui/impl-trait/in-trait/method-compatability-via-leakage-cycle.next.stderr
@@ -50,11 +50,11 @@ note: ...which requires type-checking `<impl at $DIR/method-compatability-via-le
 LL |     fn foo(b: bool) -> impl Sized {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires computing type of `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo::{anon_assoc#0}`, completing the cycle
-note: cycle used when checking that `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>` is well-formed
-  --> $DIR/method-compatability-via-leakage-cycle.rs:17:1
+note: cycle used when checking assoc item `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo` is compatible with trait definition
+  --> $DIR/method-compatability-via-leakage-cycle.rs:21:5
    |
-LL | impl Trait for u32 {
-   | ^^^^^^^^^^^^^^^^^^
+LL |     fn foo(b: bool) -> impl Sized {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
 
 error[E0391]: cycle detected when computing type of `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo::{anon_assoc#0}`
@@ -109,11 +109,11 @@ note: ...which requires type-checking `<impl at $DIR/method-compatability-via-le
 LL |     fn foo(b: bool) -> impl Sized {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires computing type of `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo::{anon_assoc#0}`, completing the cycle
-note: cycle used when checking that `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>` is well-formed
-  --> $DIR/method-compatability-via-leakage-cycle.rs:17:1
+note: cycle used when checking assoc item `<impl at $DIR/method-compatability-via-leakage-cycle.rs:17:1: 17:19>::foo` is compatible with trait definition
+  --> $DIR/method-compatability-via-leakage-cycle.rs:21:5
    |
-LL | impl Trait for u32 {
-   | ^^^^^^^^^^^^^^^^^^
+LL |     fn foo(b: bool) -> impl Sized {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/impl-trait/in-trait/refine-resolution-errors.rs b/tests/ui/impl-trait/in-trait/refine-resolution-errors.rs
index 894f592d9e2..8433fb72b5e 100644
--- a/tests/ui/impl-trait/in-trait/refine-resolution-errors.rs
+++ b/tests/ui/impl-trait/in-trait/refine-resolution-errors.rs
@@ -9,6 +9,7 @@ pub trait Mirror {
 impl<T: ?Sized> Mirror for () {
     //~^ ERROR the type parameter `T` is not constrained
     type Assoc = T;
+    //~^ ERROR the size for values of type `T` cannot be known at compilation time
 }
 
 pub trait First {
diff --git a/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr b/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr
index 10ebad2a7d5..fd53c9fef44 100644
--- a/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr
+++ b/tests/ui/impl-trait/in-trait/refine-resolution-errors.stderr
@@ -4,6 +4,31 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
 LL | impl<T: ?Sized> Mirror for () {
    |      ^ unconstrained type parameter
 
-error: aborting due to 1 previous error
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/refine-resolution-errors.rs:11:18
+   |
+LL | impl<T: ?Sized> Mirror for () {
+   |      - this type parameter needs to be `Sized`
+LL |
+LL |     type Assoc = T;
+   |                  ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Mirror::Assoc`
+  --> $DIR/refine-resolution-errors.rs:7:5
+   |
+LL |     type Assoc;
+   |     ^^^^^^^^^^^ required by this bound in `Mirror::Assoc`
+help: consider removing the `?Sized` bound to make the type parameter `Sized`
+   |
+LL - impl<T: ?Sized> Mirror for () {
+LL + impl<T> Mirror for () {
+   |
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Assoc: ?Sized;
+   |               ++++++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0207, E0277.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/impl-trait/in-trait/span-bug-issue-121457.stderr b/tests/ui/impl-trait/in-trait/span-bug-issue-121457.stderr
index eaa320455bb..f95f6fab413 100644
--- a/tests/ui/impl-trait/in-trait/span-bug-issue-121457.stderr
+++ b/tests/ui/impl-trait/in-trait/span-bug-issue-121457.stderr
@@ -1,3 +1,15 @@
+error[E0195]: lifetime parameters or bounds on associated type `Item` do not match the trait declaration
+  --> $DIR/span-bug-issue-121457.rs:10:14
+   |
+LL |     type Item<'a>
+   |              ---- lifetimes in impl do not match this associated type in trait
+LL |     where
+LL |         Self: 'a;
+   |               -- this bound might be missing in the impl
+...
+LL |     type Item = u32;
+   |              ^ lifetimes do not match associated type in trait
+
 error[E0582]: binding for associated type `Item` references lifetime `'missing`, which does not appear in the trait input types
   --> $DIR/span-bug-issue-121457.rs:13:51
    |
@@ -12,18 +24,6 @@ LL |     fn iter(&self) -> impl for<'missing> Iterator<Item = Self::Item<'missin
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0195]: lifetime parameters or bounds on associated type `Item` do not match the trait declaration
-  --> $DIR/span-bug-issue-121457.rs:10:14
-   |
-LL |     type Item<'a>
-   |              ---- lifetimes in impl do not match this associated type in trait
-LL |     where
-LL |         Self: 'a;
-   |               -- this bound might be missing in the impl
-...
-LL |     type Item = u32;
-   |              ^ lifetimes do not match associated type in trait
-
 error[E0277]: `()` is not an iterator
   --> $DIR/span-bug-issue-121457.rs:13:23
    |
diff --git a/tests/ui/impl-trait/in-trait/unconstrained-lt.rs b/tests/ui/impl-trait/in-trait/unconstrained-lt.rs
index ff3753de5a2..12e0a4263f5 100644
--- a/tests/ui/impl-trait/in-trait/unconstrained-lt.rs
+++ b/tests/ui/impl-trait/in-trait/unconstrained-lt.rs
@@ -6,6 +6,7 @@ impl<'a, T> Foo for T {
     //~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
 
     fn test() -> &'a () {
+        //~^ WARN: does not match trait method signature
         &()
     }
 }
diff --git a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr
index 4c5a42c0b4b..27340c5b362 100644
--- a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr
+++ b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr
@@ -1,9 +1,27 @@
+warning: impl trait in impl method signature does not match trait method signature
+  --> $DIR/unconstrained-lt.rs:8:18
+   |
+LL |     fn test() -> impl Sized;
+   |                  ---------- return type from trait method defined here
+...
+LL |     fn test() -> &'a () {
+   |                  ^^^^^^
+   |
+   = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
+   = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
+   = note: `#[warn(refining_impl_trait_internal)]` on by default
+help: replace the return type so that it matches the trait
+   |
+LL -     fn test() -> &'a () {
+LL +     fn test() -> impl Sized {
+   |
+
 error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
   --> $DIR/unconstrained-lt.rs:5:6
    |
 LL | impl<'a, T> Foo for T {
    |      ^^ unconstrained lifetime parameter
 
-error: aborting due to 1 previous error
+error: aborting due to 1 previous error; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr b/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr
index 626be7ac283..b0ea655fc67 100644
--- a/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr
+++ b/tests/ui/layout/ice-non-last-unsized-field-issue-121473.stderr
@@ -70,6 +70,18 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |         field2: Box<str>, // Unsized
    |                 ++++   +
 
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/ice-non-last-unsized-field-issue-121473.rs:46:5
+   |
+LL |     field2: str, // Unsized
+   |     ^^^^^^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     field2: std::mem::ManuallyDrop<str>, // Unsized
+   |             +++++++++++++++++++++++   +
+
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/ice-non-last-unsized-field-issue-121473.rs:46:13
    |
@@ -88,18 +100,6 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |     field2: Box<str>, // Unsized
    |             ++++   +
 
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/ice-non-last-unsized-field-issue-121473.rs:46:5
-   |
-LL |     field2: str, // Unsized
-   |     ^^^^^^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     field2: std::mem::ManuallyDrop<str>, // Unsized
-   |             +++++++++++++++++++++++   +
-
 error: aborting due to 6 previous errors
 
 Some errors have detailed explanations: E0277, E0740.
diff --git a/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr b/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr
index 32a564e466b..75ee936d9e8 100644
--- a/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr
+++ b/tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.stderr
@@ -1,4 +1,17 @@
 error[E0059]: type parameter to bare `FnOnce` trait must be a tuple
+  --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:31:5
+   |
+LL |     extern "rust-call" fn call_once(mut self, a: A) -> Self::Output {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
+   |
+note: required by a bound in `FnOnce`
+  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
+help: consider further restricting type parameter `A` with unstable trait `Tuple`
+   |
+LL |     A: Eq + Hash + Clone + std::marker::Tuple,
+   |                          ++++++++++++++++++++
+
+error[E0059]: type parameter to bare `FnOnce` trait must be a tuple
   --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:24:12
    |
 LL | impl<A, B> FnOnce<A> for CachedFun<A, B>
@@ -12,9 +25,9 @@ LL |     A: Eq + Hash + Clone + std::marker::Tuple,
    |                          ++++++++++++++++++++
 
 error[E0059]: type parameter to bare `FnOnce` trait must be a tuple
-  --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:31:5
+  --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:45:5
    |
-LL |     extern "rust-call" fn call_once(mut self, a: A) -> Self::Output {
+LL |     extern "rust-call" fn call_mut(&mut self, a: A) -> Self::Output {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
    |
 note: required by a bound in `FnOnce`
@@ -37,19 +50,6 @@ help: consider further restricting type parameter `A` with unstable trait `Tuple
 LL |     A: Eq + Hash + Clone + std::marker::Tuple,
    |                          ++++++++++++++++++++
 
-error[E0059]: type parameter to bare `FnOnce` trait must be a tuple
-  --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:45:5
-   |
-LL |     extern "rust-call" fn call_mut(&mut self, a: A) -> Self::Output {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
-   |
-note: required by a bound in `FnOnce`
-  --> $SRC_DIR/core/src/ops/function.rs:LL:COL
-help: consider further restricting type parameter `A` with unstable trait `Tuple`
-   |
-LL |     A: Eq + Hash + Clone + std::marker::Tuple,
-   |                          ++++++++++++++++++++
-
 error[E0277]: functions with the "rust-call" ABI must take a single non-self tuple argument
   --> $DIR/rust-call-abi-not-a-tuple-ice-81974.rs:31:5
    |
diff --git a/tests/ui/lifetimes/issue-95023.stderr b/tests/ui/lifetimes/issue-95023.stderr
index cbc0eeebee1..dffa033fb17 100644
--- a/tests/ui/lifetimes/issue-95023.stderr
+++ b/tests/ui/lifetimes/issue-95023.stderr
@@ -32,6 +32,14 @@ help: parenthesized trait syntax expands to `Fn<(&isize,), Output=()>`
 LL | impl Fn(&isize) for Error {
    |      ^^^^^^^^^^
 
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/issue-95023.rs:3:1
+   |
+LL | impl Fn(&isize) for Error {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+   |
+   = help: implement the missing item: `fn call(&self, _: (&isize,)) -> <Self as FnOnce<(&isize,)>>::Output { todo!() }`
+
 error[E0277]: expected a `FnMut(&isize)` closure, found `Error`
   --> $DIR/issue-95023.rs:3:21
    |
@@ -42,14 +50,6 @@ LL | impl Fn(&isize) for Error {
 note: required by a bound in `Fn`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error[E0046]: not all trait items implemented, missing: `call`
-  --> $DIR/issue-95023.rs:3:1
-   |
-LL | impl Fn(&isize) for Error {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
-   |
-   = help: implement the missing item: `fn call(&self, _: (&isize,)) -> <Self as FnOnce<(&isize,)>>::Output { todo!() }`
-
 error[E0220]: associated type `B` not found for `Self`
   --> $DIR/issue-95023.rs:8:44
    |
diff --git a/tests/ui/macros/macro-span-issue-116502.stderr b/tests/ui/macros/macro-span-issue-116502.stderr
index 68f8874f5d6..024656e685f 100644
--- a/tests/ui/macros/macro-span-issue-116502.stderr
+++ b/tests/ui/macros/macro-span-issue-116502.stderr
@@ -4,7 +4,7 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
 LL |             _
    |             ^ not allowed in type signatures
 ...
-LL |         T: Trait<m!()>;
+LL |     struct S<T = m!()>(m!(), T)
    |                  ---- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -15,8 +15,8 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures
 LL |             _
    |             ^ not allowed in type signatures
 ...
-LL |     struct S<T = m!()>(m!(), T)
-   |                        ---- in this macro invocation
+LL |         T: Trait<m!()>;
+   |                  ---- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
@@ -27,7 +27,7 @@ LL |             _
    |             ^ not allowed in type signatures
 ...
 LL |     struct S<T = m!()>(m!(), T)
-   |                  ---- in this macro invocation
+   |                        ---- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/simd/array-trait.stderr b/tests/ui/simd/array-trait.stderr
index 299f0ad96ae..47f395044ff 100644
--- a/tests/ui/simd/array-trait.stderr
+++ b/tests/ui/simd/array-trait.stderr
@@ -1,3 +1,9 @@
+error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type
+  --> $DIR/array-trait.rs:22:1
+   |
+LL | pub struct T<S: Simd>([S::Lane; S::SIZE]);
+   | ^^^^^^^^^^^^^^^^^^^^^
+
 error: unconstrained generic constant
   --> $DIR/array-trait.rs:22:23
    |
@@ -9,12 +15,6 @@ help: try adding a `where` bound
 LL | pub struct T<S: Simd>([S::Lane; S::SIZE]) where [(); S::SIZE]:;
    |                                           ++++++++++++++++++++
 
-error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type
-  --> $DIR/array-trait.rs:22:1
-   |
-LL | pub struct T<S: Simd>([S::Lane; S::SIZE]);
-   | ^^^^^^^^^^^^^^^^^^^^^
-
 error: unconstrained generic constant
   --> $DIR/array-trait.rs:22:23
    |
diff --git a/tests/ui/specialization/defaultimpl/validation.stderr b/tests/ui/specialization/defaultimpl/validation.stderr
index d034386b842..82a33bf9cdc 100644
--- a/tests/ui/specialization/defaultimpl/validation.stderr
+++ b/tests/ui/specialization/defaultimpl/validation.stderr
@@ -18,14 +18,6 @@ LL | #![feature(specialization)]
    = help: consider using `min_specialization` instead, which is more stable and complete
    = note: `#[warn(incomplete_features)]` on by default
 
-error: impls of auto traits cannot be default
-  --> $DIR/validation.rs:9:21
-   |
-LL | default unsafe impl Send for S {}
-   | -------             ^^^^ auto trait
-   | |
-   | default because of this
-
 error[E0367]: `!Send` impl requires `Z: Send` but the struct it is implemented for does not
   --> $DIR/validation.rs:12:1
    |
@@ -39,6 +31,14 @@ LL | struct Z;
    | ^^^^^^^^
 
 error: impls of auto traits cannot be default
+  --> $DIR/validation.rs:9:21
+   |
+LL | default unsafe impl Send for S {}
+   | -------             ^^^^ auto trait
+   | |
+   | default because of this
+
+error: impls of auto traits cannot be default
   --> $DIR/validation.rs:12:15
    |
 LL | default impl !Send for Z {}
diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr
index 2ed614f1857..9b6c931f909 100644
--- a/tests/ui/specialization/min_specialization/issue-79224.stderr
+++ b/tests/ui/specialization/min_specialization/issue-79224.stderr
@@ -1,8 +1,8 @@
 error[E0277]: the trait bound `B: Clone` is not satisfied
-  --> $DIR/issue-79224.rs:28:29
+  --> $DIR/issue-79224.rs:30:5
    |
-LL | impl<B: ?Sized> Display for Cow<'_, B> {
-   |                             ^^^^^^^^^^ the trait `Clone` is not implemented for `B`
+LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
    |
    = note: required for `B` to implement `ToOwned`
 help: consider further restricting type parameter `B` with trait `Clone`
@@ -11,10 +11,10 @@ LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
    |                +++++++++++++++++++
 
 error[E0277]: the trait bound `B: Clone` is not satisfied
-  --> $DIR/issue-79224.rs:30:5
+  --> $DIR/issue-79224.rs:28:29
    |
-LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
+LL | impl<B: ?Sized> Display for Cow<'_, B> {
+   |                             ^^^^^^^^^^ the trait `Clone` is not implemented for `B`
    |
    = note: required for `B` to implement `ToOwned`
 help: consider further restricting type parameter `B` with trait `Clone`
diff --git a/tests/ui/stability-attribute/generics-default-stability-where.stderr b/tests/ui/stability-attribute/generics-default-stability-where.stderr
index 9437f5d65fa..2254c7ffd39 100644
--- a/tests/ui/stability-attribute/generics-default-stability-where.stderr
+++ b/tests/ui/stability-attribute/generics-default-stability-where.stderr
@@ -1,12 +1,3 @@
-error[E0658]: use of unstable library feature `unstable_default`
-  --> $DIR/generics-default-stability-where.rs:7:45
-   |
-LL | impl<T> Trait3<usize> for T where T: Trait2<usize> {
-   |                                             ^^^^^
-   |
-   = help: add `#![feature(unstable_default)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
 error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
   --> $DIR/generics-default-stability-where.rs:7:6
    |
@@ -16,6 +7,15 @@ LL | impl<T> Trait3<usize> for T where T: Trait2<usize> {
    = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
    = note: only traits defined in the current crate can be implemented for a type parameter
 
+error[E0658]: use of unstable library feature `unstable_default`
+  --> $DIR/generics-default-stability-where.rs:7:45
+   |
+LL | impl<T> Trait3<usize> for T where T: Trait2<usize> {
+   |                                             ^^^^^
+   |
+   = help: add `#![feature(unstable_default)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0210, E0658.
diff --git a/tests/ui/statics/uninhabited-static.stderr b/tests/ui/statics/uninhabited-static.stderr
index f799a82f139..a0f9ad6772d 100644
--- a/tests/ui/statics/uninhabited-static.stderr
+++ b/tests/ui/statics/uninhabited-static.stderr
@@ -1,8 +1,8 @@
 error: static of uninhabited type
-  --> $DIR/uninhabited-static.rs:6:5
+  --> $DIR/uninhabited-static.rs:12:1
    |
-LL |     static VOID: Void;
-   |     ^^^^^^^^^^^^^^^^^
+LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
+   | ^^^^^^^^^^^^^^^^^^
    |
    = 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 #74840 <https://github.com/rust-lang/rust/issues/74840>
@@ -14,30 +14,30 @@ LL | #![deny(uninhabited_static)]
    |         ^^^^^^^^^^^^^^^^^^
 
 error: static of uninhabited type
-  --> $DIR/uninhabited-static.rs:8:5
+  --> $DIR/uninhabited-static.rs:15:1
    |
-LL |     static NEVER: !;
-   |     ^^^^^^^^^^^^^^^
+LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
+   | ^^^^^^^^^^^^^^^^^^^
    |
    = 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 #74840 <https://github.com/rust-lang/rust/issues/74840>
    = note: uninhabited statics cannot be initialized, and any access would be an immediate error
 
 error: static of uninhabited type
-  --> $DIR/uninhabited-static.rs:12:1
+  --> $DIR/uninhabited-static.rs:6:5
    |
-LL | static VOID2: Void = unsafe { std::mem::transmute(()) };
-   | ^^^^^^^^^^^^^^^^^^
+LL |     static VOID: Void;
+   |     ^^^^^^^^^^^^^^^^^
    |
    = 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 #74840 <https://github.com/rust-lang/rust/issues/74840>
    = note: uninhabited statics cannot be initialized, and any access would be an immediate error
 
 error: static of uninhabited type
-  --> $DIR/uninhabited-static.rs:15:1
+  --> $DIR/uninhabited-static.rs:8:5
    |
-LL | static NEVER2: Void = unsafe { std::mem::transmute(()) };
-   | ^^^^^^^^^^^^^^^^^^^
+LL |     static NEVER: !;
+   |     ^^^^^^^^^^^^^^^
    |
    = 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 #74840 <https://github.com/rust-lang/rust/issues/74840>
diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
index eedaae43f9a..54c0cf8ebee 100644
--- a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
+++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
@@ -1,9 +1,3 @@
-error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:9:9
-   |
-LL | impl<T, S> Trait<T> for i32 {
-   |         ^ unconstrained type parameter
-
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:15:12
    |
@@ -16,6 +10,12 @@ note: trait defined here, with 1 generic parameter: `T`
 LL | pub trait Trait<T> {
    |           ^^^^^ -
 
+error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:9:9
+   |
+LL | impl<T, S> Trait<T> for i32 {
+   |         ^ unconstrained type parameter
+
 error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
   --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:19:12
    |
diff --git a/tests/ui/traits/deep-norm-pending.stderr b/tests/ui/traits/deep-norm-pending.stderr
index b95b9d7f4ae..d9ef62f80ea 100644
--- a/tests/ui/traits/deep-norm-pending.stderr
+++ b/tests/ui/traits/deep-norm-pending.stderr
@@ -1,15 +1,4 @@
 error[E0277]: the trait bound `T: Foo` is not satisfied
-  --> $DIR/deep-norm-pending.rs:15:5
-   |
-LL |     fn method() {}
-   |     ^^^^^^^^^^^ the trait `Foo` is not implemented for `T`
-   |
-help: consider further restricting type parameter `T` with trait `Foo`
-   |
-LL |     <T as Foo>::Assoc: Sized, T: Foo
-   |                               ++++++
-
-error[E0277]: the trait bound `T: Foo` is not satisfied
   --> $DIR/deep-norm-pending.rs:9:1
    |
 LL | / impl<T> Bar for T
@@ -25,15 +14,10 @@ LL |     <T as Foo>::Assoc: Sized, T: Foo
    |                               ++++++
 
 error[E0277]: the trait bound `T: Foo` is not satisfied
-  --> $DIR/deep-norm-pending.rs:9:1
+  --> $DIR/deep-norm-pending.rs:15:5
    |
-LL | / impl<T> Bar for T
-LL | |
-LL | |
-LL | | where
-...  |
-LL | | }
-   | |_^ the trait `Foo` is not implemented for `T`
+LL |     fn method() {}
+   |     ^^^^^^^^^^^ the trait `Foo` is not implemented for `T`
    |
 help: consider further restricting type parameter `T` with trait `Foo`
    |
@@ -103,6 +87,22 @@ LL |     <T as Foo>::Assoc: Sized, T: Foo
    |                               ++++++
 
 error[E0277]: the trait bound `T: Foo` is not satisfied
+  --> $DIR/deep-norm-pending.rs:9:1
+   |
+LL | / impl<T> Bar for T
+LL | |
+LL | |
+LL | | where
+...  |
+LL | | }
+   | |_^ the trait `Foo` is not implemented for `T`
+   |
+help: consider further restricting type parameter `T` with trait `Foo`
+   |
+LL |     <T as Foo>::Assoc: Sized, T: Foo
+   |                               ++++++
+
+error[E0277]: the trait bound `T: Foo` is not satisfied
   --> $DIR/deep-norm-pending.rs:15:5
    |
 LL |     fn method() {}
diff --git a/tests/ui/traits/issue-78372.stderr b/tests/ui/traits/issue-78372.stderr
index fbc60ce5d83..a1c772f58e1 100644
--- a/tests/ui/traits/issue-78372.stderr
+++ b/tests/ui/traits/issue-78372.stderr
@@ -56,6 +56,12 @@ LL | impl<T> DispatchFromDyn<Smaht<U, MISC>> for T {}
    = help: add `#![feature(dispatch_from_dyn)]` to the crate attributes to enable
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
+error[E0377]: the trait `DispatchFromDyn` may only be implemented for a coercion between structures
+  --> $DIR/issue-78372.rs:3:1
+   |
+LL | impl<T> DispatchFromDyn<Smaht<U, MISC>> for T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 error[E0307]: invalid `self` parameter type: `Smaht<Self, T>`
   --> $DIR/issue-78372.rs:9:18
    |
@@ -65,12 +71,6 @@ LL |     fn foo(self: Smaht<Self, T>);
    = note: type of `self` must be `Self` or a type that dereferences to it
    = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
 
-error[E0377]: the trait `DispatchFromDyn` may only be implemented for a coercion between structures
-  --> $DIR/issue-78372.rs:3:1
-   |
-LL | impl<T> DispatchFromDyn<Smaht<U, MISC>> for T {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
 error: aborting due to 7 previous errors
 
 Some errors have detailed explanations: E0307, E0377, E0412, E0658.
diff --git a/tests/ui/traits/issue-87558.stderr b/tests/ui/traits/issue-87558.stderr
index 4cc3ec2ea8b..dc5bd6ece36 100644
--- a/tests/ui/traits/issue-87558.stderr
+++ b/tests/ui/traits/issue-87558.stderr
@@ -24,6 +24,14 @@ help: parenthesized trait syntax expands to `Fn<(&isize,), Output=()>`
 LL | impl Fn(&isize) for Error {
    |      ^^^^^^^^^^
 
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/issue-87558.rs:3:1
+   |
+LL | impl Fn(&isize) for Error {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+   |
+   = help: implement the missing item: `fn call(&self, _: (&isize,)) -> <Self as FnOnce<(&isize,)>>::Output { todo!() }`
+
 error[E0277]: expected a `FnMut(&isize)` closure, found `Error`
   --> $DIR/issue-87558.rs:3:21
    |
@@ -34,14 +42,6 @@ LL | impl Fn(&isize) for Error {
 note: required by a bound in `Fn`
   --> $SRC_DIR/core/src/ops/function.rs:LL:COL
 
-error[E0046]: not all trait items implemented, missing: `call`
-  --> $DIR/issue-87558.rs:3:1
-   |
-LL | impl Fn(&isize) for Error {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
-   |
-   = help: implement the missing item: `fn call(&self, _: (&isize,)) -> <Self as FnOnce<(&isize,)>>::Output { todo!() }`
-
 error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0046, E0183, E0229, E0277, E0407.
diff --git a/tests/ui/traits/unconstrained-projection-normalization-2.current.stderr b/tests/ui/traits/unconstrained-projection-normalization-2.current.stderr
index 2bb389c6ec1..9ce0e8d957d 100644
--- a/tests/ui/traits/unconstrained-projection-normalization-2.current.stderr
+++ b/tests/ui/traits/unconstrained-projection-normalization-2.current.stderr
@@ -4,6 +4,31 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
 LL | impl<T: ?Sized> Every for Thing {
    |      ^ unconstrained type parameter
 
-error: aborting due to 1 previous error
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/unconstrained-projection-normalization-2.rs:16:18
+   |
+LL | impl<T: ?Sized> Every for Thing {
+   |      - this type parameter needs to be `Sized`
+LL |
+LL |     type Assoc = T;
+   |                  ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Every::Assoc`
+  --> $DIR/unconstrained-projection-normalization-2.rs:12:5
+   |
+LL |     type Assoc;
+   |     ^^^^^^^^^^^ required by this bound in `Every::Assoc`
+help: consider removing the `?Sized` bound to make the type parameter `Sized`
+   |
+LL - impl<T: ?Sized> Every for Thing {
+LL + impl<T> Every for Thing {
+   |
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Assoc: ?Sized;
+   |               ++++++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0207, E0277.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/traits/unconstrained-projection-normalization-2.next.stderr b/tests/ui/traits/unconstrained-projection-normalization-2.next.stderr
index 3eacab33e46..2da655afa93 100644
--- a/tests/ui/traits/unconstrained-projection-normalization-2.next.stderr
+++ b/tests/ui/traits/unconstrained-projection-normalization-2.next.stderr
@@ -4,13 +4,37 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
 LL | impl<T: ?Sized> Every for Thing {
    |      ^ unconstrained type parameter
 
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/unconstrained-projection-normalization-2.rs:16:18
+   |
+LL | impl<T: ?Sized> Every for Thing {
+   |      - this type parameter needs to be `Sized`
+LL |
+LL |     type Assoc = T;
+   |                  ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Every::Assoc`
+  --> $DIR/unconstrained-projection-normalization-2.rs:12:5
+   |
+LL |     type Assoc;
+   |     ^^^^^^^^^^^ required by this bound in `Every::Assoc`
+help: consider removing the `?Sized` bound to make the type parameter `Sized`
+   |
+LL - impl<T: ?Sized> Every for Thing {
+LL + impl<T> Every for Thing {
+   |
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Assoc: ?Sized;
+   |               ++++++++
+
 error[E0282]: type annotations needed
-  --> $DIR/unconstrained-projection-normalization-2.rs:19:11
+  --> $DIR/unconstrained-projection-normalization-2.rs:20:11
    |
 LL | fn foo(_: <Thing as Every>::Assoc) {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for associated type `<Thing as Every>::Assoc`
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0207, E0282.
+Some errors have detailed explanations: E0207, E0277, E0282.
 For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/traits/unconstrained-projection-normalization-2.rs b/tests/ui/traits/unconstrained-projection-normalization-2.rs
index 9d95c73eea7..899d67571e7 100644
--- a/tests/ui/traits/unconstrained-projection-normalization-2.rs
+++ b/tests/ui/traits/unconstrained-projection-normalization-2.rs
@@ -12,8 +12,9 @@ pub trait Every {
     type Assoc;
 }
 impl<T: ?Sized> Every for Thing {
-//~^ ERROR the type parameter `T` is not constrained
+    //~^ ERROR the type parameter `T` is not constrained
     type Assoc = T;
+    //~^ ERROR: the size for values of type `T` cannot be known at compilation time
 }
 
 fn foo(_: <Thing as Every>::Assoc) {}
diff --git a/tests/ui/traits/unconstrained-projection-normalization.current.stderr b/tests/ui/traits/unconstrained-projection-normalization.current.stderr
index 991f0e8ba66..c52e8dd68aa 100644
--- a/tests/ui/traits/unconstrained-projection-normalization.current.stderr
+++ b/tests/ui/traits/unconstrained-projection-normalization.current.stderr
@@ -4,6 +4,31 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
 LL | impl<T: ?Sized> Every for Thing {
    |      ^ unconstrained type parameter
 
-error: aborting due to 1 previous error
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/unconstrained-projection-normalization.rs:15:18
+   |
+LL | impl<T: ?Sized> Every for Thing {
+   |      - this type parameter needs to be `Sized`
+LL |
+LL |     type Assoc = T;
+   |                  ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Every::Assoc`
+  --> $DIR/unconstrained-projection-normalization.rs:11:5
+   |
+LL |     type Assoc;
+   |     ^^^^^^^^^^^ required by this bound in `Every::Assoc`
+help: consider removing the `?Sized` bound to make the type parameter `Sized`
+   |
+LL - impl<T: ?Sized> Every for Thing {
+LL + impl<T> Every for Thing {
+   |
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Assoc: ?Sized;
+   |               ++++++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0207, E0277.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/traits/unconstrained-projection-normalization.next.stderr b/tests/ui/traits/unconstrained-projection-normalization.next.stderr
index 991f0e8ba66..c52e8dd68aa 100644
--- a/tests/ui/traits/unconstrained-projection-normalization.next.stderr
+++ b/tests/ui/traits/unconstrained-projection-normalization.next.stderr
@@ -4,6 +4,31 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
 LL | impl<T: ?Sized> Every for Thing {
    |      ^ unconstrained type parameter
 
-error: aborting due to 1 previous error
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/unconstrained-projection-normalization.rs:15:18
+   |
+LL | impl<T: ?Sized> Every for Thing {
+   |      - this type parameter needs to be `Sized`
+LL |
+LL |     type Assoc = T;
+   |                  ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Every::Assoc`
+  --> $DIR/unconstrained-projection-normalization.rs:11:5
+   |
+LL |     type Assoc;
+   |     ^^^^^^^^^^^ required by this bound in `Every::Assoc`
+help: consider removing the `?Sized` bound to make the type parameter `Sized`
+   |
+LL - impl<T: ?Sized> Every for Thing {
+LL + impl<T> Every for Thing {
+   |
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Assoc: ?Sized;
+   |               ++++++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0207, E0277.
+For more information about an error, try `rustc --explain E0207`.
diff --git a/tests/ui/traits/unconstrained-projection-normalization.rs b/tests/ui/traits/unconstrained-projection-normalization.rs
index fa4ab7fec4c..8e9444533a8 100644
--- a/tests/ui/traits/unconstrained-projection-normalization.rs
+++ b/tests/ui/traits/unconstrained-projection-normalization.rs
@@ -11,8 +11,9 @@ pub trait Every {
     type Assoc;
 }
 impl<T: ?Sized> Every for Thing {
-//~^ ERROR the type parameter `T` is not constrained
+    //~^ ERROR the type parameter `T` is not constrained
     type Assoc = T;
+    //~^ ERROR: the size for values of type `T` cannot be known at compilation time
 }
 
 static I: <Thing as Every>::Assoc = 3;
diff --git a/tests/ui/typeck/issue-13853-5.rs b/tests/ui/typeck/issue-13853-5.rs
index fc97c6c67d6..47596aa4927 100644
--- a/tests/ui/typeck/issue-13853-5.rs
+++ b/tests/ui/typeck/issue-13853-5.rs
@@ -1,4 +1,4 @@
-trait Deserializer<'a> { }
+trait Deserializer<'a> {}
 
 trait Deserializable {
     fn deserialize_token<'a, D: Deserializer<'a>>(_: D, _: &'a str) -> Self;
@@ -8,6 +8,7 @@ impl<'a, T: Deserializable> Deserializable for &'a str {
     //~^ ERROR type parameter `T` is not constrained
     fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
         //~^ ERROR mismatched types
+        //~| ERROR do not match the trait declaration
     }
 }
 
diff --git a/tests/ui/typeck/issue-13853-5.stderr b/tests/ui/typeck/issue-13853-5.stderr
index 4e483a0a58e..bb967b07b81 100644
--- a/tests/ui/typeck/issue-13853-5.stderr
+++ b/tests/ui/typeck/issue-13853-5.stderr
@@ -1,3 +1,12 @@
+error[E0195]: lifetime parameters or bounds on associated function `deserialize_token` do not match the trait declaration
+  --> $DIR/issue-13853-5.rs:9:25
+   |
+LL |     fn deserialize_token<'a, D: Deserializer<'a>>(_: D, _: &'a str) -> Self;
+   |                         ------------------------- lifetimes in impl do not match this associated function in trait
+...
+LL |     fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
+   |                         ^^^^^^^^^^^^^^^^^^^^^ lifetimes do not match associated function in trait
+
 error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
   --> $DIR/issue-13853-5.rs:7:10
    |
@@ -19,7 +28,7 @@ LL ~         _y
 LL ~
    |
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0207, E0308.
-For more information about an error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0195, E0207, E0308.
+For more information about an error, try `rustc --explain E0195`.
diff --git a/tests/ui/union/issue-81199.stderr b/tests/ui/union/issue-81199.stderr
index 8b78ddcf4a5..7deba88fc80 100644
--- a/tests/ui/union/issue-81199.stderr
+++ b/tests/ui/union/issue-81199.stderr
@@ -1,3 +1,15 @@
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/issue-81199.rs:5:5
+   |
+LL |     components: PtrComponents<T>,
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     components: std::mem::ManuallyDrop<PtrComponents<T>>,
+   |                 +++++++++++++++++++++++                +
+
 error[E0277]: the trait bound `T: Pointee` is not satisfied
   --> $DIR/issue-81199.rs:5:17
    |
@@ -14,18 +26,6 @@ help: consider further restricting type parameter `T` with trait `Pointee`
 LL | union PtrRepr<T: ?Sized + Pointee> {
    |                         +++++++++
 
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/issue-81199.rs:5:5
-   |
-LL |     components: PtrComponents<T>,
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     components: std::mem::ManuallyDrop<PtrComponents<T>>,
-   |                 +++++++++++++++++++++++                +
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0277, E0740.
diff --git a/tests/ui/union/union-unsized.stderr b/tests/ui/union/union-unsized.stderr
index 851ad8939d4..89ab716071a 100644
--- a/tests/ui/union/union-unsized.stderr
+++ b/tests/ui/union/union-unsized.stderr
@@ -1,3 +1,15 @@
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/union-unsized.rs:2:5
+   |
+LL |     a: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     a: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/union-unsized.rs:2:8
    |
@@ -17,15 +29,15 @@ LL |     a: Box<str>,
    |        ++++   +
 
 error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-unsized.rs:2:5
+  --> $DIR/union-unsized.rs:11:5
    |
-LL |     a: str,
+LL |     b: str,
    |     ^^^^^^
    |
    = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
 help: wrap the field type in `ManuallyDrop<...>`
    |
-LL |     a: std::mem::ManuallyDrop<str>,
+LL |     b: std::mem::ManuallyDrop<str>,
    |        +++++++++++++++++++++++   +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
@@ -46,18 +58,6 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |     b: Box<str>,
    |        ++++   +
 
-error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
-  --> $DIR/union-unsized.rs:11:5
-   |
-LL |     b: str,
-   |     ^^^^^^
-   |
-   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-help: wrap the field type in `ManuallyDrop<...>`
-   |
-LL |     b: std::mem::ManuallyDrop<str>,
-   |        +++++++++++++++++++++++   +
-
 error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0277, E0740.
diff --git a/tests/ui/unsized/unsized-trait-impl-self-type.stderr b/tests/ui/unsized/unsized-trait-impl-self-type.stderr
index 3b684193b4a..61165d49b2d 100644
--- a/tests/ui/unsized/unsized-trait-impl-self-type.stderr
+++ b/tests/ui/unsized/unsized-trait-impl-self-type.stderr
@@ -1,3 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `foo`
+  --> $DIR/unsized-trait-impl-self-type.rs:10:1
+   |
+LL |     fn foo(&self, z: &Z);
+   |     --------------------- `foo` from trait
+...
+LL | impl<X: ?Sized> T3<X> for S5<X> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
+
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized-trait-impl-self-type.rs:10:27
    |
@@ -24,15 +33,6 @@ LL - impl<X: ?Sized> T3<X> for S5<X> {
 LL + impl<X> T3<X> for S5<X> {
    |
 
-error[E0046]: not all trait items implemented, missing: `foo`
-  --> $DIR/unsized-trait-impl-self-type.rs:10:1
-   |
-LL |     fn foo(&self, z: &Z);
-   |     --------------------- `foo` from trait
-...
-LL | impl<X: ?Sized> T3<X> for S5<X> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0046, E0277.
diff --git a/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr b/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
index 79fc9567dae..f46a6f678a9 100644
--- a/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
+++ b/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
@@ -1,3 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `foo`
+  --> $DIR/unsized-trait-impl-trait-arg.rs:8:1
+   |
+LL |     fn foo(&self, z: Z);
+   |     -------------------- `foo` from trait
+...
+LL | impl<X: ?Sized> T2<X> for S4<X> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
+
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized-trait-impl-trait-arg.rs:8:17
    |
@@ -21,15 +30,6 @@ help: consider relaxing the implicit `Sized` restriction
 LL | trait T2<Z: ?Sized> {
    |           ++++++++
 
-error[E0046]: not all trait items implemented, missing: `foo`
-  --> $DIR/unsized-trait-impl-trait-arg.rs:8:1
-   |
-LL |     fn foo(&self, z: Z);
-   |     -------------------- `foo` from trait
-...
-LL | impl<X: ?Sized> T2<X> for S4<X> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0046, E0277.
diff --git a/tests/ui/unsized/unsized7.stderr b/tests/ui/unsized/unsized7.stderr
index 6e9c052a070..2e65c8c3357 100644
--- a/tests/ui/unsized/unsized7.stderr
+++ b/tests/ui/unsized/unsized7.stderr
@@ -1,3 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `dummy`
+  --> $DIR/unsized7.rs:12:1
+   |
+LL |     fn dummy(&self) -> Z;
+   |     --------------------- `dummy` from trait
+...
+LL | impl<X: ?Sized + T> T1<X> for S3<X> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `dummy` in implementation
+
 error[E0277]: the size for values of type `X` cannot be known at compilation time
   --> $DIR/unsized7.rs:12:21
    |
@@ -21,15 +30,6 @@ help: consider relaxing the implicit `Sized` restriction
 LL | trait T1<Z: T + ?Sized> {
    |               ++++++++
 
-error[E0046]: not all trait items implemented, missing: `dummy`
-  --> $DIR/unsized7.rs:12:1
-   |
-LL |     fn dummy(&self) -> Z;
-   |     --------------------- `dummy` from trait
-...
-LL | impl<X: ?Sized + T> T1<X> for S3<X> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `dummy` in implementation
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0046, E0277.
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
index e10bb98c134..dc5a1cf3485 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122199.stderr
@@ -32,7 +32,7 @@ LL | trait Trait<const N: dyn Trait = bar> {
    |                          ^^^^^
    |
    = note: ...which immediately requires computing type of `Trait::N` again
-note: cycle used when computing explicit predicates of trait `Trait`
+note: cycle used when checking that `Trait` is well-formed
   --> $DIR/ice-hir-wf-check-anon-const-issue-122199.rs:1:1
    |
 LL | trait Trait<const N: dyn Trait = bar> {
diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr
index a381f2acdce..a99728f4b66 100644
--- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr
+++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr
@@ -37,7 +37,7 @@ note: ...which requires computing type of `Bar::M`...
 LL | trait Bar<const M: Foo<2>> {}
    |           ^^^^^^^^^^^^^^^
    = note: ...which again requires computing type of `Foo::N`, completing the cycle
-note: cycle used when computing explicit predicates of trait `Foo`
+note: cycle used when checking that `Foo` is well-formed
   --> $DIR/ice-hir-wf-check-anon-const-issue-122989.rs:2:1
    |
 LL | trait Foo<const N: Bar<2>> {
@@ -56,7 +56,7 @@ note: ...which requires computing type of `Bar::M`...
 LL | trait Bar<const M: Foo<2>> {}
    |           ^^^^^^^^^^^^^^^
    = note: ...which again requires computing type of `Foo::N`, completing the cycle
-note: cycle used when computing explicit predicates of trait `Foo`
+note: cycle used when checking that `Foo` is well-formed
   --> $DIR/ice-hir-wf-check-anon-const-issue-122989.rs:2:1
    |
 LL | trait Foo<const N: Bar<2>> {