diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-07-16 10:48:58 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-07-16 10:48:58 +0530 |
| commit | 62bb71e83a77c019bcdffa5c2c583fcb515f4bb8 (patch) | |
| tree | 9aed6cf02c71c24c221023c9e78db090c421b23d /src | |
| parent | 3a5bc736ae4ece3dcf010138232658c61b95eb4e (diff) | |
| parent | 4ec3ab61c085b887848aafc9cfab3a74197db2d2 (diff) | |
| download | rust-62bb71e83a77c019bcdffa5c2c583fcb515f4bb8.tar.gz rust-62bb71e83a77c019bcdffa5c2c583fcb515f4bb8.zip | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/diagnostics.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index 9aa5daa3a0a..4b77c211df9 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -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 => ... |
