|
1 | | -error[E0107]: missing generics for trait `Super` |
2 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:18:30 |
| 1 | +error[E0271]: type mismatch resolving `<Self as Super>::Assoc == ()` |
| 2 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:20:5 |
3 | 3 | | |
4 | | -LL | <Self as Mirror>::Assoc: Super, |
5 | | - | ^^^^^ expected 1 generic argument |
| 4 | +LL | fn transmute(&self) {} |
| 5 | + | ^^^^^^^^^^^^^^^^^^^ expected `()`, found type parameter `T` |
6 | 6 | | |
7 | | -note: trait defined here, with 1 generic parameter: `Q` |
8 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:8:7 |
| 7 | + = note: expected unit type `()` |
| 8 | + found type parameter `T` |
| 9 | +note: required for `Self` to implement `Mirror` |
| 10 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
9 | 11 | | |
10 | | -LL | trait Super<Q> { |
11 | | - | ^^^^^ - |
12 | | -help: add missing generic argument |
13 | | - | |
14 | | -LL | <Self as Mirror>::Assoc: Super<Q>, |
15 | | - | +++ |
| 12 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 13 | + | ---------- ^^^^^^ ^ |
| 14 | + | | |
| 15 | + | unsatisfied trait bound introduced here |
16 | 16 |
|
17 | | -error[E0107]: missing generics for trait `Super` |
18 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:21:43 |
| 17 | +error[E0277]: the size for values of type `Self` cannot be known at compilation time |
| 18 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:20:5 |
| 19 | + | |
| 20 | +LL | fn transmute(&self) {} |
| 21 | + | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
19 | 22 | | |
20 | | -LL | fn transmute(&self, t: T) -> <Self as Super>::Assoc; |
21 | | - | ^^^^^ expected 1 generic argument |
| 23 | +note: required for `Self` to implement `Mirror` |
| 24 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
22 | 25 | | |
23 | | -note: trait defined here, with 1 generic parameter: `Q` |
24 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:8:7 |
| 26 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 27 | + | - ^^^^^^ ^ |
| 28 | + | | |
| 29 | + | unsatisfied trait bound implicitly introduced here |
| 30 | + |
| 31 | +error[E0271]: type mismatch resolving `<Self as Super>::Assoc == ()` |
| 32 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:10:1 |
25 | 33 | | |
26 | | -LL | trait Super<Q> { |
27 | | - | ^^^^^ - |
28 | | -help: add missing generic argument |
| 34 | +LL | trait Foo<T>: Super<Assoc = T> |
| 35 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found type parameter `T` |
29 | 36 | | |
30 | | -LL | fn transmute(&self, t: T) -> <Self as Super<Q>>::Assoc; |
31 | | - | +++ |
| 37 | + = note: expected unit type `()` |
| 38 | + found type parameter `T` |
| 39 | +note: required for `Self` to implement `Mirror` |
| 40 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 41 | + | |
| 42 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 43 | + | ---------- ^^^^^^ ^ |
| 44 | + | | |
| 45 | + | unsatisfied trait bound introduced here |
32 | 46 |
|
33 | | -error[E0038]: the trait `Foo` is not dyn compatible |
34 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:13:20 |
| 47 | +error[E0277]: the size for values of type `Self` cannot be known at compilation time |
| 48 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:10:1 |
| 49 | + | |
| 50 | +LL | trait Foo<T>: Super<Assoc = T> |
| 51 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
35 | 52 | | |
36 | | -LL | impl<T, U> Dyn for dyn Foo<T, U> + '_ {} |
37 | | - | ^^^^^^^^^^^^^^^^^^ `Foo` is not dyn compatible |
| 53 | +note: required for `Self` to implement `Mirror` |
| 54 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
38 | 55 | | |
39 | | -note: for a trait to be dyn compatible it needs to allow building a vtable |
40 | | - for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility> |
41 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:21:34 |
| 56 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 57 | + | - ^^^^^^ ^ |
| 58 | + | | |
| 59 | + | unsatisfied trait bound implicitly introduced here |
| 60 | +help: consider further restricting `Self` |
42 | 61 | | |
43 | | -LL | trait Foo<T, U>: Super<ActuallySuper, Assoc = T> |
44 | | - | --- this trait is not dyn compatible... |
| 62 | +LL | trait Foo<T>: Super<Assoc = T> + Sized |
| 63 | + | +++++++ |
| 64 | + |
| 65 | +error[E0271]: type mismatch resolving `<Self as Super>::Assoc == ()` |
| 66 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:14:30 |
| 67 | + | |
| 68 | +LL | trait Foo<T>: Super<Assoc = T> |
| 69 | + | - found this type parameter |
45 | 70 | ... |
46 | | -LL | fn transmute(&self, t: T) -> <Self as Super>::Assoc; |
47 | | - | ^^^^^^^^^^^^^^^^^^^^^^ ...because method `transmute` references the `Self` type in its return type |
48 | | - = help: consider moving `transmute` to another trait |
| 71 | +LL | <Self as Mirror>::Assoc: Clone, |
| 72 | + | ^^^^^ expected `()`, found type parameter `T` |
| 73 | + | |
| 74 | + = note: expected unit type `()` |
| 75 | + found type parameter `T` |
| 76 | +note: required for `Self` to implement `Mirror` |
| 77 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 78 | + | |
| 79 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 80 | + | ---------- ^^^^^^ ^ |
| 81 | + | | |
| 82 | + | unsatisfied trait bound introduced here |
| 83 | + |
| 84 | +error[E0277]: the size for values of type `Self` cannot be known at compilation time |
| 85 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:14:30 |
| 86 | + | |
| 87 | +LL | <Self as Mirror>::Assoc: Clone, |
| 88 | + | ^^^^^ doesn't have a size known at compile-time |
| 89 | + | |
| 90 | +note: required for `Self` to implement `Mirror` |
| 91 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 92 | + | |
| 93 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 94 | + | - ^^^^^^ ^ |
| 95 | + | | |
| 96 | + | unsatisfied trait bound implicitly introduced here |
| 97 | +help: consider further restricting `Self` |
| 98 | + | |
| 99 | +LL | trait Foo<T>: Super<Assoc = T> + Sized |
| 100 | + | +++++++ |
49 | 101 |
|
50 | 102 | error[E0046]: not all trait items implemented, missing: `Assoc` |
51 | | - --> $DIR/unhandled-crate-mod-issue-144888.rs:29:1 |
| 103 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:1 |
| 104 | + | |
| 105 | +LL | type Assoc; |
| 106 | + | ---------- `Assoc` from trait |
| 107 | +... |
| 108 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 109 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Assoc` in implementation |
| 110 | + |
| 111 | +error[E0271]: type mismatch resolving `<Self as Super>::Assoc == ()` |
| 112 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:20:5 |
52 | 113 | | |
53 | | -LL | type Assoc: ?Sized; |
54 | | - | ------------------ `Assoc` from trait |
| 114 | +LL | trait Foo<T>: Super<Assoc = T> |
| 115 | + | - found this type parameter |
55 | 116 | ... |
56 | | -LL | impl<T: Super<ActuallySuper, Assoc = T>> Mirror for T {} |
57 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Assoc` in implementation |
| 117 | +LL | fn transmute(&self) {} |
| 118 | + | ^^^^^^^^^^^^^^^^^^^ expected `()`, found type parameter `T` |
| 119 | + | |
| 120 | + = note: expected unit type `()` |
| 121 | + found type parameter `T` |
| 122 | +note: required for `Self` to implement `Mirror` |
| 123 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 124 | + | |
| 125 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 126 | + | ---------- ^^^^^^ ^ |
| 127 | + | | |
| 128 | + | unsatisfied trait bound introduced here |
| 129 | + |
| 130 | +error[E0277]: the size for values of type `Self` cannot be known at compilation time |
| 131 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:20:5 |
| 132 | + | |
| 133 | +LL | fn transmute(&self) {} |
| 134 | + | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 135 | + | |
| 136 | +note: required for `Self` to implement `Mirror` |
| 137 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 138 | + | |
| 139 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 140 | + | - ^^^^^^ ^ |
| 141 | + | | |
| 142 | + | unsatisfied trait bound implicitly introduced here |
| 143 | +help: consider further restricting `Self` |
| 144 | + | |
| 145 | +LL | fn transmute(&self) where Self: Sized {} |
| 146 | + | +++++++++++++++++ |
| 147 | + |
| 148 | +error[E0271]: type mismatch resolving `<Self as Super>::Assoc == ()` |
| 149 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:14:30 |
| 150 | + | |
| 151 | +LL | trait Foo<T>: Super<Assoc = T> |
| 152 | + | - found this type parameter |
| 153 | +... |
| 154 | +LL | <Self as Mirror>::Assoc: Clone, |
| 155 | + | ^^^^^ expected `()`, found type parameter `T` |
| 156 | + | |
| 157 | + = note: expected unit type `()` |
| 158 | + found type parameter `T` |
| 159 | +note: required for `Self` to implement `Mirror` |
| 160 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 161 | + | |
| 162 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 163 | + | ---------- ^^^^^^ ^ |
| 164 | + | | |
| 165 | + | unsatisfied trait bound introduced here |
| 166 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 167 | + |
| 168 | +error[E0277]: the size for values of type `Self` cannot be known at compilation time |
| 169 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:14:30 |
| 170 | + | |
| 171 | +LL | <Self as Mirror>::Assoc: Clone, |
| 172 | + | ^^^^^ doesn't have a size known at compile-time |
| 173 | + | |
| 174 | +note: required for `Self` to implement `Mirror` |
| 175 | + --> $DIR/unhandled-crate-mod-issue-144888.rs:31:28 |
| 176 | + | |
| 177 | +LL | impl<T: Super<Assoc = ()>> Mirror for T {} |
| 178 | + | - ^^^^^^ ^ |
| 179 | + | | |
| 180 | + | unsatisfied trait bound implicitly introduced here |
| 181 | +help: consider further restricting `Self` |
| 182 | + | |
| 183 | +LL | fn transmute(&self) where Self: Sized {} |
| 184 | + | +++++++++++++++++ |
58 | 185 |
|
59 | | -error: aborting due to 4 previous errors |
| 186 | +error: aborting due to 11 previous errors |
60 | 187 |
|
61 | | -Some errors have detailed explanations: E0038, E0046, E0107. |
62 | | -For more information about an error, try `rustc --explain E0038`. |
| 188 | +Some errors have detailed explanations: E0046, E0271, E0277. |
| 189 | +For more information about an error, try `rustc --explain E0046`. |
0 commit comments