@@ -103,6 +103,8 @@ mod is_zero;
103
103
104
104
mod source_iter_marker;
105
105
106
+ mod partial_eq;
107
+
106
108
/// A contiguous growable array type, written `Vec<T>` but pronounced 'vector'.
107
109
///
108
110
/// # Examples
@@ -2615,45 +2617,6 @@ impl<'a, T: Copy + 'a, A: Allocator + 'a> Extend<&'a T> for Vec<T, A> {
2615
2617
}
2616
2618
}
2617
2619
2618
- macro_rules! __impl_slice_eq1 {
2619
- ( [ $( $vars: tt) * ] $lhs: ty, $rhs: ty $( where $ty: ty: $bound: ident) ?, #[ $stability: meta] ) => {
2620
- #[ $stability]
2621
- impl <T , U , $( $vars) * > PartialEq <$rhs> for $lhs
2622
- where
2623
- T : PartialEq <U >,
2624
- $( $ty: $bound) ?
2625
- {
2626
- #[ inline]
2627
- fn eq( & self , other: & $rhs) -> bool { self [ ..] == other[ ..] }
2628
- #[ inline]
2629
- fn ne( & self , other: & $rhs) -> bool { self [ ..] != other[ ..] }
2630
- }
2631
- }
2632
- }
2633
-
2634
- __impl_slice_eq1 ! { [ A : Allocator ] Vec <T , A >, Vec <U , A >, #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2635
- __impl_slice_eq1 ! { [ A : Allocator ] Vec <T , A >, & [ U ] , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2636
- __impl_slice_eq1 ! { [ A : Allocator ] Vec <T , A >, & mut [ U ] , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2637
- __impl_slice_eq1 ! { [ A : Allocator ] & [ T ] , Vec <U , A >, #[ stable( feature = "partialeq_vec_for_ref_slice" , since = "1.46.0" ) ] }
2638
- __impl_slice_eq1 ! { [ A : Allocator ] & mut [ T ] , Vec <U , A >, #[ stable( feature = "partialeq_vec_for_ref_slice" , since = "1.46.0" ) ] }
2639
- __impl_slice_eq1 ! { [ A : Allocator ] Vec <T , A >, [ U ] , #[ stable( feature = "partialeq_vec_for_slice" , since = "1.48.0" ) ] }
2640
- __impl_slice_eq1 ! { [ A : Allocator ] [ T ] , Vec <U , A >, #[ stable( feature = "partialeq_vec_for_slice" , since = "1.48.0" ) ] }
2641
- __impl_slice_eq1 ! { [ A : Allocator ] Cow <' _, [ T ] >, Vec <U , A > where T : Clone , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2642
- __impl_slice_eq1 ! { [ ] Cow <' _, [ T ] >, & [ U ] where T : Clone , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2643
- __impl_slice_eq1 ! { [ ] Cow <' _, [ T ] >, & mut [ U ] where T : Clone , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2644
- __impl_slice_eq1 ! { [ A : Allocator , const N : usize ] Vec <T , A >, [ U ; N ] , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2645
- __impl_slice_eq1 ! { [ A : Allocator , const N : usize ] Vec <T , A >, & [ U ; N ] , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2646
-
2647
- // NOTE: some less important impls are omitted to reduce code bloat
2648
- // FIXME(Centril): Reconsider this?
2649
- //__impl_slice_eq1! { [const N: usize] Vec<A>, &mut [B; N], }
2650
- //__impl_slice_eq1! { [const N: usize] [A; N], Vec<B>, }
2651
- //__impl_slice_eq1! { [const N: usize] &[A; N], Vec<B>, }
2652
- //__impl_slice_eq1! { [const N: usize] &mut [A; N], Vec<B>, }
2653
- //__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, [B; N], }
2654
- //__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &[B; N], }
2655
- //__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &mut [B; N], }
2656
-
2657
2620
/// Implements comparison of vectors, [lexicographically](core::cmp::Ord#lexicographical-comparison).
2658
2621
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2659
2622
impl < T : PartialOrd , A : Allocator > PartialOrd for Vec < T , A > {
0 commit comments