]> git.proxmox.com Git - rustc.git/blame - src/test/ui/specialization/specialization-default-projection.stderr
New upstream version 1.39.0+dfsg1
[rustc.git] / src / test / ui / specialization / specialization-default-projection.stderr
CommitLineData
b7449926 1error[E0308]: mismatched types
0731742a 2 --> $DIR/specialization-default-projection.rs:21:5
b7449926
XL
3 |
4LL | fn generic<T>() -> <T as Foo>::Assoc {
5 | ----------------- expected `<T as Foo>::Assoc` because of return type
6...
532ac7d7 7LL | ()
b7449926
XL
8 | ^^ expected associated type, found ()
9 |
10 = note: expected type `<T as Foo>::Assoc`
11 found type `()`
e1599b0c
XL
12 = note: consider constraining the associated type `<T as Foo>::Assoc` to `()` or calling a method that returns `<T as Foo>::Assoc`
13 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
b7449926
XL
14
15error[E0308]: mismatched types
0731742a 16 --> $DIR/specialization-default-projection.rs:28:5
b7449926
XL
17 |
18LL | fn monomorphic() -> () {
19 | -- expected `()` because of return type
20...
532ac7d7 21LL | generic::<()>()
b7449926
XL
22 | ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
23 | |
24 | expected (), found associated type
25 |
26 = note: expected type `()`
27 found type `<() as Foo>::Assoc`
e1599b0c
XL
28 = note: consider constraining the associated type `<() as Foo>::Assoc` to `()`
29 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
b7449926
XL
30
31error: aborting due to 2 previous errors
32
33For more information about this error, try `rustc --explain E0308`.