about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr24
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-1.rs4
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-1.stderr4
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-2.rs4
-rw-r--r--tests/ui/associated-types/defaults-cyclic-fail-2.stderr4
-rw-r--r--tests/ui/async-await/issue-66312.stderr12
-rw-r--r--tests/ui/const-generics/issues/issue-83765.rs3
-rw-r--r--tests/ui/const-generics/issues/issue-83765.stderr42
-rw-r--r--tests/ui/consts/const-unsized.stderr46
-rw-r--r--tests/ui/consts/issue-39974.stderr12
-rw-r--r--tests/ui/generic-associated-types/issue-84931.stderr26
-rw-r--r--tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr40
-rw-r--r--tests/ui/impl-trait/issues/issue-78722-2.stderr18
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.rs4
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.stderr13
-rw-r--r--tests/ui/issues/issue-23122-2.stderr2
-rw-r--r--tests/ui/layout/issue-84108.stderr18
-rw-r--r--tests/ui/specialization/min_specialization/issue-79224.stderr8
-rw-r--r--tests/ui/traits/cycle-cache-err-60010.rs3
-rw-r--r--tests/ui/traits/cycle-cache-err-60010.stderr59
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.rs6
-rw-r--r--tests/ui/traits/next-solver/specialization-transmute.stderr11
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained.stderr22
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr44
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53092-2.stderr16
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.stderr34
-rw-r--r--tests/ui/union/union-unsized.mirunsafeck.stderr24
-rw-r--r--tests/ui/union/union-unsized.thirunsafeck.stderr24
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.stderr24
29 files changed, 320 insertions, 231 deletions
diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
index 9ebc45387e8..5443699eb01 100644
--- a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
+++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
@@ -1,4 +1,16 @@
 error[E0277]: the trait bound `(T, U): Get` is not satisfied
