about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/associated-types/defaults-suitability.current.stderr (renamed from tests/ui/associated-types/defaults-suitability.stderr)34
-rw-r--r--tests/ui/associated-types/defaults-suitability.next.stderr142
-rw-r--r--tests/ui/associated-types/defaults-suitability.rs3
-rw-r--r--tests/ui/associated-types/issue-54108.current.stderr (renamed from tests/ui/associated-types/issue-54108.stderr)4
-rw-r--r--tests/ui/associated-types/issue-54108.next.stderr33
-rw-r--r--tests/ui/associated-types/issue-54108.rs5
-rw-r--r--tests/ui/associated-types/issue-63593.current.stderr (renamed from tests/ui/associated-types/issue-63593.stderr)4
-rw-r--r--tests/ui/associated-types/issue-63593.next.stderr19
-rw-r--r--tests/ui/associated-types/issue-63593.rs4
-rw-r--r--tests/ui/generic-associated-types/issue-74816.current.stderr (renamed from tests/ui/generic-associated-types/issue-74816.stderr)8
-rw-r--r--tests/ui/generic-associated-types/issue-74816.next.stderr35
-rw-r--r--tests/ui/generic-associated-types/issue-74816.rs4
-rw-r--r--tests/ui/generic-associated-types/issue-74824.current.stderr (renamed from tests/ui/generic-associated-types/issue-74824.stderr)8
-rw-r--r--tests/ui/generic-associated-types/issue-74824.next.stderr33
-rw-r--r--tests/ui/generic-associated-types/issue-74824.rs4
15 files changed, 311 insertions, 29 deletions
diff --git a/tests/ui/associated-types/defaults-suitability.stderr b/tests/ui/associated-types/defaults-suitability.current.stderr
index 82b35a48637..3cdeaa93a34 100644
--- a/tests/ui/associated-types/defaults-suitability.stderr
+++ b/tests/ui/associated-types/defaults-suitability.current.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:13:22
+  --> $DIR/defaults-suitability.rs:16:22
    |
 LL |     type Ty: Clone = NotClone;
    |                      ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
    |
 note: required by a bound in `Tr::Ty`
-  --> $DIR/defaults-suitability.rs:13:14
+  --> $DIR/defaults-suitability.rs:16:14
    |
 LL |     type Ty: Clone = NotClone;
    |              ^^^^^ required by this bound in `Tr::Ty`
@@ -16,13 +16,13 @@ LL | struct NotClone;
    |
 
 error[E0277]: the trait bound `NotClone: Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:22:15
+  --> $DIR/defaults-suitability.rs:25:15
    |
 LL |     type Ty = NotClone;
    |               ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
    |
 note: required by a bound in `Tr2::Ty`
-  --> $DIR/defaults-suitability.rs:20:15
+  --> $DIR/defaults-suitability.rs:23:15
    |
 LL |     Self::Ty: Clone,
    |               ^^^^^ required by this bound in `Tr2::Ty`
@@ -36,14 +36,14 @@ LL | struct NotClone;
    |
 
 error[E0277]: the trait bound `T: Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:28:23
+  --> $DIR/defaults-suitability.rs:31:23
    |
 LL |     type Bar: Clone = Vec<T>;
    |                       ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `Vec<T>: Clone`
    |
    = note: required for `Vec<T>` to implement `Clone`
 note: required by a bound in `Foo::Bar`
-  --> $DIR/defaults-suitability.rs:28:15
+  --> $DIR/defaults-suitability.rs:31:15
    |
 LL |     type Bar: Clone = Vec<T>;
    |               ^^^^^ required by this bound in `Foo::Bar`
