diff options
| author | bors <bors@rust-lang.org> | 2015-03-15 16:06:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-15 16:06:04 +0000 |
| commit | b4f5e78b467fff62bcb5287f34940fd0037f2216 (patch) | |
| tree | a91e930a9aca1a86adfb130b82779b9c78a2cb40 /src/libstd | |
| parent | 95018eec69679681acdfae8608779c1e2674322d (diff) | |
| parent | 9f1240b665f2157bc2c74701761131ce6e288002 (diff) | |
| download | rust-b4f5e78b467fff62bcb5287f34940fd0037f2216.tar.gz rust-b4f5e78b467fff62bcb5287f34940fd0037f2216.zip | |
Auto merge of #23387 - Manishearth:rollup, r=Manishearth
- Successful merges: #23375, #23379, #23382, #23384 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/env.rs | 2 | ||||
| -rw-r--r-- | src/libstd/io/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/io/stdio.rs | 27 | ||||
| -rw-r--r-- | src/libstd/path.rs | 4 |
4 files changed, 12 insertions, 25 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 250c5edbcf1..27f78906ec2 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -452,7 +452,7 @@ pub fn get_exit_status() -> i32 { EXIT_STATUS.load(Ordering::SeqCst) as i32 } -/// An iterator over the arguments of a process, yielding an `String` value +/// An iterator over the arguments of a process, yielding a `String` value /// for each argument. /// /// This structure is created through the `std::env::args` method. diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 3fddaaad807..821a0a0b06e 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -9,10 +9,6 @@ // except according to those terms. //! Traits, helpers, and type definitions for core I/O functionality. -//! -//! > **NOTE**: This module is very much a work in progress and is under active -//! > development. At this time it is still recommended to use the `old_io` -//! > module while the details of this module shake out. #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 3b4e396953d..0e68be8d9e2 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -21,20 +21,20 @@ use sys::stdio; /// A handle to a raw instance of the standard input stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via -/// the `std::io::stdin_raw` function. -pub struct StdinRaw(stdio::Stdin); +/// the `std::io::stdio::stdin_raw` function. +struct StdinRaw(stdio::Stdin); /// A handle to a raw instance of the standard output stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via -/// the `std::io::stdout_raw` function. -pub struct StdoutRaw(stdio::Stdout); +/// the `std::io::stdio::stdout_raw` function. +struct StdoutRaw(stdio::Stdout); /// A handle to a raw instance of the standard output stream of this process. /// /// This handle is not synchronized or buffered in any fashion. Constructed via -/// the `std::io::stderr_raw` function. -pub struct StderrRaw(stdio::Stderr); +/// the `std::io::stdio::stderr_raw` function. +struct StderrRaw(stdio::Stderr); /// Construct a new raw handle to the standard input of this process. /// @@ -43,7 +43,7 @@ pub struct StderrRaw(stdio::Stderr); /// handles is **not** available to raw handles returned from this function. /// /// The returned handle has no external synchronization or buffering. -pub fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) } +fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) } /// Construct a new raw handle to the standard input stream of this process. /// @@ -54,7 +54,7 @@ pub fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) } /// /// The returned handle has no external synchronization or buffering layered on /// top. -pub fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) } +fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) } /// Construct a new raw handle to the standard input stream of this process. /// @@ -63,7 +63,7 @@ pub fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) } /// /// The returned handle has no external synchronization or buffering layered on /// top. -pub fn stderr_raw() -> StderrRaw { StderrRaw(stdio::Stderr::new()) } +fn stderr_raw() -> StderrRaw { StderrRaw(stdio::Stderr::new()) } impl Read for StdinRaw { fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { self.0.read(buf) } @@ -109,9 +109,6 @@ pub struct StdinLock<'a> { /// The `Read` trait is implemented for the returned value but the `BufRead` /// trait is not due to the global nature of the standard input stream. The /// locked version, `StdinLock`, implements both `Read` and `BufRead`, however. -/// -/// To avoid locking and buffering altogether, it is recommended to use the -/// `stdin_raw` constructor. #[stable(feature = "rust1", since = "1.0.0")] pub fn stdin() -> Stdin { static INSTANCE: Lazy<Mutex<BufReader<StdinRaw>>> = lazy_init!(stdin_init); @@ -224,9 +221,6 @@ pub struct StdoutLock<'a> { /// provided via the `lock` method. /// /// The returned handle implements the `Write` trait. -/// -/// To avoid locking and buffering altogether, it is recommended to use the -/// `stdout_raw` constructor. #[stable(feature = "rust1", since = "1.0.0")] pub fn stdout() -> Stdout { static INSTANCE: Lazy<Mutex<LineWriter<StdoutRaw>>> = lazy_init!(stdout_init); @@ -297,9 +291,6 @@ pub struct StderrLock<'a> { /// this function. No handles are buffered, however. /// /// The returned handle implements the `Write` trait. -/// -/// To avoid locking altogether, it is recommended to use the `stderr_raw` -/// constructor. #[stable(feature = "rust1", since = "1.0.0")] pub fn stderr() -> Stderr { static INSTANCE: Lazy<Mutex<StderrRaw>> = lazy_init!(stderr_init); diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 3082e63b818..2159e300744 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -86,8 +86,8 @@ //! //! * Occurrences of `.` are normalized away, *except* if they are at //! the beginning of the path (in which case they are often meaningful -//! in terms of path searching). So, fore xample, `a/./b`, `a/b/`, -//! `/a/b/.` and `a/b` all ahve components `a` and `b`, but `./a/b` +//! in terms of path searching). So, for example, `a/./b`, `a/b/`, +//! `/a/b/.` and `a/b` all have components `a` and `b`, but `./a/b` //! has a leading current directory component. //! //! No other normalization takes place by default. In particular, |
