fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
995 B33 linesraw
1error: unconstrained generic constant
2  --> $DIR/issue-71202.rs:11:5
3   |
4LL | /     const ITEM_IS_COPY: [(); 1 - {
5LL | |         trait NotCopy {
6LL | |             const VALUE: bool = false;
7LL | |         }
8...  |
9LL | |         <IsCopy<T>>::VALUE
10LL | |     } as usize] = [];
11   | |_____________________^
12   |
13   = help: try adding a `where` bound using this expression: `where [(); 1 - {
14                   trait NotCopy {
15                       const VALUE: bool = false;
16                   }
17           
18                   impl<__Type: ?Sized> NotCopy for __Type {}
19           
20                   struct IsCopy<__Type: ?Sized>(PhantomData<__Type>);
21           
22                   impl<__Type> IsCopy<__Type>
23                   where
24                       __Type: Sized + Copy,
25                   {
26                       const VALUE: bool = true;
27                   }
28           
29                   <IsCopy<T>>::VALUE
30               } as usize]:`
31
32error: aborting due to previous error
33