11error[E0053]: method `make` has an incompatible type for trait
2- --> $DIR/defaults-specialization.rs:15 :18
2+ --> $DIR/defaults-specialization.rs:17 :18
33 |
44LL | fn make() -> Self::Ty;
55 | -------- type in trait
@@ -11,7 +11,7 @@ LL | fn make() -> u8 { 0 }
1111 found type `fn() -> u8`
1212
1313error[E0053]: method `make` has an incompatible type for trait
14- --> $DIR/defaults-specialization.rs:24 :18
14+ --> $DIR/defaults-specialization.rs:33 :18
1515 |
1616LL | fn make() -> Self::Ty;
1717 | -------- type in trait
@@ -22,6 +22,29 @@ LL | fn make() -> bool { true }
2222 = note: expected type `fn() -> <B<T> as Tr>::Ty`
2323 found type `fn() -> bool`
2424
25- error: aborting due to 2 previous errors
25+ error[E0308]: mismatched types
26+ --> $DIR/defaults-specialization.rs:24:29
27+ |
28+ LL | fn make() -> Self::Ty { 0u8 }
29+ | -------- ^^^ expected associated type, found u8
30+ | |
31+ | expected `<A2<T> as Tr>::Ty` because of return type
32+ |
33+ = note: expected type `<A2<T> as Tr>::Ty`
34+ found type `u8`
35+
36+ error[E0308]: mismatched types
37+ --> $DIR/defaults-specialization.rs:42:29
38+ |
39+ LL | fn make() -> Self::Ty { true }
40+ | -------- ^^^^ expected associated type, found bool
41+ | |
42+ | expected `<B2<T> as Tr>::Ty` because of return type
43+ |
44+ = note: expected type `<B2<T> as Tr>::Ty`
45+ found type `bool`
46+
47+ error: aborting due to 4 previous errors
2648
27- For more information about this error, try `rustc --explain E0053`.
49+ Some errors have detailed explanations: E0053, E0308.
50+ For more information about an error, try `rustc --explain E0053`.
0 commit comments