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