@@ -29,6 +29,7 @@ Some examples of obvious things you might want to do
2929 use std::io::buffered::BufferedReader;
3030 use std::io::stdin;
3131
32+ # let _g = ::std::io::ignore_io_error();
3233 let mut stdin = BufferedReader::new(stdin());
3334 for line in stdin.lines() {
3435 print(line);
@@ -40,6 +41,7 @@ Some examples of obvious things you might want to do
4041 ```rust
4142 use std::io::File;
4243
44+ # let _g = ::std::io::ignore_io_error();
4345 let contents = File::open(&Path::new("message.txt")).read_to_end();
4446 ```
4547
@@ -48,6 +50,7 @@ Some examples of obvious things you might want to do
4850 ```rust
4951 use std::io::File;
5052
53+ # let _g = ::std::io::ignore_io_error();
5154 let mut file = File::create(&Path::new("message.txt"));
5255 file.write(bytes!("hello, file!\n"));
5356 ```
@@ -58,6 +61,7 @@ Some examples of obvious things you might want to do
5861 use std::io::buffered::BufferedReader;
5962 use std::io::File;
6063
64+ # let _g = ::std::io::ignore_io_error();
6165 let path = Path::new("message.txt");
6266 let mut file = BufferedReader::new(File::open(&path));
6367 for line in file.lines() {
@@ -71,6 +75,7 @@ Some examples of obvious things you might want to do
7175 use std::io::buffered::BufferedReader;
7276 use std::io::File;
7377
78+ # let _g = ::std::io::ignore_io_error();
7479 let path = Path::new("message.txt");
7580 let mut file = BufferedReader::new(File::open(&path));
7681 let lines: ~[~str] = file.lines().collect();
@@ -80,10 +85,11 @@ Some examples of obvious things you might want to do
8085 XXX This needs more improvement: TcpStream constructor taking &str,
8186 `write_str` and `write_line` methods.
8287
83- ```rust,ignore
88+ ```rust,should_fail
8489 use std::io::net::ip::SocketAddr;
8590 use std::io::net::tcp::TcpStream;
8691
92+ # let _g = ::std::io::ignore_io_error();
8793 let addr = from_str::<SocketAddr>("127.0.0.1:8080").unwrap();
8894 let mut socket = TcpStream::connect(addr).unwrap();
8995 socket.write(bytes!("GET / HTTP/1.0\n\n"));
0 commit comments