]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-types/associated-types-eq-3.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / associated-types / associated-types-eq-3.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/associated-types-eq-3.rs:23:18
b7449926
XL
3 |
4LL | 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
14error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
0731742a 15 --> $DIR/associated-types-eq-3.rs:38:5
b7449926 16 |
e1599b0c
XL
17LL | fn foo1<I: Foo<A=Bar>>(x: I) {
18 | ---- ----- required by this bound in `foo1`
19...
b7449926 20LL | foo1(a);
60c5eb7d 21 | ^^^^ expected struct `Bar`, found `usize`
b7449926
XL
22
23error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
0731742a 24 --> $DIR/associated-types-eq-3.rs:41:9
b7449926
XL
25 |
26LL | 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
31error: aborting due to 3 previous errors
32
48663c56 33Some errors have detailed explanations: E0271, E0308.
b7449926 34For more information about an error, try `rustc --explain E0271`.