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.
|
restriction, but for now patterns must be rewritten without sub-bindings.
|
||||||
|
|
||||||
```
|
```
|
||||||
// Code like this...
|
// Before.
|
||||||
match Some(5) {
|
match Some("hi".to_string()) {
|
||||||
ref op_num @ Some(num) => ...
|
ref op_string_ref @ Some(ref s) => ...
|
||||||
None => ...
|
None => ...
|
||||||
}
|
}
|
||||||
|
|
||||||
// After.
|
// After.
|
||||||
match Some("hi".to_string()) {
|
match Some("hi".to_string()) {
|
||||||
Some(ref s) => {
|
Some(ref s) => {
|
||||||
let op_string_ref = &Some(&s);
|
let op_string_ref = &Some(s);
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
None => ...
|
None => ...
|
||||||
|
Loading…
Reference in New Issue
Block a user