Add hidden lifetime parameters to fix warning

This commit is contained in:
Philipp Hansch 2018-10-04 21:59:30 +02:00
parent c0ab8b2531
commit 391d53db66
No known key found for this signature in database
GPG Key ID: B6FA06A6E0E2665B

View File

@ -1076,7 +1076,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CastPass {
} }
} }
fn lint_fn_to_numeric_cast(cx: &LateContext<'_, '_>, expr: &Expr, cast_expr: &Expr, cast_from: Ty, cast_to: Ty) { fn lint_fn_to_numeric_cast(cx: &LateContext<'_, '_>, expr: &Expr, cast_expr: &Expr, cast_from: Ty<'_>, cast_to: Ty<'_>) {
match cast_from.sty { match cast_from.sty {
ty::FnDef(..) | ty::FnPtr(_) => { ty::FnDef(..) | ty::FnPtr(_) => {
let from_snippet = snippet(cx, cast_expr.span, "x"); let from_snippet = snippet(cx, cast_expr.span, "x");