fix: clippy_utils::Sugg should treat hir::ExprKind::DropTemps as transparent

This commit is contained in:
Jacob Kiesel 2022-09-14 13:29:32 -06:00
parent 4ffdce09b6
commit dd97c1ed20

View File

@ -155,8 +155,8 @@ impl<'a> Sugg<'a> {
| hir::ExprKind::Ret(..)
| hir::ExprKind::Struct(..)
| hir::ExprKind::Tup(..)
| hir::ExprKind::DropTemps(_)
| hir::ExprKind::Err => Sugg::NonParen(get_snippet(expr.span)),
hir::ExprKind::DropTemps(inner) => Self::hir_from_snippet(inner, get_snippet),
hir::ExprKind::Assign(lhs, rhs, _) => {
Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span))
},