mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
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.
This commit is contained in:
+9
-3
@@ -259,9 +259,15 @@ fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option<String>
|
||||
None,
|
||||
None,
|
||||
),
|
||||
PatKind::Struct(ref qself, ref path, ref fields, ellipsis) => {
|
||||
rewrite_struct_pat(qself, path, fields, ellipsis, self.span, context, shape)
|
||||
}
|
||||
PatKind::Struct(ref qself, ref path, ref fields, rest) => rewrite_struct_pat(
|
||||
qself,
|
||||
path,
|
||||
fields,
|
||||
rest == ast::PatFieldsRest::Rest,
|
||||
self.span,
|
||||
context,
|
||||
shape,
|
||||
),
|
||||
PatKind::MacCall(ref mac) => {
|
||||
rewrite_macro(mac, None, context, shape, MacroPosition::Pat)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user