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:
parent
3d0e6bed60
commit
1349d86c72
7 changed files with 30 additions and 15 deletions
|
|
@ -293,7 +293,7 @@ fn extend_with_struct_pat(
|
|||
qself1: &Option<P<ast::QSelf>>,
|
||||
path1: &ast::Path,
|
||||
fps1: &mut [ast::PatField],
|
||||
rest1: bool,
|
||||
rest1: ast::PatFieldsRest,
|
||||
start: usize,
|
||||
alternatives: &mut ThinVec<P<Pat>>,
|
||||
) -> bool {
|
||||
|
|
|
|||
|
|
@ -259,9 +259,15 @@ impl Rewrite for Pat {
|
|||
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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue