Skip to content

Commit

Permalink
Rollup merge of rust-lang#27013 - michaelsproul:fix-E0303, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

 A merge in rust-lang#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).
  • Loading branch information
Manishearth committed Jul 16, 2015
2 parents 3a5bc73 + 4ec3ab6 commit 62bb71e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ...
Expand Down

0 comments on commit 62bb71e

Please sign in to comment.