From 46b30ccd895d6fc990474cb6f130b41d0a9b8dcf Mon Sep 17 00:00:00 2001 From: Eric Findlay Date: Sun, 8 Nov 2015 10:03:58 +0900 Subject: [PATCH] Added foo() to rustdoc example, r=steveklabnik Fixes #29234 --- src/doc/trpl/documentation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 191a51dffdbf..b3f79f2f1df9 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -385,17 +385,17 @@ error handling. Lets say you want the following, The problem is that `try!` returns a `Result` and test functions don't return anything so this will give a mismatched types error. -```rust +```rust,ignore /// A doc test using try! /// /// ``` /// use std::io; -/// # fn f() -> io::Result<()> { +/// # fn foo() -> io::Result<()> { /// let mut input = String::new(); /// try!(io::stdin().read_line(&mut input)); /// # Ok(()) /// # } -/// # f(); +/// # foo(); /// ``` ```