We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edf29a7 commit 4ec3ab6Copy full SHA for 4ec3ab6
src/librustc/diagnostics.rs
@@ -972,16 +972,16 @@ Updates to the borrow checker in a future version of Rust may remove this
972
restriction, but for now patterns must be rewritten without sub-bindings.
973
974
```
975
-// Code like this...
976
-match Some(5) {
977
- ref op_num @ Some(num) => ...
+// Before.
+match Some("hi".to_string()) {
+ ref op_string_ref @ Some(ref s) => ...
978
None => ...
979
}
980
981
// After.
982
match Some("hi".to_string()) {
983
Some(ref s) => {
984
- let op_string_ref = &Some(&s);
+ let op_string_ref = &Some(s);
985
...
986
987
0 commit comments