about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-12-22 22:33:39 -0800
committerAlex Crichton <alex@alexcrichton.com>2013-12-23 09:10:37 -0800
commitf9b231cd0884fe90a730d637517c257a4f0c601a (patch)
treee886da2ed2d5ca57025853fa1410149941ea179d /src/libstd
parent316345610a4a34d0c9eda9eece521ebf3cee0fb9 (diff)
downloadrust-f9b231cd0884fe90a730d637517c257a4f0c601a.tar.gz
rust-f9b231cd0884fe90a730d637517c257a4f0c601a.zip
Fixing more doc tests
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/comm/select.rs2
-rw-r--r--src/libstd/fmt/mod.rs2
-rw-r--r--src/libstd/io/mod.rs8
-rw-r--r--src/libstd/logging.rs2
4 files changed, 10 insertions, 4 deletions
diff --git a/src/libstd/comm/select.rs b/src/libstd/comm/select.rs
index 9c59a936085..bbd4cfea78d 100644
--- a/src/libstd/comm/select.rs
+++ b/src/libstd/comm/select.rs
@@ -25,7 +25,7 @@
 //!
 //! # Example
 //!
-//! ```rust,notest
+//! ```rust,ignore
 //! let (mut p1, c1) = Chan::new();
 //! let (mut p2, c2) = Chan::new();
 //!
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs
index e4d45fddacb..3bbf8031fff 100644
--- a/src/libstd/fmt/mod.rs
+++ b/src/libstd/fmt/mod.rs
@@ -222,7 +222,7 @@ fn main() {
 There are a number of related macros in the `format!` family. The ones that are
 currently implemented are:
 
-```rust,notest
+```rust,ignore
 format!      // described above
 write!       // first argument is a &mut io::Writer, the destination
 writeln!     // same as write but appends a newline
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 03a656ec2c5..bd0b9e08b7c 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -29,6 +29,7 @@ Some examples of obvious things you might want to do
     use std::io::buffered::BufferedReader;
     use std::io::stdin;
 
+    # let _g = ::std::io::ignore_io_error();
     let mut stdin = BufferedReader::new(stdin());
     for line in stdin.lines() {
         print(line);
@@ -40,6 +41,7 @@ Some examples of obvious things you might want to do
     ```rust
     use std::io::File;
 
+    # let _g = ::std::io::ignore_io_error();
     let contents = File::open(&Path::new("message.txt")).read_to_end();
     ```
 
@@ -48,6 +50,7 @@ Some examples of obvious things you might want to do
     ```rust
     use std::io::File;
 
+    # let _g = ::std::io::ignore_io_error();
     let mut file = File::create(&Path::new("message.txt"));
     file.write(bytes!("hello, file!\n"));
     ```
@@ -58,6 +61,7 @@ Some examples of obvious things you might want to do
     use std::io::buffered::BufferedReader;
     use std::io::File;
 
+    # let _g = ::std::io::ignore_io_error();
     let path = Path::new("message.txt");
     let mut file = BufferedReader::new(File::open(&path));
     for line in file.lines() {
@@ -71,6 +75,7 @@ Some examples of obvious things you might want to do
     use std::io::buffered::BufferedReader;
     use std::io::File;
 
+    # let _g = ::std::io::ignore_io_error();
     let path = Path::new("message.txt");
     let mut file = BufferedReader::new(File::open(&path));
     let lines: ~[~str] = file.lines().collect();
@@ -80,10 +85,11 @@ Some examples of obvious things you might want to do
   XXX This needs more improvement: TcpStream constructor taking &str,
   `write_str` and `write_line` methods.
 
-    ```rust,ignore
+    ```rust,should_fail
     use std::io::net::ip::SocketAddr;
     use std::io::net::tcp::TcpStream;
 
+    # let _g = ::std::io::ignore_io_error();
     let addr = from_str::<SocketAddr>("127.0.0.1:8080").unwrap();
     let mut socket = TcpStream::connect(addr).unwrap();
     socket.write(bytes!("GET / HTTP/1.0\n\n"));
diff --git a/src/libstd/logging.rs b/src/libstd/logging.rs
index 59e57a8680d..dbe8b3247c0 100644
--- a/src/libstd/logging.rs
+++ b/src/libstd/logging.rs
@@ -78,7 +78,7 @@ error,hello=warn     // turn on global error logging and also warn for hello
 
 Each of these macros will expand to code similar to:
 
-```rust,notest
+```rust,ignore
 if log_level <= my_module_log_level() {
     ::std::logging::log(log_level, format!(...));
 }