diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 06462fd96d9a9d16a2e966bbf1a58677b88887fa..f16cac05ea03993f6ce314ae289a6a8caec8b69c 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -1639,7 +1639,7 @@ pub fn resize_default(&mut self, new_len: usize) { } } -// This code generalises `extend_with_{element,default}`. +// This code generalizes `extend_with_{element,default}`. trait ExtendWith { fn next(&mut self) -> T; fn last(self) -> T; @@ -1837,7 +1837,7 @@ unsafe trait IsZero { } macro_rules! impl_is_zero { - ($t: ty, $is_zero: expr) => { + ($t:ty, $is_zero:expr) => { unsafe impl IsZero for $t { #[inline] fn is_zero(&self) -> bool { @@ -2362,9 +2362,9 @@ fn ne(&self, other: &$rhs) -> bool { self[..] != other[..] } __impl_slice_eq1! { [] Vec, Vec, } __impl_slice_eq1! { [] Vec, &[B], } __impl_slice_eq1! { [] Vec, &mut [B], } +__impl_slice_eq1! { [] Cow<'_, [A]>, Vec, A: Clone } __impl_slice_eq1! { [] Cow<'_, [A]>, &[B], A: Clone } __impl_slice_eq1! { [] Cow<'_, [A]>, &mut [B], A: Clone } -__impl_slice_eq1! { [] Cow<'_, [A]>, Vec, A: Clone } __impl_slice_eq1! { [const N: usize] Vec, [B; N], [B; N]: LengthAtMost32 } __impl_slice_eq1! { [const N: usize] Vec, &[B; N], [B; N]: LengthAtMost32 }