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:
Manish Goregaokar 2015-07-16 10:48:58 +05:30
commit 62bb71e83a

View File

@ -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 => ...