]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/src/docs/wildcard_enum_match_arm.txt
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / src / docs / wildcard_enum_match_arm.txt
CommitLineData
f2b60f7d
FG
1### What it does
2Checks for wildcard enum matches using `_`.
3
4### Why is this bad?
5New enum variants added by library updates can be missed.
6
7### Known problems
8Suggested replacements may be incorrect if guards exhaustively cover some
9variants, and also may not use correct path to enum if it's not present in the current scope.
10
11### Example
12```
13match x {
14 Foo::A(_) => {},
15 _ => {},
16}
17```
18
19Use instead:
20```
21match x {
22 Foo::A(_) => {},
23 Foo::B(_) => {},
24}
25```