Copy path View file
@@ -240,7 +240,7 @@ pub trait FnOnce<Args> {

mod impls {
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> Fn<A> for &'a F
impl<A,F:?Sized> Fn<A> for &F
where F : Fn<A>
{
extern "rust-call" fn call(&self, args: A) -> F::Output {
@@ -249,7 +249,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnMut<A> for &'a F
impl<A,F:?Sized> FnMut<A> for &F
where F : Fn<A>
{
extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output {
@@ -258,7 +258,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnOnce<A> for &'a F
impl<A,F:?Sized> FnOnce<A> for &F
where F : Fn<A>
{
type Output = F::Output;
@@ -269,7 +269,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnMut<A> for &'a mut F
impl<A,F:?Sized> FnMut<A> for &mut F
where F : FnMut<A>
{
extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output {
@@ -278,7 +278,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnOnce<A> for &'a mut F
impl<A,F:?Sized> FnOnce<A> for &mut F
where F : FnMut<A>
{
type Output = F::Output;
Copy path View file
@@ -124,7 +124,7 @@ pub trait Generator {
}

#[unstable(feature = "generator_trait", issue = "43122")]
impl<'a, T> Generator for &'a mut T
impl<T> Generator for &mut T
where T: Generator + ?Sized
{
type Yield = T::Yield;
Copy path View file
@@ -851,7 +851,7 @@ impl<'a, T: ?Sized + 'a> RangeBounds<T> for (Bound<&'a T>, Bound<&'a T>) {
}

#[stable(feature = "collections_range", since = "1.28.0")]
impl<'a, T> RangeBounds<T> for RangeFrom<&'a T> {
impl<T> RangeBounds<T> for RangeFrom<&T> {
fn start_bound(&self) -> Bound<&T> {
Included(self.start)
}
@@ -861,7 +861,7 @@ impl<'a, T> RangeBounds<T> for RangeFrom<&'a T> {
}

#[stable(feature = "collections_range", since = "1.28.0")]
impl<'a, T> RangeBounds<T> for RangeTo<&'a T> {
impl<T> RangeBounds<T> for RangeTo<&T> {
fn start_bound(&self) -> Bound<&T> {
Unbounded
}
@@ -871,7 +871,7 @@ impl<'a, T> RangeBounds<T> for RangeTo<&'a T> {
}

#[stable(feature = "collections_range", since = "1.28.0")]
impl<'a, T> RangeBounds<T> for Range<&'a T> {
impl<T> RangeBounds<T> for Range<&T> {
fn start_bound(&self) -> Bound<&T> {
Included(self.start)
}
@@ -881,7 +881,7 @@ impl<'a, T> RangeBounds<T> for Range<&'a T> {
}

#[stable(feature = "collections_range", since = "1.28.0")]
impl<'a, T> RangeBounds<T> for RangeInclusive<&'a T> {
impl<T> RangeBounds<T> for RangeInclusive<&T> {
fn start_bound(&self) -> Bound<&T> {
Included(self.start)
}
@@ -891,7 +891,7 @@ impl<'a, T> RangeBounds<T> for RangeInclusive<&'a T> {
}

#[stable(feature = "collections_range", since = "1.28.0")]
impl<'a, T> RangeBounds<T> for RangeToInclusive<&'a T> {
impl<T> RangeBounds<T> for RangeToInclusive<&T> {
fn start_bound(&self) -> Bound<&T> {
Unbounded
}
Copy path View file
@@ -1153,18 +1153,18 @@ impl<'a, A> DoubleEndedIterator for Iter<'a, A> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, A> ExactSizeIterator for Iter<'a, A> {}
impl<A> ExactSizeIterator for Iter<'_, A> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, A> FusedIterator for Iter<'a, A> {}
impl<A> FusedIterator for Iter<'_, A> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for Iter<'a, A> {}
unsafe impl<A> TrustedLen for Iter<'_, A> {}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, A> Clone for Iter<'a, A> {
impl<A> Clone for Iter<'_, A> {
#[inline]
fn clone(&self) -> Iter<'a, A> {
fn clone(&self) -> Self {
Iter { inner: self.inner.clone() }
}
}
@@ -1199,12 +1199,12 @@ impl<'a, A> DoubleEndedIterator for IterMut<'a, A> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, A> ExactSizeIterator for IterMut<'a, A> {}
impl<A> ExactSizeIterator for IterMut<'_, A> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, A> FusedIterator for IterMut<'a, A> {}
impl<A> FusedIterator for IterMut<'_, A> {}
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}
unsafe impl<A> TrustedLen for IterMut<'_, A> {}

/// An iterator over the value in [`Some`] variant of an [`Option`].
///
Copy path View file
@@ -133,7 +133,7 @@ impl<'a> PanicInfo<'a> {
}

#[stable(feature = "panic_hook_display", since = "1.26.0")]
impl<'a> fmt::Display for PanicInfo<'a> {
impl fmt::Display for PanicInfo<'_> {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str("panicked at ")?;
if let Some(message) = self.message {
@@ -258,7 +258,7 @@ impl<'a> Location<'a> {
}

#[stable(feature = "panic_hook_display", since = "1.26.0")]
impl<'a> fmt::Display for Location<'a> {
impl fmt::Display for Location<'_> {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
write!(formatter, "{}:{}:{}", self.file, self.line, self.col)
}
Copy path View file
@@ -1098,18 +1098,18 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
impl<T> ExactSizeIterator for Iter<'_, T> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T> FusedIterator for Iter<'a, T> {}
impl<T> FusedIterator for Iter<'_, T> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for Iter<'a, A> {}
unsafe impl<A> TrustedLen for Iter<'_, A> {}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> {
impl<T> Clone for Iter<'_, T> {
#[inline]
fn clone(&self) -> Iter<'a, T> { Iter { inner: self.inner } }
fn clone(&self) -> Self { Iter { inner: self.inner } }
}

/// An iterator over a mutable reference to the [`Ok`] variant of a [`Result`].
@@ -1143,13 +1143,13 @@ impl<'a, T> DoubleEndedIterator for IterMut<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> ExactSizeIterator for IterMut<'a, T> {}
impl<T> ExactSizeIterator for IterMut<'_, T> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T> FusedIterator for IterMut<'a, T> {}
impl<T> FusedIterator for IterMut<'_, T> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, A> TrustedLen for IterMut<'a, A> {}
unsafe impl<A> TrustedLen for IterMut<'_, A> {}

/// An iterator over the value in a [`Ok`] variant of a [`Result`].
///
Copy path View file
@@ -2528,15 +2528,15 @@ impl<T> SliceIndex<[T]> for ops::RangeToInclusive<usize> {
////////////////////////////////////////////////////////////////////////////////

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Default for &'a [T] {
impl<T> Default for &[T] {
/// Creates an empty slice.
fn default() -> &'a [T] { &[] }
fn default() -> Self { &[] }
}

#[stable(feature = "mut_slice_default", since = "1.5.0")]
impl<'a, T> Default for &'a mut [T] {
impl<T> Default for &mut [T] {
/// Creates a mutable empty slice.
fn default() -> &'a mut [T] { &mut [] }
fn default() -> Self { &mut [] }
}

//
@@ -2863,7 +2863,7 @@ pub struct Iter<'a, T: 'a> {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("Iter")
.field(&self.as_slice())
@@ -2872,9 +2872,9 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync> Sync for Iter<'a, T> {}
unsafe impl<T: Sync> Sync for Iter<'_, T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync> Send for Iter<'a, T> {}
unsafe impl<T: Sync> Send for Iter<'_, T> {}

impl<'a, T> Iter<'a, T> {
/// View the underlying data as a subslice of the original data.
@@ -2910,12 +2910,12 @@ impl<'a, T> Iter<'a, T> {
iterator!{struct Iter -> *const T, &'a T, const, /* no mut */}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Iter<'a, T> { Iter { ptr: self.ptr, end: self.end, _marker: self._marker } }
impl<T> Clone for Iter<'_, T> {
fn clone(&self) -> Self { Iter { ptr: self.ptr, end: self.end, _marker: self._marker } }
}

#[stable(feature = "slice_iter_as_ref", since = "1.13.0")]
impl<'a, T> AsRef<[T]> for Iter<'a, T> {
impl<T> AsRef<[T]> for Iter<'_, T> {
fn as_ref(&self) -> &[T] {
self.as_slice()
}
@@ -2955,7 +2955,7 @@ pub struct IterMut<'a, T: 'a> {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> {
impl<T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("IterMut")
.field(&self.make_slice())
@@ -2964,9 +2964,9 @@ impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync> Sync for IterMut<'a, T> {}
unsafe impl<T: Sync> Sync for IterMut<'_, T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Send> Send for IterMut<'a, T> {}
unsafe impl<T: Send> Send for IterMut<'_, T> {}

impl<'a, T> IterMut<'a, T> {
/// View the underlying data as a subslice of the original data.
@@ -3034,7 +3034,7 @@ pub struct Split<'a, T:'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for Split<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for Split<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Split")
.field("v", &self.v)
@@ -3045,8 +3045,8 @@ impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for Split<'a, T, P> where P: FnMut(&T

// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T, P> Clone for Split<'a, T, P> where P: Clone + FnMut(&T) -> bool {
fn clone(&self) -> Split<'a, T, P> {
impl<T, P> Clone for Split<'_, T, P> where P: Clone + FnMut(&T) -> bool {
fn clone(&self) -> Self {
Split {
v: self.v,
pred: self.pred.clone(),
@@ -3108,7 +3108,7 @@ impl<'a, T, P> SplitIter for Split<'a, T, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T, P> FusedIterator for Split<'a, T, P> where P: FnMut(&T) -> bool {}
impl<T, P> FusedIterator for Split<'_, T, P> where P: FnMut(&T) -> bool {}

/// An iterator over the subslices of the vector which are separated
/// by elements that match `pred`.
@@ -3125,7 +3125,7 @@ pub struct SplitMut<'a, T:'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitMut<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for SplitMut<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("SplitMut")
.field("v", &self.v)
@@ -3206,7 +3206,7 @@ impl<'a, T, P> DoubleEndedIterator for SplitMut<'a, T, P> where
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T, P> FusedIterator for SplitMut<'a, T, P> where P: FnMut(&T) -> bool {}
impl<T, P> FusedIterator for SplitMut<'_, T, P> where P: FnMut(&T) -> bool {}

/// An iterator over subslices separated by elements that match a predicate
/// function, starting from the end of the slice.
@@ -3222,7 +3222,7 @@ pub struct RSplit<'a, T:'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "slice_rsplit", since = "1.27.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplit<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for RSplit<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("RSplit")
.field("v", &self.inner.v)
@@ -3263,7 +3263,7 @@ impl<'a, T, P> SplitIter for RSplit<'a, T, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "slice_rsplit", since = "1.27.0")]
impl<'a, T, P> FusedIterator for RSplit<'a, T, P> where P: FnMut(&T) -> bool {}
impl<T, P> FusedIterator for RSplit<'_, T, P> where P: FnMut(&T) -> bool {}

/// An iterator over the subslices of the vector which are separated
/// by elements that match `pred`, starting from the end of the slice.
@@ -3278,7 +3278,7 @@ pub struct RSplitMut<'a, T:'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "slice_rsplit", since = "1.27.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitMut<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for RSplitMut<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("RSplitMut")
.field("v", &self.inner.v)
@@ -3321,7 +3321,7 @@ impl<'a, T, P> DoubleEndedIterator for RSplitMut<'a, T, P> where
}

#[stable(feature = "slice_rsplit", since = "1.27.0")]
impl<'a, T, P> FusedIterator for RSplitMut<'a, T, P> where P: FnMut(&T) -> bool {}
impl<T, P> FusedIterator for RSplitMut<'_, T, P> where P: FnMut(&T) -> bool {}

/// An private iterator over subslices separated by elements that
/// match a predicate function, splitting at most a fixed number of
@@ -3364,7 +3364,7 @@ pub struct SplitN<'a, T: 'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitN<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for SplitN<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("SplitN")
.field("inner", &self.inner)
@@ -3386,7 +3386,7 @@ pub struct RSplitN<'a, T: 'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitN<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for RSplitN<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("RSplitN")
.field("inner", &self.inner)
@@ -3407,7 +3407,7 @@ pub struct SplitNMut<'a, T: 'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for SplitNMut<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for SplitNMut<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("SplitNMut")
.field("inner", &self.inner)
@@ -3429,7 +3429,7 @@ pub struct RSplitNMut<'a, T: 'a, P> where P: FnMut(&T) -> bool {
}

#[stable(feature = "core_impl_debug", since = "1.9.0")]
impl<'a, T: 'a + fmt::Debug, P> fmt::Debug for RSplitNMut<'a, T, P> where P: FnMut(&T) -> bool {
impl<T: fmt::Debug, P> fmt::Debug for RSplitNMut<'_, T, P> where P: FnMut(&T) -> bool {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("RSplitNMut")
.field("inner", &self.inner)
@@ -3482,8 +3482,8 @@ pub struct Windows<'a, T:'a> {

// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Windows<'a, T> {
fn clone(&self) -> Windows<'a, T> {
impl<T> Clone for Windows<'_, T> {
fn clone(&self) -> Self {
Windows {
v: self.v,
size: self.size,
@@ -3560,13 +3560,13 @@ impl<'a, T> DoubleEndedIterator for Windows<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> ExactSizeIterator for Windows<'a, T> {}
impl<T> ExactSizeIterator for Windows<'_, T> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for Windows<'a, T> {}
unsafe impl<T> TrustedLen for Windows<'_, T> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T> FusedIterator for Windows<'a, T> {}
impl<T> FusedIterator for Windows<'_, T> {}

#[doc(hidden)]
unsafe impl<'a, T> TrustedRandomAccess for Windows<'a, T> {
@@ -3595,8 +3595,8 @@ pub struct Chunks<'a, T:'a> {

// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Chunks<'a, T> {
fn clone(&self) -> Chunks<'a, T> {
impl<T> Clone for Chunks<'_, T> {
fn clone(&self) -> Self {
Chunks {
v: self.v,
chunk_size: self.chunk_size,
@@ -3682,13 +3682,13 @@ impl<'a, T> DoubleEndedIterator for Chunks<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> ExactSizeIterator for Chunks<'a, T> {}
impl<T> ExactSizeIterator for Chunks<'_, T> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for Chunks<'a, T> {}
unsafe impl<T> TrustedLen for Chunks<'_, T> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T> FusedIterator for Chunks<'a, T> {}
impl<T> FusedIterator for Chunks<'_, T> {}

#[doc(hidden)]
unsafe impl<'a, T> TrustedRandomAccess for Chunks<'a, T> {
@@ -3801,13 +3801,13 @@ impl<'a, T> DoubleEndedIterator for ChunksMut<'a, T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> ExactSizeIterator for ChunksMut<'a, T> {}
impl<T> ExactSizeIterator for ChunksMut<'_, T> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for ChunksMut<'a, T> {}
unsafe impl<T> TrustedLen for ChunksMut<'_, T> {}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a, T> FusedIterator for ChunksMut<'a, T> {}
impl<T> FusedIterator for ChunksMut<'_, T> {}

#[doc(hidden)]
unsafe impl<'a, T> TrustedRandomAccess for ChunksMut<'a, T> {
@@ -3854,8 +3854,8 @@ impl<'a, T> ChunksExact<'a, T> {

// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[unstable(feature = "chunks_exact", issue = "47115")]
impl<'a, T> Clone for ChunksExact<'a, T> {
fn clone(&self) -> ChunksExact<'a, T> {
impl<T> Clone for ChunksExact<'_, T> {
fn clone(&self) -> Self {
ChunksExact {
v: self.v,
rem: self.rem,
@@ -3924,17 +3924,17 @@ impl<'a, T> DoubleEndedIterator for ChunksExact<'a, T> {
}

#[unstable(feature = "chunks_exact", issue = "47115")]
impl<'a, T> ExactSizeIterator for ChunksExact<'a, T> {
impl<T> ExactSizeIterator for ChunksExact<'_, T> {
fn is_empty(&self) -> bool {
self.v.is_empty()
}
}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for ChunksExact<'a, T> {}
unsafe impl<T> TrustedLen for ChunksExact<'_, T> {}

#[unstable(feature = "chunks_exact", issue = "47115")]
impl<'a, T> FusedIterator for ChunksExact<'a, T> {}
impl<T> FusedIterator for ChunksExact<'_, T> {}

#[doc(hidden)]
unsafe impl<'a, T> TrustedRandomAccess for ChunksExact<'a, T> {
@@ -4039,17 +4039,17 @@ impl<'a, T> DoubleEndedIterator for ChunksExactMut<'a, T> {
}

#[unstable(feature = "chunks_exact", issue = "47115")]
impl<'a, T> ExactSizeIterator for ChunksExactMut<'a, T> {
impl<T> ExactSizeIterator for ChunksExactMut<'_, T> {
fn is_empty(&self) -> bool {
self.v.is_empty()
}
}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a, T> TrustedLen for ChunksExactMut<'a, T> {}
unsafe impl<T> TrustedLen for ChunksExactMut<'_, T> {}

#[unstable(feature = "chunks_exact", issue = "47115")]
impl<'a, T> FusedIterator for ChunksExactMut<'a, T> {}
impl<T> FusedIterator for ChunksExactMut<'_, T> {}

#[doc(hidden)]
unsafe impl<'a, T> TrustedRandomAccess for ChunksExactMut<'a, T> {
Copy path View file
@@ -617,7 +617,7 @@ impl<'a> DoubleEndedIterator for Chars<'a> {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a> FusedIterator for Chars<'a> {}
impl FusedIterator for Chars<'_> {}

impl<'a> Chars<'a> {
/// View the underlying data as a subslice of the original data.
@@ -707,7 +707,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a> FusedIterator for CharIndices<'a> {}
impl FusedIterator for CharIndices<'_> {}

impl<'a> CharIndices<'a> {
/// View the underlying data as a subslice of the original data.
@@ -733,7 +733,7 @@ impl<'a> CharIndices<'a> {
pub struct Bytes<'a>(Cloned<slice::Iter<'a, u8>>);

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> Iterator for Bytes<'a> {
impl Iterator for Bytes<'_> {
type Item = u8;

#[inline]
@@ -794,7 +794,7 @@ impl<'a> Iterator for Bytes<'a> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> DoubleEndedIterator for Bytes<'a> {
impl DoubleEndedIterator for Bytes<'_> {
#[inline]
fn next_back(&mut self) -> Option<u8> {
self.0.next_back()
@@ -809,7 +809,7 @@ impl<'a> DoubleEndedIterator for Bytes<'a> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> ExactSizeIterator for Bytes<'a> {
impl ExactSizeIterator for Bytes<'_> {
#[inline]
fn len(&self) -> usize {
self.0.len()
@@ -822,10 +822,10 @@ impl<'a> ExactSizeIterator for Bytes<'a> {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a> FusedIterator for Bytes<'a> {}
impl FusedIterator for Bytes<'_> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<'a> TrustedLen for Bytes<'a> {}
unsafe impl TrustedLen for Bytes<'_> {}

#[doc(hidden)]
unsafe impl<'a> TrustedRandomAccess for Bytes<'a> {
@@ -1342,7 +1342,7 @@ impl<'a> DoubleEndedIterator for Lines<'a> {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a> FusedIterator for Lines<'a> {}
impl FusedIterator for Lines<'_> {}

/// Created with the method [`lines_any`].
///
@@ -1409,7 +1409,7 @@ impl<'a> DoubleEndedIterator for LinesAny<'a> {

#[stable(feature = "fused", since = "1.26.0")]
#[allow(deprecated)]
impl<'a> FusedIterator for LinesAny<'a> {}
impl FusedIterator for LinesAny<'_> {}

/*
Section: UTF-8 validation
@@ -4033,15 +4033,15 @@ impl AsRef<[u8]> for str {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> Default for &'a str {
impl Default for &str {
/// Creates an empty str
fn default() -> &'a str { "" }
fn default() -> Self { "" }
}

#[stable(feature = "default_mut_str", since = "1.28.0")]
impl<'a> Default for &'a mut str {
impl Default for &mut str {
/// Creates an empty mutable str
fn default() -> &'a mut str { unsafe { from_utf8_unchecked_mut(&mut []) } }
fn default() -> Self { unsafe { from_utf8_unchecked_mut(&mut []) } }
}

/// An iterator over the non-whitespace substrings of a string,
@@ -4189,7 +4189,7 @@ impl<'a> DoubleEndedIterator for SplitWhitespace<'a> {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a> FusedIterator for SplitWhitespace<'a> {}
impl FusedIterator for SplitWhitespace<'_> {}

#[unstable(feature = "split_ascii_whitespace", issue = "48656")]
impl<'a> Iterator for SplitAsciiWhitespace<'a> {
@@ -4215,7 +4215,7 @@ impl<'a> DoubleEndedIterator for SplitAsciiWhitespace<'a> {
}

#[unstable(feature = "split_ascii_whitespace", issue = "48656")]
impl<'a> FusedIterator for SplitAsciiWhitespace<'a> {}
impl FusedIterator for SplitAsciiWhitespace<'_> {}

/// An iterator of [`u16`] over the string encoded as UTF-16.
///
@@ -4234,7 +4234,7 @@ pub struct EncodeUtf16<'a> {
}

#[stable(feature = "collection_debug", since = "1.17.0")]
impl<'a> fmt::Debug for EncodeUtf16<'a> {
impl fmt::Debug for EncodeUtf16<'_> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.pad("EncodeUtf16 { .. }")
}
@@ -4273,4 +4273,4 @@ impl<'a> Iterator for EncodeUtf16<'a> {
}

#[stable(feature = "fused", since = "1.26.0")]
impl<'a> FusedIterator for EncodeUtf16<'a> {}
impl FusedIterator for EncodeUtf16<'_> {}
Copy path View file
@@ -491,7 +491,7 @@ impl<F> MultiCharEq for F where F: FnMut(char) -> bool {
fn matches(&mut self, c: char) -> bool { (*self)(c) }
}

impl<'a> MultiCharEq for &'a [char] {
impl MultiCharEq for &[char] {
#[inline]
fn matches(&mut self, c: char) -> bool {
self.iter().any(|&m| { m == c })
@@ -666,7 +666,7 @@ impl<'a, 'b> Pattern<'a> for &'b [char] {
pub struct CharPredicateSearcher<'a, F>(<MultiCharEqPattern<F> as Pattern<'a>>::Searcher)
where F: FnMut(char) -> bool;

impl<'a, F> fmt::Debug for CharPredicateSearcher<'a, F>
impl<F> fmt::Debug for CharPredicateSearcher<'_, F>
where F: FnMut(char) -> bool
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Copy path View file
@@ -229,7 +229,7 @@ fn test_iterator_step_by_nth_overflow() {

#[derive(Clone)]
struct Test(Bigger);
impl<'a> Iterator for &'a mut Test {
impl Iterator for &mut Test {
type Item = i32;
fn next(&mut self) -> Option<Self::Item> { Some(21) }
fn nth(&mut self, n: usize) -> Option<Self::Item> {
Copy path View file
@@ -19,6 +19,7 @@
#![feature(flt2dec)]
#![feature(fmt_internals)]
#![feature(hashmap_internals)]
#![feature(impl_header_lifetime_elision)]
#![feature(pattern)]
#![feature(range_is_empty)]
#![feature(raw)]
Copy path View file
@@ -14,7 +14,7 @@ LL | impl Copy for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<'a, T> std::marker::Copy for &'a T
- impl<'_, T> std::marker::Copy for &T

This comment has been minimized.

@dtolnay

dtolnay Sep 30, 2018

Member

This line is not valid syntax. I filed #54690 to follow up.

where T: ?Sized;

error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
@@ -24,7 +24,7 @@ LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<'a, T> std::marker::Copy for &'a T
- impl<'_, T> std::marker::Copy for &T
where T: ?Sized;

error[E0206]: the trait `Copy` may not be implemented for this type
Copy path View file
@@ -5,7 +5,7 @@ LL | impl<Foo> Deref for Foo { } //~ ERROR must be used
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<'a, T> std::ops::Deref for &'a T
- impl<'_, T> std::ops::Deref for &T
where T: ?Sized;

error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct<Foo>`)