1 error[E0308]: mismatched types
2 --> $DIR/specialization-default-types.rs:15:9
4 LL | default fn generate(self) -> Self::Output {
5 | ------------ expected `<T as Example>::Output` because of return type
6 LL | Box::new(self) //~ ERROR mismatched types
7 | ^^^^^^^^^^^^^^ expected associated type, found struct `std::boxed::Box`
9 = note: expected type `<T as Example>::Output`
10 found type `std::boxed::Box<T>`
12 error[E0308]: mismatched types
13 --> $DIR/specialization-default-types.rs:25:5
15 LL | fn trouble<T>(t: T) -> Box<T> {
16 | ------ expected `std::boxed::Box<T>` because of return type
17 LL | Example::generate(t) //~ ERROR mismatched types
18 | ^^^^^^^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found associated type
20 = note: expected type `std::boxed::Box<T>`
21 found type `<T as Example>::Output`
23 error: aborting due to 2 previous errors
25 For more information about this error, try `rustc --explain E0308`.