mirror of https://github.com/rust-lang/rfcs.git
Merge pull request #2993 from zyfjeff/master
Fix missing code in RFC2005
This commit is contained in:
commit
d73365ea3a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue