Skip to content

Commit

Permalink
Rollup merge of rust-lang#65600 - integer32llc:bye-bye-ref, r=Centril
Browse files Browse the repository at this point in the history
Remove unneeded `ref` from docs

Will reduce confusion like in https://users.rust-lang.org/t/help-understanding-the-ref-t-syntax/33779 since match ergonomics means you (almost) never have to say `ref` anymore!

There might be more like this, but I don't have a checkout on my computer right this second and I'm on slow wifi and GitHub search isn't powerful enough and that's my story.
  • Loading branch information
Centril authored Oct 20, 2019
2 parents ed9cc70 + 4ea1a19 commit 1c0e67a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
//!
//! fn check_optional(optional: Option<Box<i32>>) {
//! match optional {
//! Some(ref p) => println!("has value {}", p),
//! Some(p) => println!("has value {}", p),
//! None => println!("has no value"),
//! }
//! }
Expand All @@ -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);
//! }
//!
Expand Down

0 comments on commit 1c0e67a

Please sign in to comment.