diff --git a/src/patterns.rs b/src/patterns.rs index 8504999b8ff..0fa6edaa5d7 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -259,9 +259,15 @@ fn rewrite(&self, context: &RewriteContext<'_>, shape: Shape) -> Option 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) }