Skip to content

Commit

Permalink
First question mark in doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
llogiq committed Jul 3, 2019
1 parent 4fb77a0 commit ee05fc8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/libcore/macros.rs
Expand Up @@ -335,11 +335,14 @@ macro_rules! r#try {
/// ```
/// use std::io::Write;
///
/// let mut w = Vec::new();
/// write!(&mut w, "test").unwrap();
/// write!(&mut w, "formatted {}", "arguments").unwrap();
/// fn main() -> std::io::Result<()> {
/// let mut w = Vec::new();
/// write!(&mut w, "test")?;
/// write!(&mut w, "formatted {}", "arguments")?;
///
/// assert_eq!(w, b"testformatted arguments");
/// assert_eq!(w, b"testformatted arguments");
/// Ok(())
/// }
/// ```
///
/// A module can import both `std::fmt::Write` and `std::io::Write` and call `write!` on objects
Expand Down

0 comments on commit ee05fc8

Please sign in to comment.