1 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/specialization-default-types.rs:5:12
4 LL | #![feature(specialization)]
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
11 error[E0308]: mismatched types
12 --> $DIR/specialization-default-types.rs:15:9
14 LL | default type Output = Box<T>;
15 | ----------------------------- expected this associated type
16 LL | default fn generate(self) -> Self::Output {
17 | ------------ expected `<T as Example>::Output` because of return type
19 | ^^^^^^^^^^^^^^ expected associated type, found struct `Box`
21 = note: expected associated type `<T as Example>::Output`
24 error[E0308]: mismatched types
25 --> $DIR/specialization-default-types.rs:25:5
27 LL | fn trouble<T>(t: T) -> Box<T> {
28 | ------ expected `Box<T>` because of return type
29 LL | Example::generate(t)
30 | ^^^^^^^^^^^^^^^^^^^^ expected struct `Box`, found associated type
32 = note: expected struct `Box<T>`
33 found associated type `<T as Example>::Output`
34 = help: consider constraining the associated type `<T as Example>::Output` to `Box<T>`
35 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
37 error: aborting due to 2 previous errors; 1 warning emitted
39 For more information about this error, try `rustc --explain E0308`.