Skip to content

Commit f9b231c

Browse files
committed
Fixing more doc tests
1 parent 3163456 commit f9b231c

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

doc/rustdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ specifiers that can be used to dictate how a code block is tested:
132132
~~~
133133

134134
Rustdoc also supplies some extra sugar for helping with some tedious
135-
documentation examples. If a line os prefixed with a `#` character, then the
135+
documentation examples. If a line is prefixed with a `#` character, then the
136136
line will not show up in the HTML documentation, but it will be used when
137137
testing the code block.
138138

src/libextra/glob.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl MatchOptions {
516516
*
517517
* This function always returns this value:
518518
*
519-
* ```rust,notest
519+
* ```rust,ignore
520520
* MatchOptions {
521521
* case_sensitive: true,
522522
* require_literal_separator: false.

src/libstd/comm/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//!
2626
//! # Example
2727
//!
28-
//! ```rust,notest
28+
//! ```rust,ignore
2929
//! let (mut p1, c1) = Chan::new();
3030
//! let (mut p2, c2) = Chan::new();
3131
//!

src/libstd/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ fn main() {
222222
There are a number of related macros in the `format!` family. The ones that are
223223
currently implemented are:
224224
225-
```rust,notest
225+
```rust,ignore
226226
format! // described above
227227
write! // first argument is a &mut io::Writer, the destination
228228
writeln! // same as write but appends a newline

src/libstd/io/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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"));

src/libstd/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ error,hello=warn // turn on global error logging and also warn for hello
7878
7979
Each of these macros will expand to code similar to:
8080
81-
```rust,notest
81+
```rust,ignore
8282
if log_level <= my_module_log_level() {
8383
::std::logging::log(log_level, format!(...));
8484
}

0 commit comments

Comments
 (0)