11use  crate :: cmp:: BytewiseEq ; 
22
33#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
4- impl < T ,  U ,  const  N :  usize >  PartialEq < [ U ;  N ] >  for  [ T ;  N ] 
4+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
5+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < [ U ;  N ] >  for  [ T ;  N ] 
56where 
6-     T :  PartialEq < U > , 
7+     T :  ~ const   PartialEq < U > , 
78{ 
89    #[ inline]  
910    fn  eq ( & self ,  other :  & [ U ;  N ] )  -> bool  { 
1617} 
1718
1819#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
19- impl < T ,  U ,  const  N :  usize >  PartialEq < [ U ] >  for  [ T ;  N ] 
20+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
21+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < [ U ] >  for  [ T ;  N ] 
2022where 
21-     T :  PartialEq < U > , 
23+     T :  ~ const   PartialEq < U > , 
2224{ 
2325    #[ inline]  
2426    fn  eq ( & self ,  other :  & [ U ] )  -> bool  { 
3739} 
3840
3941#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
40- impl < T ,  U ,  const  N :  usize >  PartialEq < [ U ;  N ] >  for  [ T ] 
42+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
43+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < [ U ;  N ] >  for  [ T ] 
4144where 
42-     T :  PartialEq < U > , 
45+     T :  ~ const   PartialEq < U > , 
4346{ 
4447    #[ inline]  
4548    fn  eq ( & self ,  other :  & [ U ;  N ] )  -> bool  { 
5861} 
5962
6063#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
61- impl < T ,  U ,  const  N :  usize >  PartialEq < & [ U ] >  for  [ T ;  N ] 
64+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
65+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < & [ U ] >  for  [ T ;  N ] 
6266where 
63-     T :  PartialEq < U > , 
67+     T :  ~ const   PartialEq < U > , 
6468{ 
6569    #[ inline]  
6670    fn  eq ( & self ,  other :  & & [ U ] )  -> bool  { 
7377} 
7478
7579#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
76- impl < T ,  U ,  const  N :  usize >  PartialEq < [ U ;  N ] >  for  & [ T ] 
80+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
81+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < [ U ;  N ] >  for  & [ T ] 
7782where 
78-     T :  PartialEq < U > , 
83+     T :  ~ const   PartialEq < U > , 
7984{ 
8085    #[ inline]  
8186    fn  eq ( & self ,  other :  & [ U ;  N ] )  -> bool  { 
8893} 
8994
9095#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
91- impl < T ,  U ,  const  N :  usize >  PartialEq < & mut  [ U ] >  for  [ T ;  N ] 
96+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
97+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < & mut  [ U ] >  for  [ T ;  N ] 
9298where 
93-     T :  PartialEq < U > , 
99+     T :  ~ const   PartialEq < U > , 
94100{ 
95101    #[ inline]  
96102    fn  eq ( & self ,  other :  & & mut  [ U ] )  -> bool  { 
@@ -103,9 +109,10 @@ where
103109} 
104110
105111#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
106- impl < T ,  U ,  const  N :  usize >  PartialEq < [ U ;  N ] >  for  & mut  [ T ] 
112+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
113+ impl < T ,  U ,  const  N :  usize >  const  PartialEq < [ U ;  N ] >  for  & mut  [ T ] 
107114where 
108-     T :  PartialEq < U > , 
115+     T :  ~ const   PartialEq < U > , 
109116{ 
110117    #[ inline]  
111118    fn  eq ( & self ,  other :  & [ U ;  N ] )  -> bool  { 
@@ -122,14 +129,18 @@ where
122129// __impl_slice_eq2! { [A; $N], &'b mut [B; $N] } 
123130
124131#[ stable( feature = "rust1" ,  since = "1.0.0" ) ]  
125- impl < T :  Eq ,  const  N :  usize >  Eq  for  [ T ;  N ]  { } 
132+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
133+ impl < T :  ~const  Eq ,  const  N :  usize >  const  Eq  for  [ T ;  N ]  { } 
126134
135+ #[ const_trait]  
136+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
127137trait  SpecArrayEq < Other ,  const  N :  usize > :  Sized  { 
128138    fn  spec_eq ( a :  & [ Self ;  N ] ,  b :  & [ Other ;  N ] )  -> bool ; 
129139    fn  spec_ne ( a :  & [ Self ;  N ] ,  b :  & [ Other ;  N ] )  -> bool ; 
130140} 
131141
132- impl < T :  PartialEq < Other > ,  Other ,  const  N :  usize >  SpecArrayEq < Other ,  N >  for  T  { 
142+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
143+ impl < T :  ~const  PartialEq < Other > ,  Other ,  const  N :  usize >  const  SpecArrayEq < Other ,  N >  for  T  { 
133144    default  fn  spec_eq ( a :  & [ Self ;  N ] ,  b :  & [ Other ;  N ] )  -> bool  { 
134145        a[ ..]  == b[ ..] 
135146    } 
@@ -138,7 +149,8 @@ impl<T: PartialEq<Other>, Other, const N: usize> SpecArrayEq<Other, N> for T {
138149    } 
139150} 
140151
141- impl < T :  BytewiseEq < U > ,  U ,  const  N :  usize >  SpecArrayEq < U ,  N >  for  T  { 
152+ #[ rustc_const_unstable( feature = "const_cmp" ,  issue = "143800" ) ]  
153+ impl < T :  ~const  BytewiseEq < U > ,  U ,  const  N :  usize >  const  SpecArrayEq < U ,  N >  for  T  { 
142154    fn  spec_eq ( a :  & [ T ;  N ] ,  b :  & [ U ;  N ] )  -> bool  { 
143155        // SAFETY: Arrays are compared element-wise, and don't add any padding 
144156        // between elements, so when the elements are `BytewiseEq`, we can 
0 commit comments