@@ -53,30 +53,30 @@ LL | trait Foo<T: std::clone::Clone> {
    |            +++++++++++++++++++
 
 error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
-  --> $DIR/defaults-suitability.rs:34:29
+  --> $DIR/defaults-suitability.rs:37:29
    |
 LL |     type Assoc: Foo<Self> = ();
    |                             ^^ the trait `Foo<Self>` is not implemented for `()`
    |
 help: this trait has no implementations, consider adding one
-  --> $DIR/defaults-suitability.rs:27:1
+  --> $DIR/defaults-suitability.rs:30:1
    |
 LL | trait Foo<T> {
    | ^^^^^^^^^^^^
 note: required by a bound in `Bar::Assoc`
-  --> $DIR/defaults-suitability.rs:34:17
+  --> $DIR/defaults-suitability.rs:37:17
    |
 LL |     type Assoc: Foo<Self> = ();
    |                 ^^^^^^^^^ required by this bound in `Bar::Assoc`
 
 error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
-  --> $DIR/defaults-suitability.rs:56:18
+  --> $DIR/defaults-suitability.rs:59:18
    |
 LL |     type Assoc = NotClone;
    |                  ^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
    |
 note: required by a bound in `D::Assoc`
-  --> $DIR/defaults-suitability.rs:53:18
+  --> $DIR/defaults-suitability.rs:56:18
    |
 LL |     Self::Assoc: IsU8<Self::Assoc>,
    |                  ^^^^^^^^^^^^^^^^^ required by this bound in `D::Assoc`
@@ -85,14 +85,14 @@ LL |     type Assoc = NotClone;
    |          ----- required by a bound in this associated type
 
 error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:65:23
+  --> $DIR/defaults-suitability.rs:68:23
    |
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |                       ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`, which is required by `Vec<<Self as Foo2<T>>::Baz>: Clone`
    |
    = note: required for `Vec<<Self as Foo2<T>>::Baz>` to implement `Clone`
 note: required by a bound in `Foo2::Bar`
-  --> $DIR/defaults-suitability.rs:65:15
+  --> $DIR/defaults-suitability.rs:68:15
    |
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |               ^^^^^ required by this bound in `Foo2::Bar`
@@ -102,14 +102,14 @@ LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
    |               +++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:74:23
+  --> $DIR/defaults-suitability.rs:77:23
    |
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |                       ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`, which is required by `Vec<<Self as Foo25<T>>::Baz>: Clone`
    |
    = note: required for `Vec<<Self as Foo25<T>>::Baz>` to implement `Clone`
 note: required by a bound in `Foo25::Bar`
-  --> $DIR/defaults-suitability.rs:74:15
+  --> $DIR/defaults-suitability.rs:77:15
    |
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |               ^^^^^ required by this bound in `Foo25::Bar`
@@ -119,13 +119,13 @@ LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
    |                       ++++++++++++++++++++++++++++++++++++
 
 error[E0277]: the trait bound `T: Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:87:16
+  --> $DIR/defaults-suitability.rs:90:16
    |
 LL |     type Baz = T;
    |                ^ the trait `Clone` is not implemented for `T`
    |
 note: required by a bound in `Foo3::Baz`
-  --> $DIR/defaults-suitability.rs:84:16
+  --> $DIR/defaults-suitability.rs:87:16
    |
 LL |     Self::Baz: Clone,
    |                ^^^^^ required by this bound in `Foo3::Baz`
diff --git a/tests/ui/associated-types/defaults-suitability.next.stderr b/tests/ui/associated-types/defaults-suitability.next.stderr
new file mode 100644
index 00000000000..3cdeaa93a34
--- /dev/null
+++ b/tests/ui/associated-types/defaults-suitability.next.stderr
@@ -0,0 +1,142 @@
+error[E0277]: the trait bound `NotClone: Clone` is not satisfied
+  --> $DIR/defaults-suitability.rs:16:22
+   |
+LL |     type Ty: Clone = NotClone;
+   |                      ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
+   |
+note: required by a bound in `Tr::Ty`
+  --> $DIR/defaults-suitability.rs:16:14
+   |
+LL |     type Ty: Clone = NotClone;
+   |              ^^^^^ required by this bound in `Tr::Ty`
+help: consider annotating `NotClone` with `#[derive(Clone)]`
+   |
+LL + #[derive(Clone)]
+LL | struct NotClone;
+   |
+
+error[E0277]: the trait bound `NotClone: Clone` is not satisfied
+  --> $DIR/defaults-suitability.rs:25:15
+   |
+LL |     type Ty = NotClone;
+   |               ^^^^^^^^ the trait `Clone` is not implemented for `NotClone`
+   |
+note: required by a bound in `Tr2::Ty`
+  --> $DIR/defaults-suitability.rs:23:15
+   |
+LL |     Self::Ty: Clone,
+   |               ^^^^^ required by this bound in `Tr2::Ty`
+LL | {
+LL |     type Ty = NotClone;
+   |          -- required by a bound in this associated type
+help: consider annotating `NotClone` with `#[derive(Clone)]`
+   |
+LL + #[derive(Clone)]
+LL | struct NotClone;
+   |
+
+error[E0277]: the trait bound `T: Clone` is not satisfied
+  --> $DIR/defaults-suitability.rs:31:23
+   |
+LL |     type Bar: Clone = Vec<T>;
+   |                       ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `Vec<T>: Clone`
+   |
+   = note: required for `Vec<T>` to implement `Clone`
+note: required by a bound in `Foo::Bar`
+  --> $DIR/defaults-suitability.rs:31:15
+   |
+LL |     type Bar: Clone = Vec<T>;
+   |               ^^^^^ required by this bound in `Foo::Bar`
+help: consider restricting type parameter `T`
+   |
+LL | trait Foo<T: std::clone::Clone> {
+   |            +++++++++++++++++++
+
+error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
+  --> $DIR/defaults-suitability.rs:37:29
+   |
+LL |     type Assoc: Foo<Self> = ();
+   |                             ^^ the trait `Foo<Self>` is not implemented for `()`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/defaults-suitability.rs:30:1
+   |
+LL | trait Foo<T> {
+   | ^^^^^^^^^^^^
+note: required by a bound in `Bar::Assoc`
+  --> $DIR/defaults-suitability.rs:37:17
+   |
+LL |     type Assoc: Foo<Self> = ();
+   |                 ^^^^^^^^^ required by this bound in `Bar::Assoc`
+
+error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
+  --> $DIR/defaults-suitability.rs:59:18
+   |
+LL |     type Assoc = NotClone;
+   |                  ^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
+   |
+note: required by a bound in `D::Assoc`
+  --> $DIR/defaults-suitability.rs:56:18
+   |
+LL |     Self::Assoc: IsU8<Self::Assoc>,
+   |                  ^^^^^^^^^^^^^^^^^ required by this bound in `D::Assoc`
+...
+LL |     type Assoc = NotClone;
+   |          ----- required by a bound in this associated type
+
+error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
+  --> $DIR/defaults-suitability.rs:68:23
+   |
+LL |     type Bar: Clone = Vec<Self::Baz>;
+   |                       ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`, which is required by `Vec<<Self as Foo2<T>>::Baz>: Clone`
+   |
+   = note: required for `Vec<<Self as Foo2<T>>::Baz>` to implement `Clone`
+note: required by a bound in `Foo2::Bar`
+  --> $DIR/defaults-suitability.rs:68:15
+   |
+LL |     type Bar: Clone = Vec<Self::Baz>;
+   |               ^^^^^ required by this bound in `Foo2::Bar`
+help: consider further restricting the associated type
+   |
+LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
+   |               +++++++++++++++++++++++++++++++++++
+
+error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
+  --> $DIR/defaults-suitability.rs:77:23
+   |
+LL |     type Bar: Clone = Vec<Self::Baz>;
+   |                       ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`, which is required by `Vec<<Self as Foo25<T>>::Baz>: Clone`
+   |
+   = note: required for `Vec<<Self as Foo25<T>>::Baz>` to implement `Clone`
+note: required by a bound in `Foo25::Bar`
+  --> $DIR/defaults-suitability.rs:77:15
+   |
+LL |     type Bar: Clone = Vec<Self::Baz>;
+   |               ^^^^^ required by this bound in `Foo25::Bar`
+help: consider further restricting the associated type
+   |
+LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
+   |                       ++++++++++++++++++++++++++++++++++++
+
+error[E0277]: the trait bound `T: Clone` is not satisfied
+  --> $DIR/defaults-suitability.rs:90:16
+   |
+LL |     type Baz = T;
+   |                ^ the trait `Clone` is not implemented for `T`
+   |
+note: required by a bound in `Foo3::Baz`
+  --> $DIR/defaults-suitability.rs:87:16
+   |
+LL |     Self::Baz: Clone,
+   |                ^^^^^ required by this bound in `Foo3::Baz`
+...
+LL |     type Baz = T;
+   |          --- required by a bound in this associated type
+help: consider further restricting type parameter `T`
+   |
+LL |     Self::Baz: Clone, T: std::clone::Clone
+   |                     ~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 8 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/defaults-suitability.rs b/tests/ui/associated-types/defaults-suitability.rs
index 504c957d987..bab2f004ac7 100644
--- a/tests/ui/associated-types/defaults-suitability.rs
+++ b/tests/ui/associated-types/defaults-suitability.rs
@@ -1,3 +1,6 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
 //! Checks that associated type defaults are properly validated.
 //!
 //! This means:
diff --git a/tests/ui/associated-types/issue-54108.stderr b/tests/ui/associated-types/issue-54108.current.stderr
index f300208fcc8..8850b4548e3 100644
--- a/tests/ui/associated-types/issue-54108.stderr
+++ b/tests/ui/associated-types/issue-54108.current.stderr
@@ -1,12 +1,12 @@
 error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
-  --> $DIR/issue-54108.rs:19:17
+  --> $DIR/issue-54108.rs:23:17
    |
 LL |     type Size = <Self as SubEncoder>::ActualSize;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `<T as SubEncoder>::ActualSize + <T as SubEncoder>::ActualSize`
    |
    = help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
 note: required by a bound in `Encoder::Size`
-  --> $DIR/issue-54108.rs:4:16
+  --> $DIR/issue-54108.rs:8:16
    |
 LL |     type Size: Add<Output = Self::Size>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
diff --git a/tests/ui/associated-types/issue-54108.next.stderr b/tests/ui/associated-types/issue-54108.next.stderr
new file mode 100644
index 00000000000..9f6f00e7ca8
--- /dev/null
+++ b/tests/ui/associated-types/issue-54108.next.stderr
@@ -0,0 +1,33 @@
+error[E0271]: type mismatch resolving `<<T as SubEncoder>::ActualSize as Add>::Output == <T as SubEncoder>::ActualSize`
+  --> $DIR/issue-54108.rs:23:17
+   |
+LL |     type Size = <Self as SubEncoder>::ActualSize;
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
+   |
+note: required by a bound in `Encoder::Size`
+  --> $DIR/issue-54108.rs:8:20
+   |
+LL |     type Size: Add<Output = Self::Size>;
+   |                    ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
+
+error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
+  --> $DIR/issue-54108.rs:23:17
+   |
+LL |     type Size = <Self as SubEncoder>::ActualSize;
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `<T as SubEncoder>::ActualSize + <T as SubEncoder>::ActualSize`
+   |
+   = help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
+note: required by a bound in `Encoder::Size`
+  --> $DIR/issue-54108.rs:8:16
+   |
+LL |     type Size: Add<Output = Self::Size>;
+   |                ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
+help: consider further restricting the associated type
+   |
+LL |     T: SubEncoder, <T as SubEncoder>::ActualSize: Add
+   |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0271, E0277.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-types/issue-54108.rs b/tests/ui/associated-types/issue-54108.rs
index 87f67ce4b52..7c652fd7f49 100644
--- a/tests/ui/associated-types/issue-54108.rs
+++ b/tests/ui/associated-types/issue-54108.rs
@@ -1,3 +1,7 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
 use std::ops::Add;
 
 pub trait Encoder {
@@ -18,6 +22,7 @@ where
 {
     type Size = <Self as SubEncoder>::ActualSize;
     //~^ ERROR: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
+    //[next]~| ERROR type mismatch resolving `<<T as SubEncoder>::ActualSize as Add>::Output == <T as SubEncoder>::ActualSize`
 
     fn foo(&self) -> Self::Size {
         self.bar() + self.bar()
diff --git a/tests/ui/associated-types/issue-63593.stderr b/tests/ui/associated-types/issue-63593.current.stderr
index 67151431a67..76fdefeb4e5 100644
--- a/tests/ui/associated-types/issue-63593.stderr
+++ b/tests/ui/associated-types/issue-63593.current.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/issue-63593.rs:9:17
+  --> $DIR/issue-63593.rs:13:17
    |
 LL |     type This = Self;
    |                 ^^^^ doesn't have a size known at compile-time
    |
 note: required by a bound in `MyTrait::This`
-  --> $DIR/issue-63593.rs:9:5
+  --> $DIR/issue-63593.rs:13:5
    |
 LL |     type This = Self;
    |     ^^^^^^^^^^^^^^^^^ required by this bound in `MyTrait::This`
diff --git a/tests/ui/associated-types/issue-63593.next.stderr b/tests/ui/associated-types/issue-63593.next.stderr
new file mode 100644
index 00000000000..76fdefeb4e5
--- /dev/null
+++ b/tests/ui/associated-types/issue-63593.next.stderr
@@ -0,0 +1,19 @@
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-63593.rs:13:17
+   |
+LL |     type This = Self;
+   |                 ^^^^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `MyTrait::This`
+  --> $DIR/issue-63593.rs:13:5
+   |
+LL |     type This = Self;
+   |     ^^^^^^^^^^^^^^^^^ required by this bound in `MyTrait::This`
+help: consider further restricting `Self`
+   |
+LL | trait MyTrait: Sized {
+   |              +++++++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/issue-63593.rs b/tests/ui/associated-types/issue-63593.rs
index 8dbc24c0673..dea81f729b4 100644
--- a/tests/ui/associated-types/issue-63593.rs
+++ b/tests/ui/associated-types/issue-63593.rs
@@ -1,3 +1,7 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
 #![feature(associated_type_defaults)]
 
 // Tests that `Self` is not assumed to implement `Sized` when used as an
diff --git a/tests/ui/generic-associated-types/issue-74816.stderr b/tests/ui/generic-associated-types/issue-74816.current.stderr
index 45018e6976c..335486c6538 100644
--- a/tests/ui/generic-associated-types/issue-74816.stderr
+++ b/tests/ui/generic-associated-types/issue-74816.current.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the trait bound `Self: Trait1` is not satisfied
-  --> $DIR/issue-74816.rs:8:31
+  --> $DIR/issue-74816.rs:12:31
    |
 LL |     type Associated: Trait1 = Self;
    |                               ^^^^ the trait `Trait1` is not implemented for `Self`
    |
 note: required by a bound in `Trait2::Associated`
-  --> $DIR/issue-74816.rs:8:22
+  --> $DIR/issue-74816.rs:12:22
    |
 LL |     type Associated: Trait1 = Self;
    |                      ^^^^^^ required by this bound in `Trait2::Associated`
@@ -15,13 +15,13 @@ LL | trait Trait2: Trait1 {
    |             ++++++++
 
 error[E0277]: the size for values of type `Self` cannot be known at compilation time
-  --> $DIR/issue-74816.rs:8:31
+  --> $DIR/issue-74816.rs:12:31
    |
 LL |     type Associated: Trait1 = Self;
    |                               ^^^^ doesn't have a size known at compile-time
    |
 note: required by a bound in `Trait2::Associated`
-  --> $DIR/issue-74816.rs:8:5
+  --> $DIR/issue-74816.rs:12:5
    |
 LL |     type Associated: Trait1 = Self;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait2::Associated`
diff --git a/tests/ui/generic-associated-types/issue-74816.next.stderr b/tests/ui/generic-associated-types/issue-74816.next.stderr
new file mode 100644
index 00000000000..335486c6538
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-74816.next.stderr
@@ -0,0 +1,35 @@
+error[E0277]: the trait bound `Self: Trait1` is not satisfied
+  --> $DIR/issue-74816.rs:12:31
+   |
+LL |     type Associated: Trait1 = Self;
+   |                               ^^^^ the trait `Trait1` is not implemented for `Self`
+   |
+note: required by a bound in `Trait2::Associated`
+  --> $DIR/issue-74816.rs:12:22
+   |
+LL |     type Associated: Trait1 = Self;
+   |                      ^^^^^^ required by this bound in `Trait2::Associated`
+help: consider further restricting `Self`
+   |
+LL | trait Trait2: Trait1 {
+   |             ++++++++
+
+error[E0277]: the size for values of type `Self` cannot be known at compilation time
+  --> $DIR/issue-74816.rs:12:31
+   |
+LL |     type Associated: Trait1 = Self;
+   |                               ^^^^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `Trait2::Associated`
+  --> $DIR/issue-74816.rs:12:5
+   |
+LL |     type Associated: Trait1 = Self;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait2::Associated`
+help: consider further restricting `Self`
+   |
+LL | trait Trait2: Sized {
+   |             +++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-74816.rs b/tests/ui/generic-associated-types/issue-74816.rs
index 344afb87f99..e2f4ddc7485 100644
--- a/tests/ui/generic-associated-types/issue-74816.rs
+++ b/tests/ui/generic-associated-types/issue-74816.rs
@@ -1,3 +1,7 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
 #![feature(associated_type_defaults)]
 
 trait Trait1 {
diff --git a/tests/ui/generic-associated-types/issue-74824.stderr b/tests/ui/generic-associated-types/issue-74824.current.stderr
index 942d9583be1..b06c7f127ac 100644
--- a/tests/ui/generic-associated-types/issue-74824.stderr
+++ b/tests/ui/generic-associated-types/issue-74824.current.stderr
@@ -1,17 +1,17 @@
 error[E0277]: the trait bound `Box<T>: Copy` is not satisfied
-  --> $DIR/issue-74824.rs:6:26
+  --> $DIR/issue-74824.rs:10:26
    |
 LL |     type Copy<T>: Copy = Box<T>;
    |                          ^^^^^^ the trait `Copy` is not implemented for `Box<T>`
    |
 note: required by a bound in `UnsafeCopy::Copy`
-  --> $DIR/issue-74824.rs:6:19
+  --> $DIR/issue-74824.rs:10:19
    |
 LL |     type Copy<T>: Copy = Box<T>;
    |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
 
 error[E0277]: the trait bound `T: Clone` is not satisfied
-  --> $DIR/issue-74824.rs:6:26
+  --> $DIR/issue-74824.rs:10:26
    |
 LL |     type Copy<T>: Copy = Box<T>;
    |                          ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `<Self as UnsafeCopy>::Copy<T>: Copy`
@@ -19,7 +19,7 @@ LL |     type Copy<T>: Copy = Box<T>;
    = note: required for `Box<T>` to implement `Clone`
    = note: required for `<Self as UnsafeCopy>::Copy<T>` to implement `Copy`
 note: required by a bound in `UnsafeCopy::Copy`
-  --> $DIR/issue-74824.rs:6:19
+  --> $DIR/issue-74824.rs:10:19
    |
 LL |     type Copy<T>: Copy = Box<T>;
    |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
diff --git a/tests/ui/generic-associated-types/issue-74824.next.stderr b/tests/ui/generic-associated-types/issue-74824.next.stderr
new file mode 100644
index 00000000000..b06c7f127ac
--- /dev/null
+++ b/tests/ui/generic-associated-types/issue-74824.next.stderr
@@ -0,0 +1,33 @@
+error[E0277]: the trait bound `Box<T>: Copy` is not satisfied
+  --> $DIR/issue-74824.rs:10:26
+   |
+LL |     type Copy<T>: Copy = Box<T>;
+   |                          ^^^^^^ the trait `Copy` is not implemented for `Box<T>`
+   |
+note: required by a bound in `UnsafeCopy::Copy`
+  --> $DIR/issue-74824.rs:10:19
+   |
+LL |     type Copy<T>: Copy = Box<T>;
+   |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
+
+error[E0277]: the trait bound `T: Clone` is not satisfied
+  --> $DIR/issue-74824.rs:10:26
+   |
+LL |     type Copy<T>: Copy = Box<T>;
+   |                          ^^^^^^ the trait `Clone` is not implemented for `T`, which is required by `<Self as UnsafeCopy>::Copy<T>: Copy`
+   |
+   = note: required for `Box<T>` to implement `Clone`
+   = note: required for `<Self as UnsafeCopy>::Copy<T>` to implement `Copy`
+note: required by a bound in `UnsafeCopy::Copy`
+  --> $DIR/issue-74824.rs:10:19
+   |
+LL |     type Copy<T>: Copy = Box<T>;
+   |                   ^^^^ required by this bound in `UnsafeCopy::Copy`
+help: consider restricting type parameter `T`
+   |
+LL |     type Copy<T: std::clone::Clone>: Copy = Box<T>;
+   |                +++++++++++++++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generic-associated-types/issue-74824.rs b/tests/ui/generic-associated-types/issue-74824.rs
index 10c45d13364..7cfb862abed 100644
--- a/tests/ui/generic-associated-types/issue-74824.rs
+++ b/tests/ui/generic-associated-types/issue-74824.rs
@@ -1,3 +1,7 @@
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
 #![feature(associated_type_defaults)]
 
 use std::ops::Deref;