about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
authorRyan Levick <ryan.levick@gmail.com>2020-12-10 13:20:07 +0100
committerRyan Levick <me@ryanlevick.com>2021-06-10 13:18:41 +0200
commit58c63cf8dec2b7d97667932c17248f774dd6e1ab (patch)
tree84d2dd1263f85b38557898b9462612f298aec81d /src/expr.rs
parente243be6adad16ad65c3349e476d528d1f416ed59 (diff)
Add support for using qualified paths with structs in expression and pattern
position.
Diffstat (limited to 'src/expr.rs')
-rw-r--r--src/expr.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr.rs b/src/expr.rs
index ced382c4915..bca9f77f959 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -107,7 +107,9 @@ pub(crate) fn format_expr(
         }
         ast::ExprKind::Unary(op, ref subexpr) => rewrite_unary_op(context, op, subexpr, shape),
         ast::ExprKind::Struct(ref struct_expr) => {
-            let ast::StructExpr { fields, path, rest } = &**struct_expr;
+            let ast::StructExpr {
+                fields, path, rest, ..
+            } = &**struct_expr;
             rewrite_struct_lit(context, path, fields, rest, &expr.attrs, expr.span, shape)
         }
         ast::ExprKind::Tup(ref items) => {