Skip to content

Commit

Permalink
Rollup merge of #47182 - aheart:master, r=steveklabnik
Browse files Browse the repository at this point in the history
Equivalent example for ? operator

The example with the ? operator in the documentation for try! macro was missing file.write_all.
Now all three examples are consistent.
  • Loading branch information
kennytm authored Jan 4, 2018
2 parents a4e4899 + 922f061 commit 1791414
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ macro_rules! debug_assert_ne {
/// // The prefered method of quick returning Errors
/// fn write_to_file_question() -> Result<(), MyError> {
/// let mut file = File::create("my_best_friends.txt")?;
/// file.write_all(b"This is a list of my best friends.")?;
/// Ok(())
/// }
///
Expand Down

0 comments on commit 1791414

Please sign in to comment.