Skip to content

Commit dd97c1e

Browse files
committed
fix: clippy_utils::Sugg should treat hir::ExprKind::DropTemps as transparent
1 parent 4ffdce0 commit dd97c1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/sugg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ impl<'a> Sugg<'a> {
155155
| hir::ExprKind::Ret(..)
156156
| hir::ExprKind::Struct(..)
157157
| hir::ExprKind::Tup(..)
158-
| hir::ExprKind::DropTemps(_)
159158
| hir::ExprKind::Err => Sugg::NonParen(get_snippet(expr.span)),
159+
hir::ExprKind::DropTemps(inner) => Self::hir_from_snippet(inner, get_snippet),
160160
hir::ExprKind::Assign(lhs, rhs, _) => {
161161
Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span))
162162
},

0 commit comments

Comments
 (0)