about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-05 17:22:11 +0800
committerGitHub <noreply@github.com>2018-01-05 17:22:11 +0800
commit1fea75192e98f86a6c211af8bf108ffbaebc80c6 (patch)
tree6d741cefebd4d8e29088c5a0626b3506b8a9bd71
parentff2f328d7efd78fc3837d2ad9a1080ff8e258d1b (diff)
parent922f0618d1b1616f1bb3b8046948b47e4fadf29d (diff)
Rollup merge of #47182 - aheart:master, r=steveklabnik
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.
-rw-r--r--src/libcore/macros.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 948ad104cdf..f00128a8147 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -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(())
 /// }
 ///