]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/associated-types/associated-types-eq-3.stderr
Remove E0308 note when primary label has all info
[rust.git] / src / test / ui / associated-types / associated-types-eq-3.stderr
index 0f2bc84aa1c592d5563d94bb4e293cc5552a9b97..060e2c8a2ccc1905e20de7763bf2155129974037 100644 (file)
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: Bar = x.boo();
    |                  ^^^^^^^ expected struct `Bar`, found associated type
    |
-   = note: expected type `Bar`
-              found type `<I as Foo>::A`
+   = note:       expected struct `Bar`
+           found associated type `<I as Foo>::A`
    = note: consider constraining the associated type `<I as Foo>::A` to `Bar`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -17,9 +17,6 @@ LL | fn foo1<I: Foo<A=Bar>>(x: I) {
 ...
 LL |     foo1(a);
    |     ^^^^ expected struct `Bar`, found usize
-   |
-   = note: expected type `Bar`
-              found type `usize`
 
 error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
   --> $DIR/associated-types-eq-3.rs:41:9
@@ -27,8 +24,6 @@ error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
 LL |     baz(&a);
    |         ^^ expected struct `Bar`, found usize
    |
-   = note: expected type `Bar`
-              found type `usize`
    = note: required for the cast to the object type `dyn Foo<A = Bar>`
 
 error: aborting due to 3 previous errors