This commit is contained in:
Matthias Krüger 2018-12-08 01:56:03 +01:00 committed by Philipp Hansch
parent 26602ddff4
commit f13d23de41
No known key found for this signature in database
GPG key ID: B6FA06A6E0E2665B
46 changed files with 140 additions and 140 deletions

View file

@ -69,7 +69,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
let ty = cx.tables.expr_ty(&args[0]);
if match_type(cx, ty, &paths::OPTION) || match_trait_method(cx, e, &paths::ITERATOR);
if let hir::ExprKind::Closure(_, _, body_id, _, _) = args[1].node;
let closure_body = cx.tcx.hir.body(body_id);
let closure_body = cx.tcx.hir().body(body_id);
let closure_expr = remove_blocks(&closure_body.value);
then {
match closure_body.arguments[0].pat.node {