]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/associated-types-multiple-types-one-trait.stderr
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / ui / associated-types / associated-types-multiple-types-one-trait.stderr
1 error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
2   --> $DIR/associated-types-multiple-types-one-trait.rs:13:12
3    |
4 LL |     want_y(t);
5    |     ------ ^ expected `i32`, found associated type
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = note:         expected type `i32`
10            found associated type `<T as Foo>::Y`
11 note: required by a bound in `want_y`
12   --> $DIR/associated-types-multiple-types-one-trait.rs:44:17
13    |
14 LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
15    |                 ^^^^^ required by this bound in `want_y`
16 help: consider constraining the associated type `<T as Foo>::Y` to `i32`
17    |
18 LL | fn have_x_want_y<T:Foo<X=u32, Y = i32>>(t: &T)
19    |                             +++++++++
20
21 error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
22   --> $DIR/associated-types-multiple-types-one-trait.rs:18:12
23    |
24 LL |     want_x(t);
25    |     ------ ^ expected `u32`, found associated type
26    |     |
27    |     required by a bound introduced by this call
28    |
29    = note:         expected type `u32`
30            found associated type `<T as Foo>::X`
31 note: required by a bound in `want_x`
32   --> $DIR/associated-types-multiple-types-one-trait.rs:42:17
33    |
34 LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
35    |                 ^^^^^ required by this bound in `want_x`
36 help: consider constraining the associated type `<T as Foo>::X` to `u32`
37    |
38 LL | fn have_y_want_x<T:Foo<Y=i32, X = u32>>(t: &T)
39    |                             +++++++++
40
41 error: aborting due to 2 previous errors
42
43 For more information about this error, try `rustc --explain E0271`.