]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/defaults-specialization.stderr
Fix rebase damage
[rust.git] / src / test / ui / associated-types / defaults-specialization.stderr
1 error[E0053]: method `make` has an incompatible type for trait
2   --> $DIR/defaults-specialization.rs:20:18
3    |
4 LL |     fn make() -> Self::Ty {
5    |                  -------- type in trait
6 ...
7 LL |     fn make() -> u8 { 0 }
8    |                  ^^ expected associated type, found `u8`
9    |
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
14
15 error[E0053]: method `make` has an incompatible type for trait
16   --> $DIR/defaults-specialization.rs:36:18
17    |
18 LL |     fn make() -> Self::Ty {
19    |                  -------- type in trait
20 ...
21 LL |     fn make() -> bool { true }
22    |                  ^^^^ expected associated type, found `bool`
23    |
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
28
29 error[E0308]: mismatched types
30   --> $DIR/defaults-specialization.rs:11:9
31    |
32 LL |     fn make() -> Self::Ty {
33    |                  -------- expected `<Self as Tr>::Ty` because of return type
34 LL |         0u8
35    |         ^^^ expected associated type, found `u8`
36    |
37    = note: expected associated type `<Self as Tr>::Ty`
38                          found type `u8`
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
41
42 error[E0308]: mismatched types
43   --> $DIR/defaults-specialization.rs:27:29
44    |
45 LL |     fn make() -> Self::Ty { 0u8 }
46    |                  --------   ^^^ expected associated type, found `u8`
47    |                  |
48    |                  expected `<A2<T> as Tr>::Ty` because of return type
49    |
50    = note: expected associated type `<A2<T> as Tr>::Ty`
51                          found type `u8`
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
54
55 error[E0308]: mismatched types
56   --> $DIR/defaults-specialization.rs:45:29
57    |
58 LL |     fn make() -> Self::Ty { true }
59    |                  --------   ^^^^ expected associated type, found `bool`
60    |                  |
61    |                  expected `<B2<T> as Tr>::Ty` because of return type
62    |
63    = note: expected associated type `<B2<T> as Tr>::Ty`
64                          found type `bool`
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
67
68 error[E0308]: mismatched types
69   --> $DIR/defaults-specialization.rs:88:32
70    |
71 LL |     let _: <B<()> as Tr>::Ty = 0u8;
72    |                                ^^^ expected associated type, found `u8`
73    |
74    = note: expected associated type `<B<()> as Tr>::Ty`
75                          found type `u8`
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
78
79 error[E0308]: mismatched types
80   --> $DIR/defaults-specialization.rs:89:32
81    |
82 LL |     let _: <B<()> as Tr>::Ty = true;
83    |                                ^^^^ expected associated type, found `bool`
84    |
85    = note: expected associated type `<B<()> as Tr>::Ty`
86                          found type `bool`
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
89
90 error[E0308]: mismatched types
91   --> $DIR/defaults-specialization.rs:90:33
92    |
93 LL |     let _: <B2<()> as Tr>::Ty = 0u8;
94    |                                 ^^^ expected associated type, found `u8`
95    |
96    = note: expected associated type `<B2<()> as Tr>::Ty`
97                          found type `u8`
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
100
101 error[E0308]: mismatched types
102   --> $DIR/defaults-specialization.rs:91:33
103    |
104 LL |     let _: <B2<()> as Tr>::Ty = true;
105    |                                 ^^^^ expected associated type, found `bool`
106    |
107    = note: expected associated type `<B2<()> as Tr>::Ty`
108                          found type `bool`
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
111
112 error: aborting due to 9 previous errors
113
114 Some errors have detailed explanations: E0053, E0308.
115 For more information about an error, try `rustc --explain E0053`.