@@ -14,6 +14,7 @@ use crate::mem::{self, MaybeUninit};
1414use crate :: ops:: { Index , IndexMut } ;
1515use crate :: slice:: { Iter , IterMut } ;
1616
17+ mod equality;
1718mod iter;
1819
1920#[ stable( feature = "array_value_iter" , since = "1.51.0" ) ]
@@ -230,118 +231,6 @@ where
230231 }
231232}
232233
233- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
234- impl < A , B , const N : usize > PartialEq < [ B ; N ] > for [ A ; N ]
235- where
236- A : PartialEq < B > ,
237- {
238- #[ inline]
239- fn eq ( & self , other : & [ B ; N ] ) -> bool {
240- self [ ..] == other[ ..]
241- }
242- #[ inline]
243- fn ne ( & self , other : & [ B ; N ] ) -> bool {
244- self [ ..] != other[ ..]
245- }
246- }
247-
248- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
249- impl < A , B , const N : usize > PartialEq < [ B ] > for [ A ; N ]
250- where
251- A : PartialEq < B > ,
252- {
253- #[ inline]
254- fn eq ( & self , other : & [ B ] ) -> bool {
255- self [ ..] == other[ ..]
256- }
257- #[ inline]
258- fn ne ( & self , other : & [ B ] ) -> bool {
259- self [ ..] != other[ ..]
260- }
261- }
262-
263- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
264- impl < A , B , const N : usize > PartialEq < [ A ; N ] > for [ B ]
265- where
266- B : PartialEq < A > ,
267- {
268- #[ inline]
269- fn eq ( & self , other : & [ A ; N ] ) -> bool {
270- self [ ..] == other[ ..]
271- }
272- #[ inline]
273- fn ne ( & self , other : & [ A ; N ] ) -> bool {
274- self [ ..] != other[ ..]
275- }
276- }
277-
278- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
279- impl < A , B , const N : usize > PartialEq < & [ B ] > for [ A ; N ]
280- where
281- A : PartialEq < B > ,
282- {
283- #[ inline]
284- fn eq ( & self , other : & & [ B ] ) -> bool {
285- self [ ..] == other[ ..]
286- }
287- #[ inline]
288- fn ne ( & self , other : & & [ B ] ) -> bool {
289- self [ ..] != other[ ..]
290- }
291- }
292-
293- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
294- impl < A , B , const N : usize > PartialEq < [ A ; N ] > for & [ B ]
295- where
296- B : PartialEq < A > ,
297- {
298- #[ inline]
299- fn eq ( & self , other : & [ A ; N ] ) -> bool {
300- self [ ..] == other[ ..]
301- }
302- #[ inline]
303- fn ne ( & self , other : & [ A ; N ] ) -> bool {
304- self [ ..] != other[ ..]
305- }
306- }
307-
308- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
309- impl < A , B , const N : usize > PartialEq < & mut [ B ] > for [ A ; N ]
310- where
311- A : PartialEq < B > ,
312- {
313- #[ inline]
314- fn eq ( & self , other : & & mut [ B ] ) -> bool {
315- self [ ..] == other[ ..]
316- }
317- #[ inline]
318- fn ne ( & self , other : & & mut [ B ] ) -> bool {
319- self [ ..] != other[ ..]
320- }
321- }
322-
323- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
324- impl < A , B , const N : usize > PartialEq < [ A ; N ] > for & mut [ B ]
325- where
326- B : PartialEq < A > ,
327- {
328- #[ inline]
329- fn eq ( & self , other : & [ A ; N ] ) -> bool {
330- self [ ..] == other[ ..]
331- }
332- #[ inline]
333- fn ne ( & self , other : & [ A ; N ] ) -> bool {
334- self [ ..] != other[ ..]
335- }
336- }
337-
338- // NOTE: some less important impls are omitted to reduce code bloat
339- // __impl_slice_eq2! { [A; $N], &'b [B; $N] }
340- // __impl_slice_eq2! { [A; $N], &'b mut [B; $N] }
341-
342- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
343- impl < T : Eq , const N : usize > Eq for [ T ; N ] { }
344-
345234#[ stable( feature = "rust1" , since = "1.0.0" ) ]
346235impl < T : PartialOrd , const N : usize > PartialOrd for [ T ; N ] {
347236 #[ inline]
0 commit comments