From 53260df2fa499f1e1908fb2a6b5ce3442f9a023e Mon Sep 17 00:00:00 2001 From: Takayuki Date: Mon, 12 Apr 2021 21:36:49 +0900 Subject: [PATCH] fix a false negative on `needless_return` --- clippy_lints/src/returns.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/clippy_lints/src/returns.rs b/clippy_lints/src/returns.rs index af772cf4a14..3a6151dce71 100644 --- a/clippy_lints/src/returns.rs +++ b/clippy_lints/src/returns.rs @@ -223,6 +223,7 @@ fn check_final_expr<'tcx>( }, _ => (), }, + ExprKind::DropTemps(expr) => check_final_expr(cx, expr, None, RetReplacement::Empty), _ => (), } }