mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #27013 - michaelsproul:fix-E0303, r=alexcrichton
A merge in #24523 broke the explanation for E0303. This commit restores the previous version and also removes an erroneous `&` (which had nothing to do with the merge).
This commit is contained in:
commit
62bb71e83a
@ -972,16 +972,16 @@ Updates to the borrow checker in a future version of Rust may remove this
|
||||
restriction, but for now patterns must be rewritten without sub-bindings.
|
||||
|
||||
```
|
||||
// Code like this...
|
||||
match Some(5) {
|
||||
ref op_num @ Some(num) => ...
|
||||
// Before.
|
||||
match Some("hi".to_string()) {
|
||||
ref op_string_ref @ Some(ref s) => ...
|
||||
None => ...
|
||||
}
|
||||
|
||||
// After.
|
||||
match Some("hi".to_string()) {
|
||||
Some(ref s) => {
|
||||
let op_string_ref = &Some(&s);
|
||||
let op_string_ref = &Some(s);
|
||||
...
|
||||
}
|
||||
None => ...
|
||||
|
Loading…
Reference in New Issue
Block a user