From b4a6f895caf3d49ad00a0982ef28485385e78d17 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Wed, 22 Apr 2015 13:57:08 -0700 Subject: Explain how to create a Stdin or Stdout --- src/libstd/io/stdio.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libstd') diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index cd6af77daa9..42fad701533 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -95,6 +95,8 @@ impl Write for StderrRaw { /// /// This handle implements the `Read` trait, but beware that concurrent reads /// of `Stdin` must be executed with care. +/// +/// Created by the function `io::stdin()`. #[stable(feature = "rust1", since = "1.0.0")] pub struct Stdin { inner: Arc>>, @@ -206,6 +208,8 @@ const OUT_MAX: usize = ::usize::MAX; /// Each handle shares a global buffer of data to be written to the standard /// output stream. Access is also synchronized via a lock and explicit control /// over locking is available via the `lock` method. +/// +/// Created by the function `io::stdout()`. #[stable(feature = "rust1", since = "1.0.0")] pub struct Stdout { // FIXME: this should be LineWriter or BufWriter depending on the state of -- cgit 1.4.1-3-g733a5 From 4047a7c29f5e4481ba6056cadf4a1157e9d16c8f Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Wed, 22 Apr 2015 15:57:24 -0700 Subject: Remove stale comment `ToCStr` was removed with `old_io` and the current method `as_os_str` is inherent to `Path`, meaning there is no suitable trait bound that could be used here. --- src/libstd/dynamic_lib.rs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs index 8ca462f5a38..d0f990eaf78 100644 --- a/src/libstd/dynamic_lib.rs +++ b/src/libstd/dynamic_lib.rs @@ -40,14 +40,6 @@ impl Drop for DynamicLibrary { } impl DynamicLibrary { - // FIXME (#12938): Until DST lands, we cannot decompose &str into - // & and str, so we cannot usefully take ToCStr arguments by - // reference (without forcing an additional & around &str). So we - // are instead temporarily adding an instance for &Path, so that - // we can take ToCStr as owned. When DST lands, the &Path instance - // should be removed, and arguments bound by ToCStr should be - // passed by reference. (Here: in the `open` method.) - /// Lazily open a dynamic library. When passed None it gives a /// handle to the calling process pub fn open(filename: Option<&Path>) -> Result { -- cgit 1.4.1-3-g733a5