diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index c52e88170ae..ae243f3f246 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -16,9 +16,8 @@ #![stable(feature = "rust1", since = "1.0.0")] -// FIXME: replace remaining ... by ..= after next stage0 -// Silence warning: "... is being replaced by ..=" -#![cfg_attr(not(stage0), allow(warnings))] +// FIXME: after next stage0, change RangeInclusive { ... } back to ..= +use ops::RangeInclusive; // How this module is organized. // @@ -1048,32 +1047,32 @@ impl SliceIndex<[T]> for ops::RangeToInclusive { #[inline] fn get(self, slice: &[T]) -> Option<&[T]> { - (0...self.end).get(slice) + (RangeInclusive { start: 0, end: self.end }).get(slice) } #[inline] fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]> { - (0...self.end).get_mut(slice) + (RangeInclusive { start: 0, end: self.end }).get_mut(slice) } #[inline] unsafe fn get_unchecked(self, slice: &[T]) -> &[T] { - (0...self.end).get_unchecked(slice) + (RangeInclusive { start: 0, end: self.end }).get_unchecked(slice) } #[inline] unsafe fn get_unchecked_mut(self, slice: &mut [T]) -> &mut [T] { - (0...self.end).get_unchecked_mut(slice) + (RangeInclusive { start: 0, end: self.end }).get_unchecked_mut(slice) } #[inline] fn index(self, slice: &[T]) -> &[T] { - (0...self.end).index(slice) + (RangeInclusive { start: 0, end: self.end }).index(slice) } #[inline] fn index_mut(self, slice: &mut [T]) -> &mut [T] { - (0...self.end).index_mut(slice) + (RangeInclusive { start: 0, end: self.end }).index_mut(slice) } }