]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/src/docs/rest_pat_in_fully_bound_structs.txt
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / src / docs / rest_pat_in_fully_bound_structs.txt
CommitLineData
f2b60f7d
FG
1### What it does
2Checks for unnecessary '..' pattern binding on struct when all fields are explicitly matched.
3
4### Why is this bad?
5Correctness and readability. It's like having a wildcard pattern after
6matching all enum variants explicitly.
7
8### Example
9```
10let a = A { a: 5 };
11
12match a {
13 A { a: 5, .. } => {},
14 _ => {},
15}
16```
17
18Use instead:
19```
20match a {
21 A { a: 5 } => {},
22 _ => {},
23}
24```