rust/tests/ui/const-generics/issues/issue-71202.stderr
Esteban Küber 65a54a7f27 Tweak multispan rendering
Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments.
2024-12-12 23:36:27 +00:00

64 lines
1.5 KiB
Plaintext

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 | | <IsCopy<T>>::VALUE
LL | | } as usize] = [];
| |_____________________^
|
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]: = [];
|
error: unconstrained generic constant
--> $DIR/issue-71202.rs:28:19
|
LL | } as usize] = [];
| ^^
|
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]: = [];
|
error: aborting due to 2 previous errors