1
1
error[E0053]: method `make` has an incompatible type for trait
2
- --> $DIR/defaults-specialization.rs:15 :18
2
+ --> $DIR/defaults-specialization.rs:17 :18
3
3
|
4
4
LL | fn make() -> Self::Ty;
5
5
| -------- type in trait
@@ -11,7 +11,7 @@ LL | fn make() -> u8 { 0 }
11
11
found type `fn() -> u8`
12
12
13
13
error[E0053]: method `make` has an incompatible type for trait
14
- --> $DIR/defaults-specialization.rs:24 :18
14
+ --> $DIR/defaults-specialization.rs:33 :18
15
15
|
16
16
LL | fn make() -> Self::Ty;
17
17
| -------- type in trait
@@ -22,6 +22,29 @@ LL | fn make() -> bool { true }
22
22
= note: expected type `fn() -> <B<T> as Tr>::Ty`
23
23
found type `fn() -> bool`
24
24
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
26
48
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