]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #81235 - reese:rw-tuple-diagnostics, r=estebank
authorDylan DPC <dylan.dpc@gmail.com>
Tue, 23 Feb 2021 01:51:44 +0000 (02:51 +0100)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 01:51:44 +0000 (02:51 +0100)
commit8e51bd4315bad8456c6cabbfc338be97c17f3700
tree9ab4c7c343fb46f4b8c6e6cd8ef4ddab138dc806
parent72e6d51583ed5fa97ee06fe0259b82b28367874e
parentd8540ae5a98b6135253521cdbf34c5953494a5bf
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``
compiler/rustc_parse/src/parser/mod.rs
compiler/rustc_parse/src/parser/pat.rs
compiler/rustc_typeck/src/check/pat.rs