about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/cmp.rs2
-rw-r--r--src/libcore/hash/mod.rs2
-rw-r--r--src/libcore/iter.rs13
-rw-r--r--src/libcore/ptr.rs3
4 files changed, 20 insertions, 0 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 52ed29c1b61..93542185eab 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -401,6 +401,7 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
 /// ```
 #[inline]
 #[unstable(feature = "cmp_partial")]
+#[deprecated(since = "1.3.0", reason = "has not proven itself worthwhile")]
 pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
     match v1.partial_cmp(&v2) {
         Some(Less) | Some(Equal) => Some(v1),
@@ -434,6 +435,7 @@ pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
 /// ```
 #[inline]
 #[unstable(feature = "cmp_partial")]
+#[deprecated(since = "1.3.0", reason = "has not proven itself worthwhile")]
 pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
     match v1.partial_cmp(&v2) {
         Some(Equal) | Some(Less) => Some(v2),
diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs
index abf9e55a1f2..a660cf0cf2d 100644
--- a/src/libcore/hash/mod.rs
+++ b/src/libcore/hash/mod.rs
@@ -171,6 +171,8 @@ pub trait Hasher {
 #[unstable(feature = "hash_default",
            reason = "not the most ergonomic interface unless `H` is defaulted \
                      to SipHasher, but perhaps not ready to commit to that")]
+#[deprecated(since = "1.3.0",
+             reason = "has yet to prove itself useful")]
 pub fn hash<T: Hash, H: Hasher + Default>(value: &T) -> u64 {
     let mut h: H = Default::default();
     value.hash(&mut h);
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 415326a8a61..4d8de0c85b6 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -56,6 +56,7 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
+#[allow(deprecated)]
 use self::MinMaxResult::*;
 
 use clone::Clone;
@@ -445,6 +446,7 @@ pub trait Iterator {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[allow(deprecated)]
     fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
         where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,
     {
@@ -840,6 +842,8 @@ pub trait Iterator {
     #[unstable(feature = "iter_min_max",
                reason = "return type may change or may wish to have a closure \
                          based version as well")]
+    #[deprecated(since = "1.3.0", reason = "has not proven itself")]
+    #[allow(deprecated)]
     fn min_max(mut self) -> MinMaxResult<Self::Item> where Self: Sized, Self::Item: Ord
     {
         let (mut min, mut max) = match self.next() {
@@ -1336,6 +1340,8 @@ impl<I> RandomAccessIterator for Rev<I>
 #[derive(Clone, PartialEq, Debug)]
 #[unstable(feature = "iter_min_max",
            reason = "unclear whether such a fine-grained result is widely useful")]
+#[deprecated(since = "1.3.0", reason = "has not proven itself")]
+#[allow(deprecated)]
 pub enum MinMaxResult<T> {
     /// Empty iterator
     NoElements,
@@ -1349,6 +1355,8 @@ pub enum MinMaxResult<T> {
 }
 
 #[unstable(feature = "iter_min_max", reason = "type is unstable")]
+#[deprecated(since = "1.3.0", reason = "has not proven itself")]
+#[allow(deprecated)]
 impl<T: Clone> MinMaxResult<T> {
     /// `into_option` creates an `Option` of type `(T,T)`. The returned `Option`
     /// has variant `None` if and only if the `MinMaxResult` has variant
@@ -2249,6 +2257,7 @@ impl<I> ExactSizeIterator for Take<I> where I: ExactSizeIterator {}
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[derive(Clone)]
+#[allow(deprecated)]
 pub struct Scan<I, St, F> {
     iter: I,
     f: F,
@@ -2256,6 +2265,7 @@ pub struct Scan<I, St, F> {
     /// The current internal state to be passed to the closure next.
     #[unstable(feature = "scan_state",
                reason = "public fields are otherwise rare in the stdlib")]
+    #[deprecated(since = "1.3.0", reason = "unclear whether this is necessary")]
     pub state: St,
 }
 
@@ -2267,6 +2277,7 @@ impl<B, I, St, F> Iterator for Scan<I, St, F> where
     type Item = B;
 
     #[inline]
+    #[allow(deprecated)]
     fn next(&mut self) -> Option<B> {
         self.iter.next().and_then(|a| (self.f)(&mut self.state, a))
     }
@@ -2448,6 +2459,8 @@ impl<I> Fuse<I> {
     /// previously returned `None`.
     #[inline]
     #[unstable(feature = "iter_reset_fuse", reason = "seems marginal")]
+    #[deprecated(since = "1.3.0",
+                 reason = "unusual for adaptors to have one-off methods")]
     pub fn reset_fuse(&mut self) {
         self.done = false
     }
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 13d95e9ab1a..6fed89547d4 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -131,6 +131,9 @@ pub unsafe fn read<T>(src: *const T) -> T {
 #[inline(always)]
 #[unstable(feature = "read_and_zero",
            reason = "may play a larger role in std::ptr future extensions")]
+#[deprecated(since = "1.3.0",
+             reason = "a \"zero value\" will soon not actually exist for all \
+                       types once dynamic drop has been implemented")]
 pub unsafe fn read_and_zero<T>(dest: *mut T) -> T {
     // Copy the data out from `dest`:
     let tmp = read(&*dest);