diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-12-23 16:23:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-23 16:23:54 +0100 |
| commit | bdc4480914dfa65958b913ef89bbf4779a4eb3fc (patch) | |
| tree | 9116d80fc9b6b4f4bf08a311ae338d326bb382de /compiler/rustc_expand/src/build.rs | |
| parent | edcbcc768a484d52deb315e7c583fe4b2ab4f25b (diff) | |
| parent | 1349d86c72fe4d57134edb025d64e0ddff804d77 (diff) | |
| download | rust-bdc4480914dfa65958b913ef89bbf4779a4eb3fc.tar.gz rust-bdc4480914dfa65958b913ef89bbf4779a4eb3fc.zip | |
Rollup merge of #119231 - aDotInTheVoid:PatKind-struct-bool-docs, r=compiler-errors
Clairify `ast::PatKind::Struct` presese of `..` by using an enum instead of a bool The bool is mainly used for when a `..` is present, but it is also set on recovery to avoid errors. The doc comment not describes both of these cases. See https://github.com/rust-lang/rust/blob/cee794ee98d49b45a55ba225680d98e0c4672736/compiler/rustc_parse/src/parser/pat.rs#L890-L897 for the only place this is constructed. r? ``@compiler-errors``
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index f9eddfeeaa8..f9bfebee12e 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -491,7 +491,7 @@ impl<'a> ExtCtxt<'a> { path: ast::Path, field_pats: ThinVec<ast::PatField>, ) -> P<ast::Pat> { - self.pat(span, PatKind::Struct(None, path, field_pats, false)) + self.pat(span, PatKind::Struct(None, path, field_pats, ast::PatFieldsRest::None)) } pub fn pat_tuple(&self, span: Span, pats: ThinVec<P<ast::Pat>>) -> P<ast::Pat> { self.pat(span, PatKind::Tuple(pats)) |
