@@ -68,6 +68,27 @@ note: required by a bound in `use_trait_impl::assert_impl`
68
68
LL | fn assert_impl<T: Trait>() {}
69
69
| ^^^^^ required by this bound in `assert_impl`
70
70
71
+ error: unconstrained generic constant
72
+ --> $DIR/abstract-const-as-cast-3.rs:23:19
73
+ |
74
+ LL | assert_impl::<HasCastInTraitImpl<13, { 12 as u128 }>>();
75
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
+ |
77
+ note: required for `HasCastInTraitImpl<13, { 12 as u128 }>` to implement `Trait`
78
+ --> $DIR/abstract-const-as-cast-3.rs:8:22
79
+ |
80
+ LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
81
+ | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
+ note: required by a bound in `use_trait_impl::assert_impl`
83
+ --> $DIR/abstract-const-as-cast-3.rs:14:23
84
+ |
85
+ LL | fn assert_impl<T: Trait>() {}
86
+ | ^^^^^ required by this bound in `assert_impl`
87
+ help: try adding a `where` bound
88
+ |
89
+ LL | EvaluatableU128<{N as u128}>:, [(); { O as u128 } as usize]: {
90
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91
+
71
92
error[E0308]: mismatched types
72
93
--> $DIR/abstract-const-as-cast-3.rs:23:5
73
94
|
@@ -82,6 +103,27 @@ note: required by a bound in `use_trait_impl::assert_impl`
82
103
LL | fn assert_impl<T: Trait>() {}
83
104
| ^^^^^ required by this bound in `assert_impl`
84
105
106
+ error: unconstrained generic constant
107
+ --> $DIR/abstract-const-as-cast-3.rs:25:19
108
+ |
109
+ LL | assert_impl::<HasCastInTraitImpl<14, 13>>();
110
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
111
+ |
112
+ note: required for `HasCastInTraitImpl<14, 13>` to implement `Trait`
113
+ --> $DIR/abstract-const-as-cast-3.rs:8:22
114
+ |
115
+ LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
116
+ | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
+ note: required by a bound in `use_trait_impl::assert_impl`
118
+ --> $DIR/abstract-const-as-cast-3.rs:14:23
119
+ |
120
+ LL | fn assert_impl<T: Trait>() {}
121
+ | ^^^^^ required by this bound in `assert_impl`
122
+ help: try adding a `where` bound
123
+ |
124
+ LL | EvaluatableU128<{N as u128}>:, [(); { O as u128 } as usize]: {
125
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126
+
85
127
error[E0308]: mismatched types
86
128
--> $DIR/abstract-const-as-cast-3.rs:25:5
87
129
|
@@ -166,6 +208,27 @@ note: required by a bound in `use_trait_impl_2::assert_impl`
166
208
LL | fn assert_impl<T: Trait>() {}
167
209
| ^^^^^ required by this bound in `assert_impl`
168
210
211
+ error: unconstrained generic constant
212
+ --> $DIR/abstract-const-as-cast-3.rs:41:19
213
+ |
214
+ LL | assert_impl::<HasCastInTraitImpl<13, { 12 as u128 }>>();
215
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216
+ |
217
+ note: required for `HasCastInTraitImpl<13, { 12 as u128 }>` to implement `Trait`
218
+ --> $DIR/abstract-const-as-cast-3.rs:8:22
219
+ |
220
+ LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
221
+ | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222
+ note: required by a bound in `use_trait_impl_2::assert_impl`
223
+ --> $DIR/abstract-const-as-cast-3.rs:32:23
224
+ |
225
+ LL | fn assert_impl<T: Trait>() {}
226
+ | ^^^^^ required by this bound in `assert_impl`
227
+ help: try adding a `where` bound
228
+ |
229
+ LL | EvaluatableU128<{N as _}>:, [(); { O as u128 } as usize]: {
230
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231
+
169
232
error[E0308]: mismatched types
170
233
--> $DIR/abstract-const-as-cast-3.rs:41:5
171
234
|
@@ -180,6 +243,27 @@ note: required by a bound in `use_trait_impl_2::assert_impl`
180
243
LL | fn assert_impl<T: Trait>() {}
181
244
| ^^^^^ required by this bound in `assert_impl`
182
245
246
+ error: unconstrained generic constant
247
+ --> $DIR/abstract-const-as-cast-3.rs:43:19
248
+ |
249
+ LL | assert_impl::<HasCastInTraitImpl<14, 13>>();
250
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
251
+ |
252
+ note: required for `HasCastInTraitImpl<14, 13>` to implement `Trait`
253
+ --> $DIR/abstract-const-as-cast-3.rs:8:22
254
+ |
255
+ LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
256
+ | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
257
+ note: required by a bound in `use_trait_impl_2::assert_impl`
258
+ --> $DIR/abstract-const-as-cast-3.rs:32:23
259
+ |
260
+ LL | fn assert_impl<T: Trait>() {}
261
+ | ^^^^^ required by this bound in `assert_impl`
262
+ help: try adding a `where` bound
263
+ |
264
+ LL | EvaluatableU128<{N as _}>:, [(); { O as u128 } as usize]: {
265
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
266
+
183
267
error[E0308]: mismatched types
184
268
--> $DIR/abstract-const-as-cast-3.rs:43:5
185
269
|
@@ -194,6 +278,6 @@ note: required by a bound in `use_trait_impl_2::assert_impl`
194
278
LL | fn assert_impl<T: Trait>() {}
195
279
| ^^^^^ required by this bound in `assert_impl`
196
280
197
- error: aborting due to 12 previous errors
281
+ error: aborting due to 16 previous errors
198
282
199
283
For more information about this error, try `rustc --explain E0308`.
0 commit comments