-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for warning emitting if
match
is too complex
- Loading branch information
1 parent
75caa89
commit 99e670f
Showing
2 changed files
with
10 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
error: reached pattern complexity limit | ||
--> $DIR/complexity_limit.rs:39:5 | ||
warning: `match` is too complex | ||
--> $DIR/complexity_limit.rs:31:5 | ||
| | ||
LL | / match command { | ||
LL | | BaseCommand { field01: true, .. } => {} | ||
LL | | BaseCommand { field02: true, .. } => {} | ||
LL | | BaseCommand { field03: true, .. } => {} | ||
... | | ||
LL | | BaseCommand { field30: false, .. } => {} | ||
LL | | BaseCommand { field18: false, .. } => {} | ||
LL | | } | ||
| |_____^ | ||
|
||
error: aborting due to 1 previous error | ||
warning: 1 warning emitted | ||
|