Rollup merge of #81235 - reese:rw-tuple-diagnostics, r=estebank
Improve suggestion for tuple struct pattern matching errors. Closes #80174 This change allows numbers to be parsed as field names when pattern matching on structs, which allows us to provide better error messages when tuple structs are matched using a struct pattern. r? ``@estebank``
This commit is contained in:
commit
8e51bd4315
9 changed files with 151 additions and 21 deletions
|
@ -950,7 +950,7 @@ impl<'a> Parser<'a> {
|
|||
self.bump();
|
||||
Ok(Ident::new(symbol, self.prev_token.span))
|
||||
} else {
|
||||
self.parse_ident_common(false)
|
||||
self.parse_ident_common(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue