@@ -2,28 +2,28 @@ error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
2
2
--> $DIR/associated-types-multiple-types-one-trait.rs:13:5
3
3
|
4
4
LL | want_y(t);
5
- | ^^^^^^ expected associated type , found i32
5
+ | ^^^^^^ expected i32 , found associated type
6
6
...
7
7
LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
8
8
| ------ ----- required by this bound in `want_y`
9
9
|
10
- = note: expected type `<T as Foo>::Y `
11
- found type `i32 `
12
- = note: consider constraining the associated type `<T as Foo>::Y` to `i32` or calling a method that returns `<T as Foo>::Y`
10
+ = note: expected type `i32 `
11
+ found type `<T as Foo>::Y `
12
+ = note: consider constraining the associated type `<T as Foo>::Y` to `i32`
13
13
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
14
14
15
15
error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
16
16
--> $DIR/associated-types-multiple-types-one-trait.rs:18:5
17
17
|
18
18
LL | want_x(t);
19
- | ^^^^^^ expected associated type , found u32
19
+ | ^^^^^^ expected u32 , found associated type
20
20
...
21
21
LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
22
22
| ------ ----- required by this bound in `want_x`
23
23
|
24
- = note: expected type `<T as Foo>::X `
25
- found type `u32 `
26
- = note: consider constraining the associated type `<T as Foo>::X` to `u32` or calling a method that returns `<T as Foo>::X`
24
+ = note: expected type `u32 `
25
+ found type `<T as Foo>::X `
26
+ = note: consider constraining the associated type `<T as Foo>::X` to `u32`
27
27
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
28
28
29
29
error: aborting due to 2 previous errors
0 commit comments