]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0271]: type mismatch resolving `<T as Foo>::Y == i32` |
0731742a | 2 | --> $DIR/associated-types-multiple-types-one-trait.rs:13:5 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | want_y(t); |
60c5eb7d | 5 | | ^^^^^^ expected `i32`, found associated type |
e1599b0c XL |
6 | ... |
7 | LL | fn want_y<T:Foo<Y=i32>>(t: &T) { } | |
ba9703b0 | 8 | | ----- required by this bound in `want_y` |
b7449926 | 9 | | |
60c5eb7d XL |
10 | = note: expected type `i32` |
11 | found associated type `<T as Foo>::Y` | |
e74abb32 | 12 | = note: consider constraining the associated type `<T as Foo>::Y` to `i32` |
e1599b0c | 13 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
b7449926 XL |
14 | |
15 | error[E0271]: type mismatch resolving `<T as Foo>::X == u32` | |
0731742a | 16 | --> $DIR/associated-types-multiple-types-one-trait.rs:18:5 |
b7449926 | 17 | | |
532ac7d7 | 18 | LL | want_x(t); |
60c5eb7d | 19 | | ^^^^^^ expected `u32`, found associated type |
e1599b0c XL |
20 | ... |
21 | LL | fn want_x<T:Foo<X=u32>>(t: &T) { } | |
ba9703b0 | 22 | | ----- required by this bound in `want_x` |
b7449926 | 23 | | |
60c5eb7d XL |
24 | = note: expected type `u32` |
25 | found associated type `<T as Foo>::X` | |
e74abb32 | 26 | = note: consider constraining the associated type `<T as Foo>::X` to `u32` |
e1599b0c | 27 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
b7449926 XL |
28 | |
29 | error: aborting due to 2 previous errors | |
30 | ||
31 | For more information about this error, try `rustc --explain E0271`. |