1 error[E0053]: method `make` has an incompatible type for trait
2 --> $DIR/defaults-specialization.rs:20:18
4 LL | fn make() -> Self::Ty {
5 | -------- type in trait
7 LL | fn make() -> u8 { 0 }
8 | ^^ expected associated type, found `u8`
10 = note: expected fn pointer `fn() -> <A<T> as Tr>::Ty`
11 found fn pointer `fn() -> u8`
12 = note: consider constraining the associated type `<A<T> as Tr>::Ty` to `u8` or calling a method that returns `<A<T> as Tr>::Ty`
13 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
15 error[E0053]: method `make` has an incompatible type for trait
16 --> $DIR/defaults-specialization.rs:36:18
18 LL | fn make() -> Self::Ty {
19 | -------- type in trait
21 LL | fn make() -> bool { true }
22 | ^^^^ expected associated type, found `bool`
24 = note: expected fn pointer `fn() -> <B<T> as Tr>::Ty`
25 found fn pointer `fn() -> bool`
26 = note: consider constraining the associated type `<B<T> as Tr>::Ty` to `bool` or calling a method that returns `<B<T> as Tr>::Ty`
27 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
29 error[E0308]: mismatched types
30 --> $DIR/defaults-specialization.rs:11:9
32 LL | fn make() -> Self::Ty {
33 | -------- expected `<Self as Tr>::Ty` because of return type
35 | ^^^ expected associated type, found `u8`
37 = note: expected associated type `<Self as Tr>::Ty`
39 = note: consider constraining the associated type `<Self as Tr>::Ty` to `u8` or calling a method that returns `<Self as Tr>::Ty`
40 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
42 error[E0308]: mismatched types
43 --> $DIR/defaults-specialization.rs:27:29
45 LL | fn make() -> Self::Ty { 0u8 }
46 | -------- ^^^ expected associated type, found `u8`
48 | expected `<A2<T> as Tr>::Ty` because of return type
50 = note: expected associated type `<A2<T> as Tr>::Ty`
52 = note: consider constraining the associated type `<A2<T> as Tr>::Ty` to `u8` or calling a method that returns `<A2<T> as Tr>::Ty`
53 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
55 error[E0308]: mismatched types
56 --> $DIR/defaults-specialization.rs:45:29
58 LL | fn make() -> Self::Ty { true }
59 | -------- ^^^^ expected associated type, found `bool`
61 | expected `<B2<T> as Tr>::Ty` because of return type
63 = note: expected associated type `<B2<T> as Tr>::Ty`
65 = note: consider constraining the associated type `<B2<T> as Tr>::Ty` to `bool` or calling a method that returns `<B2<T> as Tr>::Ty`
66 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
68 error[E0308]: mismatched types
69 --> $DIR/defaults-specialization.rs:88:32
71 LL | let _: <B<()> as Tr>::Ty = 0u8;
72 | ^^^ expected associated type, found `u8`
74 = note: expected associated type `<B<()> as Tr>::Ty`
76 = note: consider constraining the associated type `<B<()> as Tr>::Ty` to `u8` or calling a method that returns `<B<()> as Tr>::Ty`
77 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
79 error[E0308]: mismatched types
80 --> $DIR/defaults-specialization.rs:89:32
82 LL | let _: <B<()> as Tr>::Ty = true;
83 | ^^^^ expected associated type, found `bool`
85 = note: expected associated type `<B<()> as Tr>::Ty`
87 = note: consider constraining the associated type `<B<()> as Tr>::Ty` to `bool` or calling a method that returns `<B<()> as Tr>::Ty`
88 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
90 error[E0308]: mismatched types
91 --> $DIR/defaults-specialization.rs:90:33
93 LL | let _: <B2<()> as Tr>::Ty = 0u8;
94 | ^^^ expected associated type, found `u8`
96 = note: expected associated type `<B2<()> as Tr>::Ty`
98 = note: consider constraining the associated type `<B2<()> as Tr>::Ty` to `u8` or calling a method that returns `<B2<()> as Tr>::Ty`
99 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
101 error[E0308]: mismatched types
102 --> $DIR/defaults-specialization.rs:91:33
104 LL | let _: <B2<()> as Tr>::Ty = true;
105 | ^^^^ expected associated type, found `bool`
107 = note: expected associated type `<B2<()> as Tr>::Ty`
109 = note: consider constraining the associated type `<B2<()> as Tr>::Ty` to `bool` or calling a method that returns `<B2<()> as Tr>::Ty`
110 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
112 error: aborting due to 9 previous errors
114 Some errors have detailed explanations: E0053, E0308.
115 For more information about an error, try `rustc --explain E0053`.