]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/unneeded_field_pattern.stderr
Auto merge of #99324 - reez12g:issue-99144, r=jyn514
[rust.git] / src / tools / clippy / tests / ui / unneeded_field_pattern.stderr
1 error: you matched a field with a wildcard pattern, consider using `..` instead
2   --> $DIR/unneeded_field_pattern.rs:14:15
3    |
4 LL |         Foo { a: _, b: 0, .. } => {},
5    |               ^^^^
6    |
7    = help: try with `Foo { b: 0, .. }`
8    = note: `-D clippy::unneeded-field-pattern` implied by `-D warnings`
9
10 error: all the struct fields are matched to a wildcard pattern, consider using `..`
11   --> $DIR/unneeded_field_pattern.rs:16:9
12    |
13 LL |         Foo { a: _, b: _, c: _ } => {},
14    |         ^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = help: try with `Foo { .. }` instead
17
18 error: aborting due to 2 previous errors
19