]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/specialization-default-types.stderr
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / specialization / specialization-default-types.stderr
1 error[E0308]: mismatched types
2   --> $DIR/specialization-default-types.rs:15:9
3    |
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`
8    |
9    = note: expected type `<T as Example>::Output`
10               found type `std::boxed::Box<T>`
11
12 error[E0308]: mismatched types
13   --> $DIR/specialization-default-types.rs:25:5
14    |
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
19    |
20    = note: expected type `std::boxed::Box<T>`
21               found type `<T as Example>::Output`
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0308`.