summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/struct-enum-ignoring-field-with-underscore.stderr
blob: 16f751444a558c6d67cd2a567e32d3747b031ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error: expected identifier, found reserved identifier `_`
  --> $DIR/struct-enum-ignoring-field-with-underscore.rs:9:27
   |
LL |     if let Some(Foo::Bar {_}) = foo {}
   |                           ^ expected identifier, found reserved identifier

error[E0027]: pattern does not mention field `bar`
  --> $DIR/struct-enum-ignoring-field-with-underscore.rs:9:17
   |
LL |     if let Some(Foo::Bar {_}) = foo {}
   |                 ^^^^^^^^^^^^ missing field `bar`
   |
help: include the missing field in the pattern
   |
LL |     if let Some(Foo::Bar {_, bar }) = foo {}
   |                            ~~~~~~~
help: if you don't care about this missing field, you can explicitly ignore it
   |
LL |     if let Some(Foo::Bar {_, .. }) = foo {}
   |                            ~~~~~~

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0027`.