]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes |
2 | --> $DIR/specialization-default-projection.rs:1:12 | |
3 | | | |
4 | LL | #![feature(specialization)] | |
5 | | ^^^^^^^^^^^^^^ | |
6 | | | |
f035d41b | 7 | = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information |
29967ef6 | 8 | = help: consider using `min_specialization` instead, which is more stable and complete |
2b03887a | 9 | = note: `#[warn(incomplete_features)]` on by default |
f035d41b | 10 | |
b7449926 | 11 | error[E0308]: mismatched types |
0731742a | 12 | --> $DIR/specialization-default-projection.rs:21:5 |
b7449926 XL |
13 | | |
14 | LL | fn generic<T>() -> <T as Foo>::Assoc { | |
15 | | ----------------- expected `<T as Foo>::Assoc` because of return type | |
16 | ... | |
532ac7d7 | 17 | LL | () |
60c5eb7d | 18 | | ^^ expected associated type, found `()` |
b7449926 | 19 | | |
60c5eb7d XL |
20 | = note: expected associated type `<T as Foo>::Assoc` |
21 | found unit type `()` | |
f9f354fc | 22 | = help: consider constraining the associated type `<T as Foo>::Assoc` to `()` or calling a method that returns `<T as Foo>::Assoc` |
e1599b0c | 23 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
b7449926 XL |
24 | |
25 | error[E0308]: mismatched types | |
0731742a | 26 | --> $DIR/specialization-default-projection.rs:28:5 |
b7449926 XL |
27 | | |
28 | LL | fn monomorphic() -> () { | |
29 | | -- expected `()` because of return type | |
30 | ... | |
532ac7d7 | 31 | LL | generic::<()>() |
6a06907d | 32 | | ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;` |
b7449926 | 33 | | | |
60c5eb7d | 34 | | expected `()`, found associated type |
b7449926 | 35 | | |
60c5eb7d XL |
36 | = note: expected unit type `()` |
37 | found associated type `<() as Foo>::Assoc` | |
f9f354fc | 38 | = help: consider constraining the associated type `<() as Foo>::Assoc` to `()` |
e1599b0c | 39 | = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
b7449926 | 40 | |
f035d41b | 41 | error: aborting due to 2 previous errors; 1 warning emitted |
b7449926 XL |
42 | |
43 | For more information about this error, try `rustc --explain E0308`. |