Auto merge of #7067 - TaKO8Ki:fix-false-negative-on-needless-return, r=llogiq

Fix a false negative on `needless return`

closes #7042

changelog: fix a false negative on `needless return`
This commit is contained in:
bors
2021-04-12 18:00:38 +00:00
4 changed files with 268 additions and 31 deletions

View File

@@ -223,6 +223,7 @@ fn check_final_expr<'tcx>(
},
_ => (),
},
ExprKind::DropTemps(expr) => check_final_expr(cx, expr, None, RetReplacement::Empty),
_ => (),
}
}