Merge pull request #2993 from zyfjeff/master

Fix missing code in RFC2005
This commit is contained in:
Eric Huss 2020-12-04 09:23:32 -08:00 committed by GitHub
commit d73365ea3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -276,7 +276,7 @@ match x {
}
// Desugared:
let x = &Some(3);
let x = &Some((3, 3));
match x {
&Some((ref x, 3)) | &Some((ref x, 5)) => { ... }
None => { ... }
@ -344,6 +344,7 @@ match y {
Example of new mutable reference behavior:
```rust
let mut x = Some(5);
match &mut x {
Some(y) => {
// `y` is an `&mut` reference here, equivalent to `ref mut` before