]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/specialization-default-projection.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / specialization / specialization-default-projection.stderr
1 error[E0308]: mismatched types
2   --> $DIR/specialization-default-projection.rs:31:5
3    |
4 LL | fn generic<T>() -> <T as Foo>::Assoc {
5    |                    ----------------- expected `<T as Foo>::Assoc` because of return type
6 ...
7 LL |     () //~ ERROR mismatched types
8    |     ^^ expected associated type, found ()
9    |
10    = note: expected type `<T as Foo>::Assoc`
11               found type `()`
12
13 error[E0308]: mismatched types
14   --> $DIR/specialization-default-projection.rs:38:5
15    |
16 LL | fn monomorphic() -> () {
17    |                     -- expected `()` because of return type
18 ...
19 LL |     generic::<()>() //~ ERROR mismatched types
20    |     ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
21    |     |
22    |     expected (), found associated type
23    |
24    = note: expected type `()`
25               found type `<() as Foo>::Assoc`
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0308`.