@@ -2342,12 +2342,12 @@ impl<'a, T: 'a + Copy> Extend<&'a T> for Vec<T> {
2342
2342
}
2343
2343
2344
2344
macro_rules! __impl_slice_eq1 {
2345
- ( [ $( $vars: tt) * ] $lhs: ty, $rhs: ty, $( $constraints : tt ) * ) => {
2346
- #[ stable ( feature = "rust1" , since = "1.0.0" ) ]
2345
+ ( [ $( $vars: tt) * ] $lhs: ty, $rhs: ty $( where $ty : ty : $bound : ident ) ? , # [ $stability : meta ] ) => {
2346
+ #[ $stability ]
2347
2347
impl <A , B , $( $vars) * > PartialEq <$rhs> for $lhs
2348
2348
where
2349
2349
A : PartialEq <B >,
2350
- $( $constraints ) *
2350
+ $( $ty : $bound ) ?
2351
2351
{
2352
2352
#[ inline]
2353
2353
fn eq( & self , other: & $rhs) -> bool { self [ ..] == other[ ..] }
@@ -2357,18 +2357,23 @@ macro_rules! __impl_slice_eq1 {
2357
2357
}
2358
2358
}
2359
2359
2360
- __impl_slice_eq1 ! { [ ] Vec <A >, Vec <B >, }
2361
- __impl_slice_eq1 ! { [ ] Vec <A >, & [ B ] , }
2362
- __impl_slice_eq1 ! { [ ] Vec <A >, & mut [ B ] , }
2363
- __impl_slice_eq1 ! { [ ] Cow <' _, [ A ] >, Vec <B >, A : Clone }
2364
- __impl_slice_eq1 ! { [ ] Cow <' _, [ A ] >, & [ B ] , A : Clone }
2365
- __impl_slice_eq1 ! { [ ] Cow <' _, [ A ] >, & mut [ B ] , A : Clone }
2366
- __impl_slice_eq1 ! { [ const N : usize ] Vec <A >, [ B ; N ] , [ B ; N ] : LengthAtMost32 }
2367
- __impl_slice_eq1 ! { [ const N : usize ] Vec <A >, & [ B ; N ] , [ B ; N ] : LengthAtMost32 }
2360
+ __impl_slice_eq1 ! { [ ] Vec <A >, Vec <B >, #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2361
+ __impl_slice_eq1 ! { [ ] Vec <A >, & [ B ] , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2362
+ __impl_slice_eq1 ! { [ ] Vec <A >, & mut [ B ] , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2363
+ __impl_slice_eq1 ! { [ ] & [ A ] , Vec <B >, #[ stable( feature = "partialeq_vec_for_ref_slice" , since = "1.46.0" ) ] }
2364
+ __impl_slice_eq1 ! { [ ] & mut [ A ] , Vec <B >, #[ stable( feature = "partialeq_vec_for_ref_slice" , since = "1.46.0" ) ] }
2365
+ __impl_slice_eq1 ! { [ ] Cow <' _, [ A ] >, Vec <B > where A : Clone , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2366
+ __impl_slice_eq1 ! { [ ] Cow <' _, [ A ] >, & [ B ] where A : Clone , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2367
+ __impl_slice_eq1 ! { [ ] Cow <' _, [ A ] >, & mut [ B ] where A : Clone , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2368
+ __impl_slice_eq1 ! { [ const N : usize ] Vec <A >, [ B ; N ] where [ B ; N ] : LengthAtMost32 , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2369
+ __impl_slice_eq1 ! { [ const N : usize ] Vec <A >, & [ B ; N ] where [ B ; N ] : LengthAtMost32 , #[ stable( feature = "rust1" , since = "1.0.0" ) ] }
2368
2370
2369
2371
// NOTE: some less important impls are omitted to reduce code bloat
2370
2372
// FIXME(Centril): Reconsider this?
2371
2373
//__impl_slice_eq1! { [const N: usize] Vec<A>, &mut [B; N], [B; N]: LengthAtMost32 }
2374
+ //__impl_slice_eq1! { [const N: usize] [A; N], Vec<B>, [A; N]: LengthAtMost32 }
2375
+ //__impl_slice_eq1! { [const N: usize] &[A; N], Vec<B>, [A; N]: LengthAtMost32 }
2376
+ //__impl_slice_eq1! { [const N: usize] &mut [A; N], Vec<B>, [A; N]: LengthAtMost32 }
2372
2377
//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, [B; N], [B; N]: LengthAtMost32 }
2373
2378
//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &[B; N], [B; N]: LengthAtMost32 }
2374
2379
//__impl_slice_eq1! { [const N: usize] Cow<'a, [A]>, &mut [B; N], [B; N]: LengthAtMost32 }
0 commit comments