Skip to content

Commit 0eac05a

Browse files
authored
Ensure example error matches the comment
Replace the trailing semicolon with a comma, so that RLS raises an error about "pattern does not mention field `x`" instead of "expected one of `,`, `.`, `?`, `}`, or an operator, found `;`"
1 parent f7c2fc6 commit 0eac05a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flow_control/match/destructuring/destructure_structures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222
// and you can also ignore some variables:
2323
Foo { y, .. } => println!("y = {}, we don't care about x", y),
2424
// this will give an error: pattern does not mention field `x`
25-
//Foo { y } => println!("y = {}", y);
25+
//Foo { y } => println!("y = {}", y),
2626
}
2727
}
2828
```

0 commit comments

Comments
 (0)