+  --> $DIR/associated-types-no-suitable-supertrait.rs:22:5
+   |
+LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/associated-types-no-suitable-supertrait.rs:12:1
+   |
+LL | trait Get {
+   | ^^^^^^^^^
+
+error[E0277]: the trait bound `(T, U): Get` is not satisfied
   --> $DIR/associated-types-no-suitable-supertrait.rs:22:40
    |
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
@@ -21,18 +33,6 @@ help: consider further restricting `Self`
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
    |                                                              +++++++++++++++
 
-error[E0277]: the trait bound `(T, U): Get` is not satisfied
-  --> $DIR/associated-types-no-suitable-supertrait.rs:22:5
-   |
-LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
-   |
-help: this trait has no implementations, consider adding one
-  --> $DIR/associated-types-no-suitable-supertrait.rs:12:1
-   |
-LL | trait Get {
-   | ^^^^^^^^^
-
 error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-1.rs b/tests/ui/associated-types/defaults-cyclic-fail-1.rs
index 61ef013236e..1ec5faca7c5 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-1.rs
+++ b/tests/ui/associated-types/defaults-cyclic-fail-1.rs
@@ -24,13 +24,13 @@ impl Tr for u32 {
 // ...but not in an impl that redefines one of the types.
 impl Tr for bool {
     type A = Box<Self::B>;
-    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::B == _`
+    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::A == _`
 }
 // (the error is shown twice for some reason)
 
 impl Tr for usize {
     type B = &'static Self::A;
-    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::A == _`
+    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::B == _`
 }
 
 fn main() {
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-1.stderr b/tests/ui/associated-types/defaults-cyclic-fail-1.stderr
index 008eddcb29d..876fdaec296 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-1.stderr
+++ b/tests/ui/associated-types/defaults-cyclic-fail-1.stderr
@@ -1,10 +1,10 @@
-error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
+error[E0275]: overflow evaluating the requirement `<bool as Tr>::A == _`
   --> $DIR/defaults-cyclic-fail-1.rs:26:14
    |
 LL |     type A = Box<Self::B>;
    |              ^^^^^^^^^^^^
 
-error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
+error[E0275]: overflow evaluating the requirement `<usize as Tr>::B == _`
   --> $DIR/defaults-cyclic-fail-1.rs:32:14
    |
 LL |     type B = &'static Self::A;
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-2.rs b/tests/ui/associated-types/defaults-cyclic-fail-2.rs
index e91c9f2d29a..bec1bde71a1 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-2.rs
+++ b/tests/ui/associated-types/defaults-cyclic-fail-2.rs
@@ -25,13 +25,13 @@ impl Tr for u32 {
 
 impl Tr for bool {
     type A = Box<Self::B>;
-    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::B == _`
+    //~^ ERROR overflow evaluating the requirement `<bool as Tr>::A == _`
 }
 // (the error is shown twice for some reason)
 
 impl Tr for usize {
     type B = &'static Self::A;
-    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::A == _`
+    //~^ ERROR overflow evaluating the requirement `<usize as Tr>::B == _`
 }
 
 fn main() {
diff --git a/tests/ui/associated-types/defaults-cyclic-fail-2.stderr b/tests/ui/associated-types/defaults-cyclic-fail-2.stderr
index d0fbab07715..ec0c9973c0a 100644
--- a/tests/ui/associated-types/defaults-cyclic-fail-2.stderr
+++ b/tests/ui/associated-types/defaults-cyclic-fail-2.stderr
@@ -1,10 +1,10 @@
-error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
+error[E0275]: overflow evaluating the requirement `<bool as Tr>::A == _`
   --> $DIR/defaults-cyclic-fail-2.rs:27:14
    |
 LL |     type A = Box<Self::B>;
    |              ^^^^^^^^^^^^
 
-error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
+error[E0275]: overflow evaluating the requirement `<usize as Tr>::B == _`
   --> $DIR/defaults-cyclic-fail-2.rs:33:14
    |
 LL |     type B = &'static Self::A;
diff --git a/tests/ui/async-await/issue-66312.stderr b/tests/ui/async-await/issue-66312.stderr
index dad5807cb50..2875af8a97e 100644
--- a/tests/ui/async-await/issue-66312.stderr
+++ b/tests/ui/async-await/issue-66312.stderr
@@ -1,3 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-66312.rs:9:8
+   |
+LL |     if x.is_some() {
+   |        ^^^^^^^^^^^ expected `bool`, found `()`
+
 error[E0307]: invalid `self` parameter type: T
   --> $DIR/issue-66312.rs:4:22
    |
@@ -7,12 +13,6 @@ LL |     fn is_some(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[E0308]: mismatched types
-  --> $DIR/issue-66312.rs:9:8
-   |
-LL |     if x.is_some() {
-   |        ^^^^^^^^^^^ expected `bool`, found `()`
-
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0307, E0308.
diff --git a/tests/ui/const-generics/issues/issue-83765.rs b/tests/ui/const-generics/issues/issue-83765.rs
index 71c164ab0a5..0959f771c22 100644
--- a/tests/ui/const-generics/issues/issue-83765.rs
+++ b/tests/ui/const-generics/issues/issue-83765.rs
@@ -4,6 +4,7 @@
 trait TensorDimension {
     const DIM: usize;
     //~^ ERROR cycle detected when resolving instance
+    //~| ERROR cycle detected when resolving instance
     // FIXME Given the current state of the compiler its expected that we cycle here,
     // but the cycle is still wrong.
     const ISSCALAR: bool = Self::DIM == 0;
@@ -79,6 +80,7 @@ impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> TensorSi
     for BMap<'a, R, T, F, DIM>
 {
     fn size(&self) -> [usize; DIM] {
+        //~^ ERROR: method not compatible with trait
         self.reference.size()
     }
 }
@@ -88,6 +90,7 @@ impl<'a, R, T: Broadcastable, F: Fn(T::Element) -> R, const DIM: usize> Broadcas
 {
     type Element = R;
     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
+        //~^ ERROR: method not compatible with trait
         self.reference.bget(index).map(&self.closure)
     }
 }
diff --git a/tests/ui/const-generics/issues/issue-83765.stderr b/tests/ui/const-generics/issues/issue-83765.stderr
index d9956875cf8..c3292314f23 100644
--- a/tests/ui/const-generics/issues/issue-83765.stderr
+++ b/tests/ui/const-generics/issues/issue-83765.stderr
@@ -17,6 +17,44 @@ LL | trait TensorDimension {
    | ^^^^^^^^^^^^^^^^^^^^^
    = 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
+error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`
+  --> $DIR/issue-83765.rs:5:5
+   |
+LL |     const DIM: usize;
+   |     ^^^^^^^^^^^^^^^^
+   |
+note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`...
+  --> $DIR/issue-83765.rs:4:1
+   |
+LL | trait TensorDimension {
+   | ^^^^^^^^^^^^^^^^^^^^^
+   = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle
+note: cycle used when checking that `<impl at $DIR/issue-83765.rs:56:1: 56:97>` is well-formed
+  --> $DIR/issue-83765.rs:56:1
+   |
+LL | impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = 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[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:82:5
+   |
+LL |     fn size(&self) -> [usize; DIM] {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error[E0308]: method not compatible with trait
+  --> $DIR/issue-83765.rs:92:5
+   |
+LL |     fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
+   |
+   = note: expected constant `Self::DIM`
+              found constant `DIM`
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0391`.
+Some errors have detailed explanations: E0308, E0391.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/const-unsized.stderr b/tests/ui/consts/const-unsized.stderr
index 674f0cb99e7..f70c9b2e077 100644
--- a/tests/ui/consts/const-unsized.stderr
+++ b/tests/ui/consts/const-unsized.stderr
@@ -6,39 +6,23 @@ LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
    |
    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
 
-error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:7:18
-   |
-LL | const CONST_FOO: str = *"foo";
-   |                  ^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `str`
-
 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:11:18
+  --> $DIR/const-unsized.rs:3:35
    |
-LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
-   |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
+   = note: constant expressions must have a statically known size
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:15:20
+  --> $DIR/const-unsized.rs:7:18
    |
-LL | static STATIC_BAR: str = *"bar";
-   |                    ^^^ doesn't have a size known at compile-time
+LL | const CONST_FOO: str = *"foo";
+   |                  ^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
 
-error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:3:35
-   |
-LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
-   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
-   = note: constant expressions must have a statically known size
-
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/const-unsized.rs:7:24
    |
@@ -49,6 +33,14 @@ LL | const CONST_FOO: str = *"foo";
    = note: constant expressions must have a statically known size
 
 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:11:18
+   |
+LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
+   |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
+
+error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
   --> $DIR/const-unsized.rs:11:37
    |
 LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
@@ -58,6 +50,14 @@ LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
    = note: constant expressions must have a statically known size
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:15:20
+   |
+LL | static STATIC_BAR: str = *"bar";
+   |                    ^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+
+error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/const-unsized.rs:15:26
    |
 LL | static STATIC_BAR: str = *"bar";
diff --git a/tests/ui/consts/issue-39974.stderr b/tests/ui/consts/issue-39974.stderr
index 4bde599039e..114c4cfeaf7 100644
--- a/tests/ui/consts/issue-39974.stderr
+++ b/tests/ui/consts/issue-39974.stderr
@@ -1,10 +1,4 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-39974.rs:5:19
-   |
-LL |     f: [[f64; 2]; LENGTH],
-   |                   ^^^^^^ expected `usize`, found `f64`
-
-error[E0308]: mismatched types
   --> $DIR/issue-39974.rs:1:21
    |
 LL | const LENGTH: f64 = 2;
@@ -13,6 +7,12 @@ LL | const LENGTH: f64 = 2;
    |                     expected `f64`, found integer
    |                     help: use a float literal: `2.0`
 
+error[E0308]: mismatched types
+  --> $DIR/issue-39974.rs:5:19
+   |
+LL |     f: [[f64; 2]; LENGTH],
+   |                   ^^^^^^ expected `usize`, found `f64`
+
 error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/generic-associated-types/issue-84931.stderr b/tests/ui/generic-associated-types/issue-84931.stderr
index 04e14b9c746..71d112277a3 100644
--- a/tests/ui/generic-associated-types/issue-84931.stderr
+++ b/tests/ui/generic-associated-types/issue-84931.stderr
@@ -1,16 +1,3 @@
-error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/issue-84931.rs:14:21
-   |
-LL |     type Item<'a> = &'a mut T;
-   |               --    ^^^^^^^^^ ...so that the reference type `&'a mut T` does not outlive the data it points at
-   |               |
-   |               the parameter type `T` must be valid for the lifetime `'a` as defined here...
-   |
-help: consider adding an explicit lifetime bound
-   |
-LL |     type Item<'a> = &'a mut T where T: 'a;
-   |                               +++++++++++
-
 error[E0477]: the type `StreamingSliceIter<'b, T>` does not fulfill the required lifetime
   --> $DIR/issue-84931.rs:14:21
    |
@@ -30,6 +17,19 @@ help: copy the `where` clause predicates from the trait
 LL |     type Item<'a> = &'a mut T where Self: 'a;
    |                               ++++++++++++++
 
+error[E0309]: the parameter type `T` may not live long enough
+  --> $DIR/issue-84931.rs:14:21
+   |
+LL |     type Item<'a> = &'a mut T;
+   |               --    ^^^^^^^^^ ...so that the reference type `&'a mut T` does not outlive the data it points at
+   |               |
+   |               the parameter type `T` must be valid for the lifetime `'a` as defined here...
+   |
+help: consider adding an explicit lifetime bound
+   |
+LL |     type Item<'a> = &'a mut T where T: 'a;
+   |                               +++++++++++
+
 error: aborting due to 2 previous errors
 
 Some errors have detailed explanations: E0309, E0477.
diff --git a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
index f73ed5956da..8d21b9172c8 100644
--- a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
+++ b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
@@ -12,6 +12,26 @@ LL | #![warn(unused_lifetimes)]
    |         ^^^^^^^^^^^^^^^^
 
 error[E0478]: lifetime bound not satisfied
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:18
+   |
+LL |     type Y<'a: 'static>;
+   |     ------------------- definition of `Y` from trait
+...
+LL |     type Y<'a> = &'a ();
+   |                  ^^^^^^
+   |
+note: lifetime parameter instantiated with the lifetime `'a` as defined here
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:12
+   |
+LL |     type Y<'a> = &'a ();
+   |            ^^
+   = note: but lifetime parameter must outlive the static lifetime
+help: copy the `where` clause predicates from the trait
+   |
+LL |     type Y<'a> = &'a () where 'a: 'static;
+   |                         +++++++++++++++++
+
+error[E0478]: lifetime bound not satisfied
   --> $DIR/unsatisfied-item-lifetime-bound.rs:14:8
    |
 LL |     f: <T as X>::Y<'a>,
@@ -50,26 +70,6 @@ LL | struct D<'a> {
    |          ^^
    = note: but lifetime parameter must outlive the static lifetime
 
-error[E0478]: lifetime bound not satisfied
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:18
-   |
-LL |     type Y<'a: 'static>;
-   |     ------------------- definition of `Y` from trait
-...
-LL |     type Y<'a> = &'a ();
-   |                  ^^^^^^
-   |
-note: lifetime parameter instantiated with the lifetime `'a` as defined here
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:12
-   |
-LL |     type Y<'a> = &'a ();
-   |            ^^
-   = note: but lifetime parameter must outlive the static lifetime
-help: copy the `where` clause predicates from the trait
-   |
-LL |     type Y<'a> = &'a () where 'a: 'static;
-   |                         +++++++++++++++++
-
 error: aborting due to 4 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/impl-trait/issues/issue-78722-2.stderr b/tests/ui/impl-trait/issues/issue-78722-2.stderr
index 8817eb7d243..69c734530f2 100644
--- a/tests/ui/impl-trait/issues/issue-78722-2.stderr
+++ b/tests/ui/impl-trait/issues/issue-78722-2.stderr
@@ -1,12 +1,3 @@
-error[E0658]: `async` blocks are not allowed in constants
-  --> $DIR/issue-78722-2.rs:15:20
-   |
-LL |         let f: F = async { 1 };
-   |                    ^^^^^^^^^^^
-   |
-   = note: see issue #85368 <https://github.com/rust-lang/rust/issues/85368> for more information
-   = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable
-
 error[E0271]: expected `{async block@$DIR/issue-78722-2.rs:13:13: 13:21}` to be a future that resolves to `u8`, but it resolves to `()`
   --> $DIR/issue-78722-2.rs:11:30
    |
@@ -26,6 +17,15 @@ note: this item must mention the opaque type in its signature in order to be abl
 LL |         let f: F = async { 1 };
    |                    ^^^^^^^^^^^
 
+error[E0658]: `async` blocks are not allowed in constants
+  --> $DIR/issue-78722-2.rs:15:20
+   |
+LL |         let f: F = async { 1 };
+   |                    ^^^^^^^^^^^
+   |
+   = note: see issue #85368 <https://github.com/rust-lang/rust/issues/85368> for more information
+   = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable
+
 error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0271, E0658.
diff --git a/tests/ui/impl-trait/issues/issue-86800.rs b/tests/ui/impl-trait/issues/issue-86800.rs
index df70b324c5e..297b012d90a 100644
--- a/tests/ui/impl-trait/issues/issue-86800.rs
+++ b/tests/ui/impl-trait/issues/issue-86800.rs
@@ -1,8 +1,8 @@
 #![feature(type_alias_impl_trait)]
 
 // edition:2021
-// compile-flags:-Z treat-err-as-bug=1
-// error-pattern: aborting due to `-Z treat-err-as-bug=1`
+// compile-flags:-Z treat-err-as-bug=2
+// error-pattern: due to `-Z treat-err-as-bug=2
 // failure-status:101
 // normalize-stderr-test ".*note: .*\n\n" -> ""
 // normalize-stderr-test "thread 'rustc' panicked.*:\n.*\n" -> ""
diff --git a/tests/ui/impl-trait/issues/issue-86800.stderr b/tests/ui/impl-trait/issues/issue-86800.stderr
index 8228f8ace9d..07ba8eb021b 100644
--- a/tests/ui/impl-trait/issues/issue-86800.stderr
+++ b/tests/ui/impl-trait/issues/issue-86800.stderr
@@ -4,9 +4,18 @@ error: unconstrained opaque type
 LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
+error[E0792]: expected generic lifetime parameter, found `'_`
+  --> $DIR/issue-86800.rs:39:5
+   |
+LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
+   |                        --- this generic parameter must be used with a generic lifetime parameter
+...
+LL |     f
+   |     ^
+
 error: the compiler unexpectedly panicked. this is a bug.
 
 query stack during panic:
-#0 [type_of_opaque] computing type of opaque `TransactionFuture::{opaque#0}`
-#1 [type_of] computing type of `TransactionFuture::{opaque#0}`
+#0 [mir_borrowck] borrow-checking `execute_transaction_fut`
+#1 [type_of_opaque] computing type of opaque `execute_transaction_fut::{opaque#0}`
 end of query stack
diff --git a/tests/ui/issues/issue-23122-2.stderr b/tests/ui/issues/issue-23122-2.stderr
index b8aa587a739..10463ab2c33 100644
--- a/tests/ui/issues/issue-23122-2.stderr
+++ b/tests/ui/issues/issue-23122-2.stderr
@@ -5,7 +5,7 @@ LL |     type Next = <GetNext<T::Next> as Next>::Next;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`)
-note: required for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
+note: required for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
   --> $DIR/issue-23122-2.rs:10:15
    |
 LL | impl<T: Next> Next for GetNext<T> {
diff --git a/tests/ui/layout/issue-84108.stderr b/tests/ui/layout/issue-84108.stderr
index 3a02e73f96b..d6d75851034 100644
--- a/tests/ui/layout/issue-84108.stderr
+++ b/tests/ui/layout/issue-84108.stderr
@@ -29,15 +29,6 @@ LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42);
    = help: the trait `Sized` is not implemented for `[u8]`
    = note: only the last element of a tuple may have a dynamically sized type
 
-error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/issue-84108.rs:14:13
-   |
-LL | static BAZ: ([u8], usize) = ([], 0);
-   |             ^^^^^^^^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `[u8]`
-   = note: only the last element of a tuple may have a dynamically sized type
-
 error[E0308]: mismatched types
   --> $DIR/issue-84108.rs:9:45
    |
@@ -47,6 +38,15 @@ LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42);
    = note: expected slice `[u8]`
               found array `[_; 0]`
 
+error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
+  --> $DIR/issue-84108.rs:14:13
+   |
+LL | static BAZ: ([u8], usize) = ([], 0);
+   |             ^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `[u8]`
+   = note: only the last element of a tuple may have a dynamically sized type
+
 error[E0308]: mismatched types
   --> $DIR/issue-84108.rs:14:30
    |
diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr
index 7541579498e..37ced4cf267 100644
--- a/tests/ui/specialization/min_specialization/issue-79224.stderr
+++ b/tests/ui/specialization/min_specialization/issue-79224.stderr
@@ -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:20:13
+  --> $DIR/issue-79224.rs:20:5
    |
 LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-   |             ^^^^ the trait `Clone` is not implemented for `B`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
    |
    = note: required for `B` to implement `ToOwned`
 help: consider further restricting this bound
@@ -23,10 +23,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:20:5
+  --> $DIR/issue-79224.rs:20:13
    |
 LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
+   |             ^^^^ the trait `Clone` is not implemented for `B`
    |
    = note: required for `B` to implement `ToOwned`
 help: consider further restricting this bound
diff --git a/tests/ui/traits/cycle-cache-err-60010.rs b/tests/ui/traits/cycle-cache-err-60010.rs
index 94e718317e7..94875a5a25a 100644
--- a/tests/ui/traits/cycle-cache-err-60010.rs
+++ b/tests/ui/traits/cycle-cache-err-60010.rs
@@ -29,9 +29,8 @@ struct SalsaStorage {
 }
 
 impl Database for RootDatabase {
-    // This would also be an error if we didn't abort compilation on the error
-    // above.
     type Storage = SalsaStorage;
+    //~^ ERROR overflow
 }
 impl HasQueryGroup for RootDatabase {}
 impl<DB> Query<DB> for ParseQuery
diff --git a/tests/ui/traits/cycle-cache-err-60010.stderr b/tests/ui/traits/cycle-cache-err-60010.stderr
index 4f9615104cb..4f5e3181832 100644
--- a/tests/ui/traits/cycle-cache-err-60010.stderr
+++ b/tests/ui/traits/cycle-cache-err-60010.stderr
@@ -21,7 +21,7 @@ note: required because it appears within the type `RootDatabase`
 LL | struct RootDatabase {
    |        ^^^^^^^^^^^^
 note: required for `RootDatabase` to implement `SourceDatabase`
-  --> $DIR/cycle-cache-err-60010.rs:44:9
+  --> $DIR/cycle-cache-err-60010.rs:43:9
    |
 LL | impl<T> SourceDatabase for T
    |         ^^^^^^^^^^^^^^     ^
@@ -29,7 +29,7 @@ LL | where
 LL |     T: RefUnwindSafe,
    |        ------------- unsatisfied trait bound introduced here
 note: required for `ParseQuery` to implement `Query<RootDatabase>`
-  --> $DIR/cycle-cache-err-60010.rs:37:10
+  --> $DIR/cycle-cache-err-60010.rs:36:10
    |
 LL | impl<DB> Query<DB> for ParseQuery
    |          ^^^^^^^^^     ^^^^^^^^^^
@@ -37,6 +37,59 @@ LL | where
 LL |     DB: SourceDatabase,
    |         -------------- unsatisfied trait bound introduced here
 
-error: aborting due to 1 previous error
+error[E0275]: overflow evaluating the requirement `SalsaStorage: RefUnwindSafe`
+  --> $DIR/cycle-cache-err-60010.rs:32:20
+   |
+LL |     type Storage = SalsaStorage;
+   |                    ^^^^^^^^^^^^
+   |
+note: required because it appears within the type `PhantomData<SalsaStorage>`
+  --> $SRC_DIR/core/src/marker.rs:LL:COL
+note: required because it appears within the type `Unique<SalsaStorage>`
+  --> $SRC_DIR/core/src/ptr/unique.rs:LL:COL
+note: required because it appears within the type `Box<SalsaStorage>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+note: required because it appears within the type `Runtime<RootDatabase>`
+  --> $DIR/cycle-cache-err-60010.rs:23:8
+   |
+LL | struct Runtime<DB: Database> {
+   |        ^^^^^^^
+note: required because it appears within the type `RootDatabase`
+  --> $DIR/cycle-cache-err-60010.rs:20:8
+   |
+LL | struct RootDatabase {
+   |        ^^^^^^^^^^^^
+note: required for `RootDatabase` to implement `SourceDatabase`
+  --> $DIR/cycle-cache-err-60010.rs:43:9
+   |
+LL | impl<T> SourceDatabase for T
+   |         ^^^^^^^^^^^^^^     ^
+LL | where
+LL |     T: RefUnwindSafe,
+   |        ------------- unsatisfied trait bound introduced here
+note: required for `ParseQuery` to implement `Query<RootDatabase>`
+  --> $DIR/cycle-cache-err-60010.rs:36:10
+   |
+LL | impl<DB> Query<DB> for ParseQuery
+   |          ^^^^^^^^^     ^^^^^^^^^^
+LL | where
+LL |     DB: SourceDatabase,
+   |         -------------- unsatisfied trait bound introduced here
+note: required because it appears within the type `SalsaStorage`
+  --> $DIR/cycle-cache-err-60010.rs:26:8
+   |
+LL | struct SalsaStorage {
+   |        ^^^^^^^^^^^^
+note: required by a bound in `Database::Storage`
+  --> $DIR/cycle-cache-err-60010.rs:7:5
+   |
+LL |     type Storage;
+   |     ^^^^^^^^^^^^^ required by this bound in `Database::Storage`
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Storage: ?Sized;
+   |                 ++++++++
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0275`.
diff --git a/tests/ui/traits/next-solver/specialization-transmute.rs b/tests/ui/traits/next-solver/specialization-transmute.rs
index 58b62f52dfd..ff25656a7ff 100644
--- a/tests/ui/traits/next-solver/specialization-transmute.rs
+++ b/tests/ui/traits/next-solver/specialization-transmute.rs
@@ -4,15 +4,15 @@
 //~^ WARN the feature `specialization` is incomplete
 
 trait Default {
-   type Id;
+    type Id;
 
-   fn intu(&self) -> &Self::Id;
+    fn intu(&self) -> &Self::Id;
 }
 
 impl<T> Default for T {
     default type Id = T; //~ ERROR type annotations needed
     // This will be fixed by #111994
-    fn intu(&self) -> &Self::Id { //~ ERROR type annotations needed
+    fn intu(&self) -> &Self::Id {
         self
     }
 }
diff --git a/tests/ui/traits/next-solver/specialization-transmute.stderr b/tests/ui/traits/next-solver/specialization-transmute.stderr
index eaf32a475ac..a5459165587 100644
--- a/tests/ui/traits/next-solver/specialization-transmute.stderr
+++ b/tests/ui/traits/next-solver/specialization-transmute.stderr
@@ -8,19 +8,12 @@ LL | #![feature(specialization)]
    = help: consider using `min_specialization` instead, which is more stable and complete
    = note: `#[warn(incomplete_features)]` on by default
 
-error[E0284]: type annotations needed: cannot satisfy `<T as Default>::Id normalizes-to _`
-  --> $DIR/specialization-transmute.rs:15:23
-   |
-LL |     fn intu(&self) -> &Self::Id {
-   |                       ^^^^^^^^^ cannot satisfy `<T as Default>::Id normalizes-to _`
-
 error[E0282]: type annotations needed
   --> $DIR/specialization-transmute.rs:13:23
    |
 LL |     default type Id = T;
    |                       ^ cannot infer type for associated type `<T as Default>::Id`
 
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
 
-Some errors have detailed explanations: E0282, E0284.
-For more information about an error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
index 88529b370f1..be9b07823ae 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
@@ -1,8 +1,13 @@
 error[E0277]: the trait bound `T: Trait` is not satisfied
-  --> $DIR/generic_underconstrained.rs:9:31
+  --> $DIR/generic_underconstrained.rs:9:51
    |
-LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
-   |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
+LL |   fn underconstrain<T>(_: T) -> Underconstrained<T> {
+   |  ___________________________________________________^
+LL | |
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^ the trait `Trait` is not implemented for `T`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained.rs:6:26
@@ -15,15 +20,10 @@ LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
    |                    +++++++
 
 error[E0277]: the trait bound `T: Trait` is not satisfied
-  --> $DIR/generic_underconstrained.rs:9:51
+  --> $DIR/generic_underconstrained.rs:9:31
    |
-LL |   fn underconstrain<T>(_: T) -> Underconstrained<T> {
-   |  ___________________________________________________^
-LL | |
-LL | |
-LL | |     unimplemented!()
-LL | | }
-   | |_^ the trait `Trait` is not implemented for `T`
+LL | fn underconstrain<T>(_: T) -> Underconstrained<T> {
+   |                               ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained.rs:6:26
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
index b3b9cbca968..15d96191ba9 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
@@ -1,8 +1,13 @@
 error[E0277]: `U` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:8:33
+  --> $DIR/generic_underconstrained2.rs:8:53
    |
-LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
-   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL |   fn underconstrained<U>(_: U) -> Underconstrained<U> {
+   |  _____________________________________________________^
+LL | |
+LL | |
+LL | |     5u32
+LL | | }
+   | |_^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained2.rs:5:26
@@ -15,10 +20,15 @@ LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
    |                      +++++++++++++++++
 
 error[E0277]: `V` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:17:43
+  --> $DIR/generic_underconstrained2.rs:17:64
    |
-LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
-   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL |   fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
+   |  ________________________________________________________________^
+LL | |
+LL | |
+LL | |     5u32
+LL | | }
+   | |_^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained2`
   --> $DIR/generic_underconstrained2.rs:14:27
@@ -31,15 +41,10 @@ LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained
    |                          +++++++++++++++++
 
 error[E0277]: `U` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:8:53
+  --> $DIR/generic_underconstrained2.rs:8:33
    |
-LL |   fn underconstrained<U>(_: U) -> Underconstrained<U> {
-   |  _____________________________________________________^
-LL | |
-LL | |
-LL | |     5u32
-LL | | }
-   | |_^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL | fn underconstrained<U>(_: U) -> Underconstrained<U> {
+   |                                 ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained`
   --> $DIR/generic_underconstrained2.rs:5:26
@@ -52,15 +57,10 @@ LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
    |                      +++++++++++++++++
 
 error[E0277]: `V` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:17:64
+  --> $DIR/generic_underconstrained2.rs:17:43
    |
-LL |   fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
-   |  ________________________________________________________________^
-LL | |
-LL | |
-LL | |     5u32
-LL | | }
-   | |_^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
+   |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained2`
   --> $DIR/generic_underconstrained2.rs:14:27
diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr
index e4054e14abe..e805a71ea6f 100644
--- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr
@@ -17,17 +17,11 @@ LL | const CONST_BUG: Bug<u8, ()> = unsafe { std::mem::transmute(|_: u8| ()) };
    = note: ...which requires computing layout of `Bug<u8, ()>`...
    = note: ...which requires normalizing `Bug<u8, ()>`...
    = note: ...which again requires computing type of `Bug::{opaque#0}`, completing the cycle
-note: cycle used when checking item types in top-level module
-  --> $DIR/issue-53092-2.rs:1:1
-   |
-LL | / #![feature(type_alias_impl_trait)]
-LL | | #![allow(dead_code)]
-LL | |
-LL | | type Bug<T, U> = impl Fn(T) -> U + Copy;
-...  |
-LL | |     CONST_BUG(0);
-LL | | }
-   | |_^
+note: cycle used when checking that `Bug::{opaque#0}` is well-formed
+  --> $DIR/issue-53092-2.rs:4:18
+   |
+LL | type Bug<T, U> = impl Fn(T) -> U + Copy;
+   |                  ^^^^^^^^^^^^^^^^^^^^^^
    = 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[E0277]: the trait bound `U: From<T>` is not satisfied
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
index 4c2cb0eb753..b0e71507a2e 100644
--- a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
+++ b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
@@ -1,3 +1,20 @@
+error[E0053]: method `dummy2` has an incompatible type for trait
+  --> $DIR/ufcs-explicit-self-bad.rs:37:21
+   |
+LL |     fn dummy2(self: &Bar<T>) {}
+   |               ------^^^^^^^
+   |               |     |
+   |               |     expected `&'a Bar<T>`, found `Bar<T>`
+   |               help: change the self-receiver type to match the trait: `&self`
+   |
+note: type in trait
+  --> $DIR/ufcs-explicit-self-bad.rs:31:15
+   |
+LL |     fn dummy2(&self);
+   |               ^^^^^
+   = note: expected signature `fn(&&'a Bar<_>)`
+              found signature `fn(&Bar<_>)`
+
 error[E0307]: invalid `self` parameter type: isize
   --> $DIR/ufcs-explicit-self-bad.rs:8:18
    |
@@ -101,23 +118,6 @@ note: ...does not necessarily outlive the anonymous lifetime defined here
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                      ^^^^^^^
 
-error[E0053]: method `dummy2` has an incompatible type for trait
-  --> $DIR/ufcs-explicit-self-bad.rs:37:21
-   |
-LL |     fn dummy2(self: &Bar<T>) {}
-   |               ------^^^^^^^
-   |               |     |
-   |               |     expected `&'a Bar<T>`, found `Bar<T>`
-   |               help: change the self-receiver type to match the trait: `&self`
-   |
-note: type in trait
-  --> $DIR/ufcs-explicit-self-bad.rs:31:15
-   |
-LL |     fn dummy2(&self);
-   |               ^^^^^
-   = note: expected signature `fn(&&'a Bar<_>)`
-              found signature `fn(&Bar<_>)`
-
 error: aborting due to 8 previous errors
 
 Some errors have detailed explanations: E0053, E0307, E0308.
diff --git a/tests/ui/union/union-unsized.mirunsafeck.stderr b/tests/ui/union/union-unsized.mirunsafeck.stderr
index f8da20413b2..de7e690d80f 100644
--- a/tests/ui/union/union-unsized.mirunsafeck.stderr
+++ b/tests/ui/union/union-unsized.mirunsafeck.stderr
@@ -16,6 +16,18 @@ 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/union-unsized.rs:5: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:14:8
    |
@@ -35,18 +47,6 @@ 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:5: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[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
   --> $DIR/union-unsized.rs:14:5
    |
 LL |     b: str,
diff --git a/tests/ui/union/union-unsized.thirunsafeck.stderr b/tests/ui/union/union-unsized.thirunsafeck.stderr
index f8da20413b2..de7e690d80f 100644
--- a/tests/ui/union/union-unsized.thirunsafeck.stderr
+++ b/tests/ui/union/union-unsized.thirunsafeck.stderr
@@ -16,6 +16,18 @@ 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/union-unsized.rs:5: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:14:8
    |
@@ -35,18 +47,6 @@ 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:5: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[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
   --> $DIR/union-unsized.rs:14:5
    |
 LL |     b: str,
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.stderr b/tests/ui/wf/hir-wf-check-erase-regions.stderr
index eb0a8f8f69a..4b696dc1d1d 100644
--- a/tests/ui/wf/hir-wf-check-erase-regions.stderr
+++ b/tests/ui/wf/hir-wf-check-erase-regions.stderr
@@ -6,15 +6,15 @@ LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
    |
    = help: the trait `Iterator` is not implemented for `&'a T`
    = help: the trait `Iterator` is implemented for `&mut I`
-   = note: required for `&'a T` to implement `IntoIterator`
-note: required by a bound in `Flatten`
-  --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
+   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
+note: required by a bound in `std::iter::IntoIterator::IntoIter`
+  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:11:27
+  --> $DIR/hir-wf-check-erase-regions.rs:7:21
    |
-LL |     fn into_iter(self) -> Self::IntoIter {
-   |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
+LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `&'a T`
    = help: the trait `Iterator` is implemented for `&mut I`
@@ -23,16 +23,16 @@ note: required by a bound in `Flatten`
   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:7:21
+  --> $DIR/hir-wf-check-erase-regions.rs:11:27
    |
-LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
-   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
+LL |     fn into_iter(self) -> Self::IntoIter {
+   |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `&'a T`
    = help: the trait `Iterator` is implemented for `&mut I`
-   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
-note: required by a bound in `std::iter::IntoIterator::IntoIter`
-  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
+   = note: required for `&'a T` to implement `IntoIterator`
+note: required by a bound in `Flatten`
+  --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error: aborting due to 3 previous errors