2021-08-27 18:04:57 +02:00
|
|
|
error: unconstrained generic constant
|
|
|
|
--> $DIR/issue-71202.rs:11:5
|
|
|
|
|
|
|
|
|
LL | / const ITEM_IS_COPY: [(); 1 - {
|
|
|
|
LL | | trait NotCopy {
|
|
|
|
LL | | const VALUE: bool = false;
|
|
|
|
LL | | }
|
|
|
|
... |
|
|
|
|
LL | | <IsCopy<T>>::VALUE
|
|
|
|
LL | | } as usize] = [];
|
|
|
|
| |_____________________^
|
|
|
|
|
|
2024-03-21 00:03:59 +00:00
|
|
|
help: try adding a `where` bound
|
|
|
|
|
|
|
|
|
LL ~ } as usize] where [(); 1 - {
|
|
|
|
LL + trait NotCopy {
|
|
|
|
LL + const VALUE: bool = false;
|
|
|
|
LL + }
|
|
|
|
LL +
|
|
|
|
LL + impl<__Type: ?Sized> NotCopy for __Type {}
|
|
|
|
LL +
|
|
|
|
LL + struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
|
|
|
|
LL +
|
|
|
|
LL + impl<__Type> IsCopy<__Type>
|
|
|
|
LL + where
|
|
|
|
LL + __Type: Sized + Copy,
|
|
|
|
LL + {
|
|
|
|
LL + const VALUE: bool = true;
|
|
|
|
LL + }
|
|
|
|
LL +
|
|
|
|
LL + <IsCopy<T>>::VALUE
|
|
|
|
LL ~ } as usize]: = [];
|
|
|
|
|
|
2021-08-27 18:04:57 +02:00
|
|
|
|
2024-03-06 16:51:17 +05:30
|
|
|
error: unconstrained generic constant
|
|
|
|
--> $DIR/issue-71202.rs:28:19
|
|
|
|
|
|
|
|
|
LL | } as usize] = [];
|
|
|
|
| ^^
|
|
|
|
|
|
2024-03-21 00:03:59 +00:00
|
|
|
help: try adding a `where` bound
|
|
|
|
|
|
|
|
|
LL ~ } as usize] where [(); 1 - {
|
|
|
|
LL + trait NotCopy {
|
|
|
|
LL + const VALUE: bool = false;
|
|
|
|
LL + }
|
|
|
|
LL +
|
|
|
|
LL + impl<__Type: ?Sized> NotCopy for __Type {}
|
|
|
|
LL +
|
|
|
|
LL + struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
|
|
|
|
LL +
|
|
|
|
LL + impl<__Type> IsCopy<__Type>
|
|
|
|
LL + where
|
|
|
|
LL + __Type: Sized + Copy,
|
|
|
|
LL + {
|
|
|
|
LL + const VALUE: bool = true;
|
|
|
|
LL + }
|
|
|
|
LL +
|
|
|
|
LL + <IsCopy<T>>::VALUE
|
|
|
|
LL ~ } as usize]: = [];
|
|
|
|
|
|
2024-03-06 16:51:17 +05:30
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2021-08-27 18:04:57 +02:00
|
|
|
|