Skip to content

Commit

Permalink
diagnostics: Fix E0303 explanation.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Jul 13, 2015
1 parent edf29a7 commit 4ec3ab6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc/diagnostics.rs
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 4ec3ab6

Please sign in to comment.