diff --git a/src/libcore/option.rs b/src/libcore/option.rs index 47e3a0d21676f..09d4076c7fbc7 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -64,7 +64,7 @@ //! //! fn check_optional(optional: Option>) { //! match optional { -//! Some(ref p) => println!("has value {}", p), +//! Some(p) => println!("has value {}", p), //! None => println!("has no value"), //! } //! } @@ -83,7 +83,7 @@ //! let msg = Some("howdy"); //! //! // Take a reference to the contained string -//! if let Some(ref m) = msg { +//! if let Some(m) = &msg { //! println!("{}", *m); //! } //!