]> git.lizzy.rs Git - rust.git/commitdiff
register snapshot
authorJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 13:34:44 +0000 (08:34 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 22:22:11 +0000 (17:22 -0500)
src/libcollections/bit.rs
src/libcollections/btree/map.rs
src/libcollections/ring_buf.rs
src/libcollections/vec.rs
src/libcollections/vec_map.rs
src/libcore/ops.rs
src/libcore/slice.rs
src/libserialize/json.rs
src/libstd/collections/hash/map.rs
src/snapshots.txt

index 5e7089bb7aca2ebae6cde8d03b137fc9de2c2ee3..c092e000215d3ffdc1858c3bbf5762a2abf2b8a2 100644 (file)
@@ -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<uint,bool> 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<uint> for Bitv {
     type Output = bool;
index a9e09a584d6877d8b86c4126941f97242cd27cb5..ea504530c4b21309b2660a5f1449c29742b855fe 100644 (file)
@@ -877,18 +877,6 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<K: Ord, Sized? Q, V> Index<Q, V> for BTreeMap<K, V>
-    where Q: BorrowFrom<K> + 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<K: Ord, Sized? Q, V> Index<Q> for BTreeMap<K, V>
     where Q: BorrowFrom<K> + Ord
@@ -900,18 +888,6 @@ fn index(&self, key: &Q) -> &V {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<K: Ord, Sized? Q, V> IndexMut<Q, V> for BTreeMap<K, V>
-    where Q: BorrowFrom<K> + 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<K: Ord, Sized? Q, V> IndexMut<Q> for BTreeMap<K, V>
     where Q: BorrowFrom<K> + Ord
index e86c40bed212f90b71f79c96fd9cadba8bad205f..ce9643b3b439199b30f7866e9d24dec588134677 100644 (file)
@@ -1360,17 +1360,6 @@ fn hash(&self, state: &mut S) {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<A> Index<uint, A> for RingBuf<A> {
-    #[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<A> Index<uint> for RingBuf<A> {
     type Output = A;
@@ -1381,17 +1370,6 @@ fn index<'a>(&'a self, i: &uint) -> &'a A {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<A> IndexMut<uint, A> for RingBuf<A> {
-    #[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<A> IndexMut<uint> for RingBuf<A> {
     type Output = A;
index b8f97799c971872b1245b2ed15e0110afa35d54d..4e3fd44072784b7094d6278500a35c44f35cfa82 100644 (file)
@@ -1190,17 +1190,6 @@ fn hash(&self, state: &mut S) {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[experimental = "waiting on Index stability"]
-impl<T> Index<uint,T> for Vec<T> {
-    #[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<T> Index<uint> for Vec<T> {
     type Output = T;
@@ -1211,16 +1200,6 @@ fn index<'a>(&'a self, index: &uint) -> &'a T {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-impl<T> IndexMut<uint,T> for Vec<T> {
-    #[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<T> IndexMut<uint> for Vec<T> {
     type Output = T;
 
index ab6c6b7ca55bf55397f287d94d4b8faebe98f079..cc757b656238e978512314af45b1ee05bbe2437f 100644 (file)
@@ -517,17 +517,6 @@ fn extend<Iter: Iterator<Item=(uint, V)>>(&mut self, mut iter: Iter) {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<V> Index<uint, V> for VecMap<V> {
-    #[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<V> Index<uint> for VecMap<V> {
     type Output = V;
 
@@ -537,17 +526,6 @@ fn index<'a>(&'a self, i: &uint) -> &'a V {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<V> IndexMut<uint, V> for VecMap<V> {
-    #[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<V> IndexMut<uint> for VecMap<V> {
     type Output = V;
index c9b71092f9072597a8fddb8ad52c943dc30864a1..17e4c5f8215a8a2314b61aceedc738a6e950ecdb 100644 (file)
@@ -717,15 +717,6 @@ fn shr(self, other: uint) -> $t { self >> other }
 
 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<Sized? Index, Sized? Result> 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<Sized? Index, Sized? Result> for Sized? {
 ///     Foo[Foo];
 /// }
 /// ```
-#[cfg(not(stage0))]  // NOTE(stage0) remove cfg after a snapshot
 #[lang="index"]
 pub trait Index<Sized? Index> for Sized? {
     type Sized? Output;
@@ -764,15 +754,6 @@ pub trait Index<Sized? 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<Sized? Index, Sized? Result> 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<Sized? Index, Sized? Result> for Sized? {
 ///     &mut Foo[Foo];
 /// }
 /// ```
-#[cfg(not(stage0))]  // NOTE(stage0) remove cfg after a snapshot
 #[lang="index_mut"]
 pub trait IndexMut<Sized? Index> for Sized? {
     type Sized? Output;
index f17a775cf42407e2981e45b440793cf783c5a33c..7aed16173e988bbd852cc1fd1566de977f297eb5 100644 (file)
@@ -531,17 +531,6 @@ fn clone_from_slice(&mut self, src: &[T]) -> uint where T: Clone {
     }
 }
 
-// NOTE(stage0) remove impl after a snapshot
-#[cfg(stage0)]
-impl<T> ops::Index<uint, T> 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<T> ops::Index<uint> for [T] {
     type Output = T;
 
@@ -552,17 +541,6 @@ fn index(&self, &index: &uint) -> &T {
     }
 }
 
-// NOTE(stage0) remove impl after a snapshot
-#[cfg(stage0)]
-impl<T> ops::IndexMut<uint, T> 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<T> ops::IndexMut<uint> for [T] {
     type Output = T;
 
index e8bd46815e6ac3f547c4ffefedcb295bfb38354f..bd4cb1884a69a5b6708de57a5c575ff371877c8b 100644 (file)
@@ -1125,15 +1125,6 @@ pub fn as_null(&self) -> Option<()> {
     }
 }
 
-// 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 @@ fn index(&self, idx: & &str) -> &Json {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-impl ops::Index<uint, Json> 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<uint> for Json {
     type Output = Json;
 
index a6532707f3e367d74237d5f673e9ae78806bd22e..c35be86420de87e1ca2849e1309195904190346f 100644 (file)
@@ -1226,19 +1226,6 @@ fn default() -> HashMap<K, V, H> {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<K: Hash<S> + Eq, Sized? Q, V, S, H: Hasher<S>> Index<Q, V> for HashMap<K, V, H>
-    where Q: BorrowFrom<K> + Hash<S> + 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<K: Hash<S> + Eq, Sized? Q, V, S, H: Hasher<S>> Index<Q> for HashMap<K, V, H>
     where Q: BorrowFrom<K> + Hash<S> + Eq
@@ -1251,19 +1238,6 @@ fn index<'a>(&'a self, index: &Q) -> &'a V {
     }
 }
 
-// NOTE(stage0): remove impl after a snapshot
-#[cfg(stage0)]
-#[stable]
-impl<K: Hash<S> + Eq, Sized? Q, V, S, H: Hasher<S>> IndexMut<Q, V> for HashMap<K, V, H>
-    where Q: BorrowFrom<K> + Hash<S> + 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<K: Hash<S> + Eq, Sized? Q, V, S, H: Hasher<S>> IndexMut<Q> for HashMap<K, V, H>
     where Q: BorrowFrom<K> + Hash<S> + Eq
index c72fd7978f88588f4dfcf8e43a1059f7c2a984ea..5c21a8a8abfb0c3615031b8bc01b7f7044abfdc9 100644 (file)
@@ -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