]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr
Rollup merge of #76468 - SNCPlay42:lifetime-names, r=Mark-Simulacrum
[rust.git] / src / test / ui / associated-types / associated-types-multiple-types-one-trait.stderr
index 4e481411b4d2ecda158f2acffd7c7229dd82d612..b8f20d00ff8e45bee6d94ab34a55148a8541c0e1 100644 (file)
@@ -9,8 +9,10 @@ LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
    |
    = note:         expected type `i32`
            found associated type `<T as Foo>::Y`
-   = note: consider constraining the associated type `<T as Foo>::Y` to `i32`
-   = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
+help: consider constraining the associated type `<T as Foo>::Y` to `i32`
+   |
+LL | fn have_x_want_y<T:Foo<X=u32, Y = i32>>(t: &T)
+   |                             ^^^^^^^^^
 
 error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
   --> $DIR/associated-types-multiple-types-one-trait.rs:18:5
@@ -23,8 +25,10 @@ LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
    |
    = note:         expected type `u32`
            found associated type `<T as Foo>::X`
-   = note: consider constraining the associated type `<T as Foo>::X` to `u32`
-   = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
+help: consider constraining the associated type `<T as Foo>::X` to `u32`
+   |
+LL | fn have_y_want_x<T:Foo<Y=i32, X = u32>>(t: &T)
+   |                             ^^^^^^^^^
 
 error: aborting due to 2 previous errors