about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-21 05:25:21 +0000
committerbors <bors@rust-lang.org>2015-03-21 05:25:21 +0000
commitecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61 (patch)
tree03752d10ba340b85b8720647c7919a97b21d694b /src/libcore
parente2fa53e593a854a609ae9efe5a1bbe15265f0a6f (diff)
parent212e03181e422f569b6426bc08b713a9efc0d0eb (diff)
downloadrust-ecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61.tar.gz
rust-ecf8c64e1b1b60f228f0c472c0b0dab4a5b5aa61.zip
Auto merge of #23470 - alexcrichton:less-prelude, r=aturon
This commit removes the reexports of `old_io` traits as well as `old_path` types
and traits from the prelude. This functionality is now all deprecated and needs
to be removed to make way for other functionality like `Seek` in the `std::io`
module (currently reexported as `NewSeek` in the io prelude).

Closes #23377
Closes #23378
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/macros.rs1
-rw-r--r--src/libcore/prelude.rs2
-rw-r--r--src/libcore/result.rs20
3 files changed, 14 insertions, 9 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 6dcae9879a0..c647b037944 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -176,6 +176,7 @@ macro_rules! try {
 ///
 /// ```
 /// # #![allow(unused_must_use)]
+/// use std::io::Write;
 ///
 /// let mut w = Vec::new();
 /// write!(&mut w, "test");
diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs
index c668fe80d14..4bf7f85284c 100644
--- a/src/libcore/prelude.rs
+++ b/src/libcore/prelude.rs
@@ -29,8 +29,6 @@ pub use marker::{Copy, Send, Sized, Sync};
 pub use ops::{Drop, Fn, FnMut, FnOnce};
 
 // Reexported functions
-#[allow(deprecated)]
-pub use iter::range;
 pub use mem::drop;
 
 // Reexported types and traits
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 8dd91fd6500..bc8d53e2a57 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -110,7 +110,8 @@
 //! something like this:
 //!
 //! ```{.ignore}
-//! use std::old_io::{File, Open, Write};
+//! use std::old_io::*;
+//! use std::old_path::Path;
 //!
 //! let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write);
 //! // If `write_line` errors, then we'll never know, because the return
@@ -128,7 +129,8 @@
 //! a marginally useful message indicating why:
 //!
 //! ```{.no_run}
-//! use std::old_io::{File, Open, Write};
+//! use std::old_io::*;
+//! use std::old_path::Path;
 //!
 //! let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write);
 //! file.write_line("important message").ok().expect("failed to write message");
@@ -138,7 +140,8 @@
 //! You might also simply assert success:
 //!
 //! ```{.no_run}
-//! # use std::old_io::{File, Open, Write};
+//! # use std::old_io::*;
+//! # use std::old_path::Path;
 //!
 //! # let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write);
 //! assert!(file.write_line("important message").is_ok());
@@ -148,7 +151,8 @@
 //! Or propagate the error up the call stack with `try!`:
 //!
 //! ```
-//! # use std::old_io::{File, Open, Write, IoError};
+//! # use std::old_io::*;
+//! # use std::old_path::Path;
 //! fn write_message() -> Result<(), IoError> {
 //!     let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write);
 //!     try!(file.write_line("important message"));
@@ -167,7 +171,8 @@
 //! It replaces this:
 //!
 //! ```
-//! use std::old_io::{File, Open, Write, IoError};
+//! use std::old_io::*;
+//! use std::old_path::Path;
 //!
 //! struct Info {
 //!     name: String,
@@ -191,7 +196,8 @@
 //! With this:
 //!
 //! ```
-//! use std::old_io::{File, Open, Write, IoError};
+//! use std::old_io::*;
+//! use std::old_path::Path;
 //!
 //! struct Info {
 //!     name: String,
@@ -446,7 +452,7 @@ impl<T, E> Result<T, E> {
     /// ignoring I/O and parse errors:
     ///
     /// ```
-    /// use std::old_io::IoResult;
+    /// use std::old_io::*;
     ///
     /// let mut buffer: &[u8] = b"1\n2\n3\n4\n";
     /// let mut buffer = &mut buffer;