]> git.lizzy.rs Git - rust.git/blob - tests/ui/specialization/specialization-default-projection.stderr
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / specialization / specialization-default-projection.stderr
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    |
7    = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
8    = help: consider using `min_specialization` instead, which is more stable and complete
9    = note: `#[warn(incomplete_features)]` on by default
10
11 error[E0308]: mismatched types
12   --> $DIR/specialization-default-projection.rs:21:5
13    |
14 LL | fn generic<T>() -> <T as Foo>::Assoc {
15    |                    ----------------- expected `<T as Foo>::Assoc` because of return type
16 ...
17 LL |     ()
18    |     ^^ expected associated type, found `()`
19    |
20    = note: expected associated type `<T as Foo>::Assoc`
21                     found unit type `()`
22    = help: consider constraining the associated type `<T as Foo>::Assoc` to `()` or calling a method that returns `<T as Foo>::Assoc`
23    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
24
25 error[E0308]: mismatched types
26   --> $DIR/specialization-default-projection.rs:28:5
27    |
28 LL | fn monomorphic() -> () {
29    |                     -- expected `()` because of return type
30 ...
31 LL |     generic::<()>()
32    |     ^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
33    |     |
34    |     expected `()`, found associated type
35    |
36    = note:    expected unit type `()`
37            found associated type `<() as Foo>::Assoc`
38    = help: consider constraining the associated type `<() as Foo>::Assoc` to `()`
39    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
40
41 error: aborting due to 2 previous errors; 1 warning emitted
42
43 For more information about this error, try `rustc --explain E0308`.