]> git.lizzy.rs Git - rust.git/blob - tests/ui/unneeded_field_pattern.stderr
iterate List by value
[rust.git] / 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    = note: `-D clippy::unneeded-field-pattern` implied by `-D warnings`
8    = help: Try with `Foo { b: 0, .. }`
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