diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index 5e7089bb7ac..c092e000215 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -164,21 +164,6 @@ pub struct Bitv { nbits: uint } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -// FIXME(Gankro): NopeNopeNopeNopeNope (wait for IndexGet to be a thing) -impl Index for Bitv { - #[inline] - fn index(&self, i: &uint) -> &bool { - if self.get(*i).expect("index out of bounds") { - &TRUE - } else { - &FALSE - } - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot // FIXME(Gankro): NopeNopeNopeNopeNope (wait for IndexGet to be a thing) impl Index for Bitv { type Output = bool; diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index a9e09a584d6..ea504530c4b 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -877,18 +877,6 @@ impl Show for BTreeMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl Index for BTreeMap - where Q: BorrowFrom + Ord -{ - fn index(&self, key: &Q) -> &V { - self.get(key).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl Index for BTreeMap where Q: BorrowFrom + Ord @@ -900,18 +888,6 @@ impl Index for BTreeMap } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl IndexMut for BTreeMap - where Q: BorrowFrom + Ord -{ - fn index_mut(&mut self, key: &Q) -> &mut V { - self.get_mut(key).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl IndexMut for BTreeMap where Q: BorrowFrom + Ord diff --git a/src/libcollections/ring_buf.rs b/src/libcollections/ring_buf.rs index e86c40bed21..ce9643b3b43 100644 --- a/src/libcollections/ring_buf.rs +++ b/src/libcollections/ring_buf.rs @@ -1360,17 +1360,6 @@ impl> Hash for RingBuf { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl Index for RingBuf { - #[inline] - fn index<'a>(&'a self, i: &uint) -> &'a A { - self.get(*i).expect("Out of bounds access") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl Index for RingBuf { type Output = A; @@ -1381,17 +1370,6 @@ impl Index for RingBuf { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl IndexMut for RingBuf { - #[inline] - fn index_mut<'a>(&'a mut self, i: &uint) -> &'a mut A { - self.get_mut(*i).expect("Out of bounds access") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl IndexMut for RingBuf { type Output = A; diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index b8f97799c97..4e3fd440727 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1190,17 +1190,6 @@ impl> Hash for Vec { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[experimental = "waiting on Index stability"] -impl Index for Vec { - #[inline] - fn index<'a>(&'a self, index: &uint) -> &'a T { - &self.as_slice()[*index] - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[experimental = "waiting on Index stability"] impl Index for Vec { type Output = T; @@ -1211,16 +1200,6 @@ impl Index for Vec { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl IndexMut for Vec { - #[inline] - fn index_mut<'a>(&'a mut self, index: &uint) -> &'a mut T { - &mut self.as_mut_slice()[*index] - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl IndexMut for Vec { type Output = T; diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index ab6c6b7ca55..cc757b65623 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -517,17 +517,6 @@ impl Extend<(uint, V)> for VecMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl Index for VecMap { - #[inline] - fn index<'a>(&'a self, i: &uint) -> &'a V { - self.get(i).expect("key not present") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl Index for VecMap { type Output = V; @@ -537,17 +526,6 @@ impl Index for VecMap { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl IndexMut for VecMap { - #[inline] - fn index_mut<'a>(&'a mut self, i: &uint) -> &'a mut V { - self.get_mut(i).expect("key not present") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl IndexMut for VecMap { type Output = V; diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index c9b71092f90..17e4c5f8215 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -717,15 +717,6 @@ macro_rules! shr_impl { shr_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 } -// NOTE(stage0) remove trait after a snapshot -#[cfg(stage0)] -#[allow(missing_docs)] -#[lang="index"] -pub trait Index for Sized? { - /// The method for the indexing (`Foo[Bar]`) operation - fn index<'a>(&'a self, index: &Index) -> &'a Result; -} - /// The `Index` trait is used to specify the functionality of indexing operations /// like `arr[idx]` when used in an immutable context. /// @@ -755,7 +746,6 @@ pub trait Index for Sized? { /// Foo[Foo]; /// } /// ``` -#[cfg(not(stage0))] // NOTE(stage0) remove cfg after a snapshot #[lang="index"] pub trait Index for Sized? { type Sized? Output; @@ -764,15 +754,6 @@ pub trait Index for Sized? { fn index<'a>(&'a self, index: &Index) -> &'a Self::Output; } -// NOTE(stage0) remove trait after a snapshot -#[cfg(stage0)] -#[allow(missing_docs)] -#[lang="index_mut"] -pub trait IndexMut for Sized? { - /// The method for the indexing (`Foo[Bar]`) operation - fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result; -} - /// The `IndexMut` trait is used to specify the functionality of indexing /// operations like `arr[idx]`, when used in a mutable context. /// @@ -802,7 +783,6 @@ pub trait IndexMut for Sized? { /// &mut Foo[Foo]; /// } /// ``` -#[cfg(not(stage0))] // NOTE(stage0) remove cfg after a snapshot #[lang="index_mut"] pub trait IndexMut for Sized? { type Sized? Output; diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index f17a775cf42..7aed16173e9 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -531,17 +531,6 @@ impl SliceExt for [T] { } } -// NOTE(stage0) remove impl after a snapshot -#[cfg(stage0)] -impl ops::Index for [T] { - fn index(&self, &index: &uint) -> &T { - assert!(index < self.len()); - - unsafe { mem::transmute(self.repr().data.offset(index as int)) } - } -} - -#[cfg(not(stage0))] // NOTE(stage0) remove cfg after a snapshot impl ops::Index for [T] { type Output = T; @@ -552,17 +541,6 @@ impl ops::Index for [T] { } } -// NOTE(stage0) remove impl after a snapshot -#[cfg(stage0)] -impl ops::IndexMut for [T] { - fn index_mut(&mut self, &index: &uint) -> &mut T { - assert!(index < self.len()); - - unsafe { mem::transmute(self.repr().data.offset(index as int)) } - } -} - -#[cfg(not(stage0))] // NOTE(stage0) remove cfg after a snapshot impl ops::IndexMut for [T] { type Output = T; diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index e8bd46815e6..bd4cb1884a6 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1125,15 +1125,6 @@ impl Json { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl<'a> ops::Index<&'a str, Json> for Json { - fn index(&self, idx: & &str) -> &Json { - self.find(*idx).unwrap() - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl<'a> ops::Index<&'a str> for Json { type Output = Json; @@ -1142,18 +1133,6 @@ impl<'a> ops::Index<&'a str> for Json { } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -impl ops::Index for Json { - fn index<'a>(&'a self, idx: &uint) -> &'a Json { - match self { - &Json::Array(ref v) => v.index(idx), - _ => panic!("can only index Json with uint if it is an array") - } - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot impl ops::Index for Json { type Output = Json; diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index a6532707f3e..c35be86420d 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1226,19 +1226,6 @@ impl, V, S, H: Hasher + Default> Default for HashMap } } -// NOTE(stage0): remove impl after a snapshot -#[cfg(stage0)] -#[stable] -impl + Eq, Sized? Q, V, S, H: Hasher> Index for HashMap - where Q: BorrowFrom + Hash + Eq -{ - #[inline] - fn index<'a>(&'a self, index: &Q) -> &'a V { - self.get(index).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl + Eq, Sized? Q, V, S, H: Hasher> Index for HashMap where Q: BorrowFrom + Hash + Eq @@ -1251,19 +1238,6 @@ impl + Eq, Sized? Q, V, S, H: Hasher> Index for HashMap + Eq, Sized? Q, V, S, H: Hasher> IndexMut for HashMap - where Q: BorrowFrom + Hash + Eq -{ - #[inline] - fn index_mut<'a>(&'a mut self, index: &Q) -> &'a mut V { - self.get_mut(index).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot #[stable] impl + Eq, Sized? Q, V, S, H: Hasher> IndexMut for HashMap where Q: BorrowFrom + Hash + Eq diff --git a/src/snapshots.txt b/src/snapshots.txt index c72fd7978f8..5c21a8a8abf 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,12 @@ +S 2015-01-04 b2085d9 + freebsd-x86_64 50ccb6bf9c0645d0746a5167493a39b2be40c2d4 + linux-i386 b880b98d832c9a049b8ef6a50df50061e363de5a + linux-x86_64 82a09c162474b69d2d1e4e8399086f3f0f4e31c3 + macos-i386 569055bb10d96ab25f78ecf2c80ffbccd5e69b8d + macos-x86_64 cff1f9ebd63dae6890359b7d353bd9486d8ecdfc + winnt-i386 553790fe493413287a19d17a42bf7225d3e2272d + winnt-x86_64 bab0d13960afb7ccdd6bf11452de1b9c457cc3e9 + S 2015-01-02 c894171 freebsd-x86_64 ea8bcf75eada3539f5cbab51708eecf40d436b77 linux-i386 646ae265721e3cbe19404aae4fea4ffa1f1d90cf