diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-24 18:13:54 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 09:57:05 -0700 |
| commit | 36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157 (patch) | |
| tree | 7769ba1cae0d202a55b219efb2a04032f3bf70eb /src/libstd | |
| parent | 557d4346a26266d2eb13f6b0adf106b8873b0da1 (diff) | |
| download | rust-36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157.tar.gz rust-36ef29abf7fa14dc9361d6b30ff7f8d18bfb4157.zip | |
Register new snapshots
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 16 | ||||
| -rw-r--r-- | src/libstd/ffi/os_str.rs | 12 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 6 | ||||
| -rw-r--r-- | src/libstd/old_io/mem.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 79 |
5 files changed, 4 insertions, 111 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index f9558b85825..91f53cb2987 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1247,22 +1247,6 @@ impl<K, V, S> Default for HashMap<K, V, S> } } -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl<K, Q: ?Sized, V, S> Index<Q> for HashMap<K, V, S> - where K: Eq + Hash + Borrow<Q>, - Q: Eq + Hash, - S: HashState, -{ - type Output = V; - - #[inline] - fn index<'a>(&'a self, index: &Q) -> &'a V { - self.get(index).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S> where K: Eq + Hash + Borrow<Q>, diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 5851c6e2998..99cbd26bcd1 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -133,18 +133,6 @@ impl<'a> From<&'a OsStr> for OsString { } } -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl ops::Index<ops::RangeFull> for OsString { - type Output = OsStr; - - #[inline] - fn index(&self, _index: &ops::RangeFull) -> &OsStr { - unsafe { mem::transmute(self.inner.as_slice()) } - } -} - -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index<ops::RangeFull> for OsString { type Output = OsStr; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index cca6bb747d4..7eb575a3a68 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -149,9 +149,9 @@ extern crate core; #[macro_use] #[macro_reexport(vec, format)] -extern crate "collections" as core_collections; +extern crate collections as core_collections; -#[allow(deprecated)] extern crate "rand" as core_rand; +#[allow(deprecated)] extern crate rand as core_rand; extern crate alloc; extern crate unicode; extern crate libc; @@ -159,7 +159,7 @@ extern crate libc; #[macro_use] #[no_link] extern crate rustc_bitflags; // Make std testable by not duplicating lang items. See #2912 -#[cfg(test)] extern crate "std" as realstd; +#[cfg(test)] extern crate std as realstd; #[cfg(test)] pub use realstd::marker; #[cfg(test)] pub use realstd::ops; #[cfg(test)] pub use realstd::cmp; diff --git a/src/libstd/old_io/mem.rs b/src/libstd/old_io/mem.rs index d877a60b079..298085806bd 100644 --- a/src/libstd/old_io/mem.rs +++ b/src/libstd/old_io/mem.rs @@ -397,7 +397,7 @@ impl<'a> Buffer for BufReader<'a> { #[cfg(test)] mod test { - extern crate "test" as test_crate; + extern crate test as test_crate; use old_io::{SeekSet, SeekCur, SeekEnd, Reader, Writer, Seek, Buffer}; use prelude::v1::{Ok, Err, Vec, AsSlice}; use prelude::v1::IteratorExt; 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; |
