about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-19 14:10:35 -0700
committerbors <bors@rust-lang.org>2013-05-19 14:10:35 -0700
commitebdb0dee272829f2410edd51acdb12f20721ce42 (patch)
tree1621e55a33ae1a15688461a67e860e0369ebd3e9
parent9f671698e6ac2666293298eb5234237a8033683f (diff)
parenta389d86fa46d4a01b7839560a8851d84b7b2153d (diff)
auto merge of #6620 : steveklabnik/rust/stdin_docs, r=brson
-rw-r--r--src/libcore/io.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcore/io.rs b/src/libcore/io.rs
index 77b486ca446..677903433e0 100644
--- a/src/libcore/io.rs
+++ b/src/libcore/io.rs
@@ -1010,6 +1010,16 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader {
 // top-level functions that take a reader, or a set of default methods on
 // reader (which can then be called reader)
 
+/**
+* Gives a `Reader` that allows you to read values from standard input.
+*
+* # Examples
+* ~~~
+* let stdin = core::io::stdin();
+* let line = stdin.read_line();
+* core::io::print(line);
+* ~~~
+*/
 pub fn stdin() -> @Reader {
     unsafe {
         @rustrt::rust_get_stdin() as @Reader