This commit is contained in:
Robert Sedlacek 2020-07-03 18:23:36 +02:00
parent aa4bee228f
commit c0fd452840

View File

@ -146,12 +146,7 @@ enum DerefPossible {
Impossible,
}
fn apply_lint<'tcx>(
cx: &LateContext<'tcx>,
pat: &Pat<'_>,
expr_ty: Ty<'tcx>,
deref_possible: DerefPossible,
) -> bool {
fn apply_lint<'tcx>(cx: &LateContext<'tcx>, pat: &Pat<'_>, expr_ty: Ty<'tcx>, deref_possible: DerefPossible) -> bool {
let maybe_mismatch = find_first_mismatch(cx, pat, expr_ty, Level::Top);
if let Some((span, mutability, level)) = maybe_mismatch {
span_lint_and_help(