Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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