]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/associated-types-eq-3.rs:23:18 |
b7449926 XL |
3 | | |
4 | LL | let _: Bar = x.boo(); | |
60c5eb7d XL |
5 | | --- ^^^^^^^ expected struct `Bar`, found associated type |
6 | | | | |
7 | | expected due to this | |
b7449926 | 8 | | |
60c5eb7d XL |
9 | = note: expected struct `Bar` |
10 | found associated type `<I as Foo>::A` | |
e1599b0c XL |
11 | = note: consider constraining the associated type `<I as Foo>::A` to `Bar` |
12 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html | |
b7449926 XL |
13 | |
14 | error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar` | |
0731742a | 15 | --> $DIR/associated-types-eq-3.rs:38:5 |
b7449926 | 16 | | |
e1599b0c XL |
17 | LL | fn foo1<I: Foo<A=Bar>>(x: I) { |
18 | | ---- ----- required by this bound in `foo1` | |
19 | ... | |
b7449926 | 20 | LL | foo1(a); |
60c5eb7d | 21 | | ^^^^ expected struct `Bar`, found `usize` |
b7449926 XL |
22 | |
23 | error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar` | |
0731742a | 24 | --> $DIR/associated-types-eq-3.rs:41:9 |
b7449926 XL |
25 | | |
26 | LL | baz(&a); | |
60c5eb7d | 27 | | ^^ expected struct `Bar`, found `usize` |
b7449926 | 28 | | |
532ac7d7 | 29 | = note: required for the cast to the object type `dyn Foo<A = Bar>` |
b7449926 XL |
30 | |
31 | error: aborting due to 3 previous errors | |
32 | ||
48663c56 | 33 | Some errors have detailed explanations: E0271, E0308. |
b7449926 | 34 | For more information about an error, try `rustc --explain E0271`. |