about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-05 03:56:34 +0000
committerbors <bors@rust-lang.org>2017-05-05 03:56:34 +0000
commita6ab049ed1db09f693df7d33046b3980f56751c1 (patch)
tree50a28372fab8299ce5a03cb645aa17f54bc6b7dd /src/libcore
parent50b98587180a44782b22cbde1f638b61193ef7a3 (diff)
parent3cd7f37482ddf7c2b34f50cf157b55cc8ac4140e (diff)
downloadrust-a6ab049ed1db09f693df7d33046b3980f56751c1.tar.gz
rust-a6ab049ed1db09f693df7d33046b3980f56751c1.zip
Auto merge of #41762 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #41741, #41746, #41749, #41754
- Failed merges:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/option.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 1a48f277625..515f49d6f0b 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -66,14 +66,14 @@
 //! not ([`None`]).
 //!
 //! ```
-//! let optional: Option<Box<i32>> = None;
-//! check_optional(&optional);
+//! let optional = None;
+//! check_optional(optional);
 //!
-//! let optional: Option<Box<i32>> = Some(Box::new(9000));
-//! check_optional(&optional);
+//! let optional = Some(Box::new(9000));
+//! check_optional(optional);
 //!
-//! fn check_optional(optional: &Option<Box<i32>>) {
-//!     match *optional {
+//! fn check_optional(optional: Option<Box<i32>>) {
+//!     match optional {
 //!         Some(ref p) => println!("has value {}", p),
 //!         None => println!("has no value"),
 //!     }