2024-02-15 11:12:05 -06:00
|
|
|
error: unconstrained generic constant
|
|
|
|
--> $DIR/variance-associated-consts.rs:14:12
|
|
|
|
|
|
|
|
|
LL | field: [u8; <T as Trait>::Const]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-03-20 19:03:59 -05:00
|
|
|
help: try adding a `where` bound
|
|
|
|
|
|
|
|
|
LL | struct Foo<T: Trait> where [(); <T as Trait>::Const]: {
|
|
|
|
| ++++++++++++++++++++++++++++++++
|
2024-02-15 11:12:05 -06:00
|
|
|
|
2024-03-11 16:28:16 -05:00
|
|
|
error: [o]
|
|
|
|
--> $DIR/variance-associated-consts.rs:13:1
|
|
|
|
|
|
|
|
|
LL | struct Foo<T: Trait> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2024-02-15 11:12:05 -06:00
|
|
|
error: aborting due to 2 previous errors
|
2021-10-12 14:50:44 -05:00
|
|
|
|