diff options
| author | Ryan Levick <ryan.levick@gmail.com> | 2020-12-10 13:20:07 +0100 |
|---|---|---|
| committer | Ryan Levick <me@ryanlevick.com> | 2021-06-10 13:18:41 +0200 |
| commit | 58c63cf8dec2b7d97667932c17248f774dd6e1ab (patch) | |
| tree | 84d2dd1263f85b38557898b9462612f298aec81d /src/expr.rs | |
| parent | e243be6adad16ad65c3349e476d528d1f416ed59 (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.rs | 4 |
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) => { |
