about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-21 15:28:53 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-21 15:28:53 -0700
commita1dd5ac78745a9f266573d539ba34bbd75b50277 (patch)
tree584e29815ca61d4045fa6bfa048d3804c7ce529a /src/libcollections
parent98e9765d973d46faa5c80fb37a48040ca9e87b28 (diff)
parenta568a7f9f2eb3fa3f3e049df288ef0ad32cc7881 (diff)
downloadrust-a1dd5ac78745a9f266573d539ba34bbd75b50277.tar.gz
rust-a1dd5ac78745a9f266573d539ba34bbd75b50277.zip
rollup merge of #24636: alexcrichton/remove-deprecated
Conflicts:
	src/libcore/result.rs
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/bit.rs1
-rw-r--r--src/libcollections/fmt.rs8
-rw-r--r--src/libcollections/slice.rs2
-rw-r--r--src/libcollections/str.rs2
-rw-r--r--src/libcollections/string.rs17
-rw-r--r--src/libcollections/vec.rs12
6 files changed, 6 insertions, 36 deletions
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs
index a72f628e10d..d9151298a35 100644
--- a/src/libcollections/bit.rs
+++ b/src/libcollections/bit.rs
@@ -40,7 +40,6 @@
 //! ```
 //! # #![feature(collections, core, step_by)]
 //! use std::collections::{BitSet, BitVec};
-//! use std::num::Float;
 //! use std::iter;
 //!
 //! let max_prime = 10000;
diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs
index 4a276abaf7a..2b502b2227e 100644
--- a/src/libcollections/fmt.rs
+++ b/src/libcollections/fmt.rs
@@ -175,7 +175,6 @@
 //! # #![feature(core, std_misc)]
 //! use std::fmt;
 //! use std::f64;
-//! use std::num::Float;
 //!
 //! #[derive(Debug)]
 //! struct Vector2D {
@@ -200,10 +199,11 @@
 //!         let magnitude = magnitude.sqrt();
 //!
 //!         // Respect the formatting flags by using the helper method
-//!         // `pad_integral` on the Formatter object. See the method documentation
-//!         // for details, and the function `pad` can be used to pad strings.
+//!         // `pad_integral` on the Formatter object. See the method
+//!         // documentation for details, and the function `pad` can be used
+//!         // to pad strings.
 //!         let decimals = f.precision().unwrap_or(3);
-//!         let string = f64::to_str_exact(magnitude, decimals);
+//!         let string = format!("{:.*}", decimals, magnitude);
 //!         f.pad_integral(true, "", &string)
 //!     }
 //! }
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs
index 5be9739cb32..6622d8a9c40 100644
--- a/src/libcollections/slice.rs
+++ b/src/libcollections/slice.rs
@@ -98,7 +98,7 @@ use self::Direction::*;
 use borrow::{Borrow, BorrowMut, ToOwned};
 use vec::Vec;
 
-pub use core::slice::{Chunks, AsSlice, Windows};
+pub use core::slice::{Chunks, Windows};
 pub use core::slice::{Iter, IterMut};
 pub use core::slice::{IntSliceExt, SplitMut, ChunksMut, Split};
 pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut};
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index b585c2fc6ed..db9f526a0f2 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -67,7 +67,7 @@ use rustc_unicode;
 use vec::Vec;
 use slice::SliceConcatExt;
 
-pub use core::str::{FromStr, Utf8Error, Str};
+pub use core::str::{FromStr, Utf8Error};
 pub use core::str::{Lines, LinesAny, CharRange};
 pub use core::str::{Split, RSplit};
 pub use core::str::{SplitN, RSplitN};
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index ce0be3029dc..420fc9f59b0 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -837,15 +837,6 @@ impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str {
     fn ne(&self, other: &Cow<'a, str>) -> bool { PartialEq::ne(&self[..], &other[..]) }
 }
 
-#[unstable(feature = "collections", reason = "waiting on Str stabilization")]
-#[allow(deprecated)]
-impl Str for String {
-    #[inline]
-    fn as_slice(&self) -> &str {
-        unsafe { mem::transmute(&*self.vec) }
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Default for String {
     #[inline]
@@ -1067,14 +1058,6 @@ impl<'a> IntoCow<'a, str> for &'a str {
     }
 }
 
-#[allow(deprecated)]
-impl<'a> Str for Cow<'a, str> {
-    #[inline]
-    fn as_slice<'b>(&'b self) -> &'b str {
-        &**self
-    }
-}
-
 #[stable(feature = "rust1", since = "1.0.0")]
 impl fmt::Write for String {
     #[inline]
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index 3e08096e166..4bbfabdd72f 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1592,18 +1592,6 @@ impl<T: Ord> Ord for Vec<T> {
 }
 
 #[unstable(feature = "collections",
-           reason = "will be replaced by slice syntax")]
-#[deprecated(since = "1.0.0", reason = "use &mut s[..] instead")]
-#[allow(deprecated)]
-impl<T> AsSlice<T> for Vec<T> {
-    /// Deprecated: use `&mut s[..]` instead.
-    #[inline]
-    fn as_slice(&self) -> &[T] {
-        self
-    }
-}
-
-#[unstable(feature = "collections",
            reason = "recent addition, needs more experience")]
 impl<'a, T: Clone> Add<&'a [T]> for Vec<T> {
     type Output = Vec<T>;