This commit is contained in:
Bood Qian 2017-02-17 08:39:58 +08:00
parent 2f00ea3a07
commit 05a6945adc

View File

@ -538,9 +538,10 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CastPass {
span_lint(cx,
UNNECESSARY_CAST,
expr.span,
&format!("casting to the same type is unnecessary (`{}` -> `{}`)", cast_from, cast_to));
&format!("casting to the same type is unnecessary (`{}` -> `{}`)",
cast_from, cast_to));
}
}
},
}
}
if cast_from.is_numeric() && cast_to.is_numeric() && !in_external_macro(cx, expr.span) {