diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 10:08:40 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-27 10:08:40 -0700 |
| commit | 956c2eb257a4ac69371144e64be3e8c7cce8cb07 (patch) | |
| tree | 10ff68950ad7982fdc0a77a82f979234fbd0f1a8 /src/libstd/sys | |
| parent | 169231dc83b3078fd19d193ff422628f03e20a44 (diff) | |
| parent | 36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157 (diff) | |
| download | rust-956c2eb257a4ac69371144e64be3e8c7cce8cb07.tar.gz rust-956c2eb257a4ac69371144e64be3e8c7cce8cb07.zip | |
rollup merge of #23738: alexcrichton/snapshots
Conflicts: src/libcollections/vec.rs
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 9f3dae34c7a..0d83e4497f7 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -634,30 +634,6 @@ impl Wtf8 { /// /// Panics when `begin` and `end` do not point to code point boundaries, /// or point beyond the end of the string. -#[cfg(stage0)] -impl ops::Index<ops::Range<usize>> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, range: &ops::Range<usize>) -> &Wtf8 { - // is_code_point_boundary checks that the index is in [0, .len()] - if range.start <= range.end && - is_code_point_boundary(self, range.start) && - is_code_point_boundary(self, range.end) { - unsafe { slice_unchecked(self, range.start, range.end) } - } else { - slice_error_fail(self, range.start, range.end) - } - } -} - -/// Return a slice of the given string for the byte range [`begin`..`end`). -/// -/// # Panics -/// -/// Panics when `begin` and `end` do not point to code point boundaries, -/// or point beyond the end of the string. -#[cfg(not(stage0))] impl ops::Index<ops::Range<usize>> for Wtf8 { type Output = Wtf8; @@ -680,28 +656,6 @@ impl ops::Index<ops::Range<usize>> for Wtf8 { /// /// Panics when `begin` is not at a code point boundary, /// or is beyond the end of the string. -#[cfg(stage0)] -impl ops::Index<ops::RangeFrom<usize>> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, range: &ops::RangeFrom<usize>) -> &Wtf8 { - // is_code_point_boundary checks that the index is in [0, .len()] - if is_code_point_boundary(self, range.start) { - unsafe { slice_unchecked(self, range.start, self.len()) } - } else { - slice_error_fail(self, range.start, self.len()) - } - } -} - -/// Return a slice of the given string from byte `begin` to its end. -/// -/// # Panics -/// -/// Panics when `begin` is not at a code point boundary, -/// or is beyond the end of the string. -#[cfg(not(stage0))] impl ops::Index<ops::RangeFrom<usize>> for Wtf8 { type Output = Wtf8; @@ -722,28 +676,6 @@ impl ops::Index<ops::RangeFrom<usize>> for Wtf8 { /// /// Panics when `end` is not at a code point boundary, /// or is beyond the end of the string. -#[cfg(stage0)] -impl ops::Index<ops::RangeTo<usize>> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, range: &ops::RangeTo<usize>) -> &Wtf8 { - // is_code_point_boundary checks that the index is in [0, .len()] - if is_code_point_boundary(self, range.end) { - unsafe { slice_unchecked(self, 0, range.end) } - } else { - slice_error_fail(self, 0, range.end) - } - } -} - -/// Return a slice of the given string from its beginning to byte `end`. -/// -/// # Panics -/// -/// Panics when `end` is not at a code point boundary, -/// or is beyond the end of the string. -#[cfg(not(stage0))] impl ops::Index<ops::RangeTo<usize>> for Wtf8 { type Output = Wtf8; @@ -758,17 +690,6 @@ impl ops::Index<ops::RangeTo<usize>> for Wtf8 { } } -#[cfg(stage0)] -impl ops::Index<ops::RangeFull> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, _range: &ops::RangeFull) -> &Wtf8 { - self - } -} - -#[cfg(not(stage0))] impl ops::Index<ops::RangeFull> for Wtf8 { type Output = Wtf8; |
