Skip to content

Commit d9ea102

Browse files
committed
bool->enum for ast::PatKind::Struct presence of ..
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.
1 parent df30a7a commit d9ea102

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/patterns.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,15 @@ impl Rewrite for Pat {
259259
None,
260260
None,
261261
),
262-
PatKind::Struct(ref qself, ref path, ref fields, ellipsis) => {
263-
rewrite_struct_pat(qself, path, fields, ellipsis, self.span, context, shape)
264-
}
262+
PatKind::Struct(ref qself, ref path, ref fields, rest) => rewrite_struct_pat(
263+
qself,
264+
path,
265+
fields,
266+
rest == ast::PatFieldsRest::Rest,
267+
self.span,
268+
context,
269+
shape,
270+
),
265271
PatKind::MacCall(ref mac) => {
266272
rewrite_macro(mac, None, context, shape, MacroPosition::Pat)
267273
}

0 commit comments

Comments
 (0)