]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/impl-trait/recursive-type-alias-impl-trait-declaration-too-subtle.stderr
Auto merge of #95604 - nbdd0121:used2, r=petrochenkov
[rust.git] / src / test / ui / impl-trait / recursive-type-alias-impl-trait-declaration-too-subtle.stderr
index 19d5cdb9d0ac6f0f0363e1a20318c9e7a1a4b106..6cd63dcf81c7fcbb2e3531ed7da057faa13c1124 100644 (file)
@@ -1,25 +1,14 @@
-error: unconstrained opaque type
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:4:16
+error: cannot implement trait on type alias impl trait
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:20:21
    |
-LL |     type Foo = impl PartialEq<(Foo, i32)>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     impl PartialEq<(Foo, i32)> for Bar {
+   |                     ^^^
    |
-   = note: `Foo` must be used in combination with a concrete type within the same module
-
-error: unconstrained opaque type
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:17:16
+note: type alias impl trait defined here
+  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:16:16
    |
 LL |     type Foo = impl PartialEq<(Foo, i32)>;
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `Foo` must be used in combination with a concrete type within the same module
-
-error[E0276]: impl has stricter requirements than trait
-  --> $DIR/recursive-type-alias-impl-trait-declaration-too-subtle.rs:23:9
-   |
-LL |         fn eq(&self, _other: &(Bar, i32)) -> bool {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `b::Bar: PartialEq<(b::Bar, i32)>`
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0276`.