diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-11-12 12:17:55 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-11-12 12:17:55 -0800 |
| commit | 065e39bb2fd439d792d8a8f72a7182dfc8b7c5a3 (patch) | |
| tree | 7dc0761aee6f0eef769a3a4bbc475d3df7a789f4 /src/libcore/str.rs | |
| parent | e4ead7b034c96b705ec34b8325f5f9f778f1cbb9 (diff) | |
| download | rust-065e39bb2fd439d792d8a8f72a7182dfc8b7c5a3.tar.gz rust-065e39bb2fd439d792d8a8f72a7182dfc8b7c5a3.zip | |
Register new snapshots
Diffstat (limited to 'src/libcore/str.rs')
| -rw-r--r-- | src/libcore/str.rs | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 4c1bfb61709..7e9d414ca53 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -1121,24 +1121,6 @@ pub mod traits { use ops; use str::{Str, StrPrelude, eq_slice}; - // NOTE(stage0): remove impl after a snapshot - #[cfg(stage0)] - impl<'a> Ord for &'a str { - #[inline] - fn cmp(&self, other: & &'a str) -> Ordering { - for (s_b, o_b) in self.bytes().zip(other.bytes()) { - match s_b.cmp(&o_b) { - Greater => return Greater, - Less => return Less, - Equal => () - } - } - - self.len().cmp(&other.len()) - } - } - - #[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl Ord for str { #[inline] fn cmp(&self, other: &str) -> Ordering { @@ -1154,18 +1136,6 @@ pub mod traits { } } - // NOTE(stage0): remove impl after a snapshot - #[cfg(stage0)] - impl<'a> PartialEq for &'a str { - #[inline] - fn eq(&self, other: & &'a str) -> bool { - eq_slice((*self), (*other)) - } - #[inline] - fn ne(&self, other: & &'a str) -> bool { !(*self).eq(other) } - } - - #[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl PartialEq for str { #[inline] fn eq(&self, other: &str) -> bool { @@ -1175,23 +1145,8 @@ pub mod traits { fn ne(&self, other: &str) -> bool { !(*self).eq(other) } } - // NOTE(stage0): remove impl after a snapshot - #[cfg(stage0)] - impl<'a> Eq for &'a str {} - - #[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl Eq for str {} - // NOTE(stage0): remove impl after a snapshot - #[cfg(stage0)] - impl<'a> PartialOrd for &'a str { - #[inline] - fn partial_cmp(&self, other: &&'a str) -> Option<Ordering> { - Some(self.cmp(other)) - } - } - - #[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl PartialOrd for str { #[inline] fn partial_cmp(&self, other: &str) -> Option<Ordering> { |
