Skip to content

Commit

Permalink
Rollup merge of #35562 - birkenfeld:as-mut-doc, r=steveklabnik
Browse files Browse the repository at this point in the history
Remove redundant `&mut ref mut` in doc for Result::as_mut()

While a good example of how `&mut ref mut` is a no-op, I don't think we should show that here :)
See https://users.rust-lang.org/t/mnemonic-for-reading-qualifiers/6853

r? @steveklabnik
  • Loading branch information
steveklabnik authored Aug 10, 2016
2 parents 11a6619 + 70e760f commit 0db7846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ impl<T, E> Result<T, E> {
/// ```
/// fn mutate(r: &mut Result<i32, i32>) {
/// match r.as_mut() {
/// Ok(&mut ref mut v) => *v = 42,
/// Err(&mut ref mut e) => *e = 0,
/// Ok(v) => *v = 42,
/// Err(e) => *e = 0,
/// }
/// }
///
Expand Down

0 comments on commit 0db7846

Please sign in to comment.