mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
fix: clippy_utils::Sugg should treat hir::ExprKind::DropTemps as transparent
This commit is contained in:
parent
4ffdce09b6
commit
dd97c1ed20
@ -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))
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user