Skip to content

Commit 46b30cc

Browse files
author
Eric Findlay
committed
Added foo() to rustdoc example, r=steveklabnik
Fixes #29234
1 parent b2c3745 commit 46b30cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/trpl/documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,17 +385,17 @@ error handling. Lets say you want the following,
385385
The problem is that `try!` returns a `Result<T, E>` and test functions
386386
don't return anything so this will give a mismatched types error.
387387

388-
```rust
388+
```rust,ignore
389389
/// A doc test using try!
390390
///
391391
/// ```
392392
/// use std::io;
393-
/// # fn f() -> io::Result<()> {
393+
/// # fn foo() -> io::Result<()> {
394394
/// let mut input = String::new();
395395
/// try!(io::stdin().read_line(&mut input));
396396
/// # Ok(())
397397
/// # }
398-
/// # f();
398+
/// # foo();
399399
/// ```
400400
```
401401

0 commit comments

Comments
 (0)