1
Fork 0

bool->enum for ast::PatKind::Struct presence of ..

See cee794ee98/compiler/rustc_parse/src/parser/pat.rs (L890-L897) for the only place this is constructed.
This commit is contained in:
Alona Enraght-Moony 2023-12-22 23:29:20 +00:00
parent 3d0e6bed60
commit 1349d86c72
7 changed files with 30 additions and 15 deletions

View file

@ -488,7 +488,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))