Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unneeded-field-pattern: make lint adhere to lint message convention
- Loading branch information
1 parent
2792260
commit 4418ff1
Showing
2 changed files
with
9 additions
and
9 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,19 +1,19 @@ | ||
error: You matched a field with a wildcard pattern. Consider using `..` instead | ||
error: you matched a field with a wildcard pattern, consider using `..` instead | ||
--> $DIR/unneeded_field_pattern.rs:14:15 | ||
| | ||
LL | Foo { a: _, b: 0, .. } => {}, | ||
| ^^^^ | ||
| | ||
= note: `-D clippy::unneeded-field-pattern` implied by `-D warnings` | ||
= help: Try with `Foo { b: 0, .. }` | ||
= help: try with `Foo { b: 0, .. }` | ||
|
||
error: All the struct fields are matched to a wildcard pattern, consider using `..`. | ||
error: all the struct fields are matched to a wildcard pattern, consider using `..` | ||
--> $DIR/unneeded_field_pattern.rs:16:9 | ||
| | ||
LL | Foo { a: _, b: _, c: _ } => {}, | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: Try with `Foo { .. }` instead | ||
= help: try with `Foo { .. }` instead | ||
|
||
error: aborting due to 2 previous errors | ||
|