blob: 1192b0e5cfa531fe92c34a01d12065b3e8752e98 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/specialization-default-types.rs:15:9
|
LL | default fn generate(self) -> Self::Output {
| ------------ expected `<T as Example>::Output` because of return type
LL | Box::new(self)
| ^^^^^^^^^^^^^^ expected associated type, found struct `std::boxed::Box`
|
= note: expected type `<T as Example>::Output`
found type `std::boxed::Box<T>`
error[E0308]: mismatched types
--> $DIR/specialization-default-types.rs:25:5
|
LL | fn trouble<T>(t: T) -> Box<T> {
| ------ expected `std::boxed::Box<T>` because of return type
LL | Example::generate(t)
| ^^^^^^^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found associated type
|
= note: expected type `std::boxed::Box<T>`
found type `<T as Example>::Output`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.