This commit is contained in:
Oliver Schneider
2017-08-15 11:10:49 +02:00
parent 3ab06c1f77
commit f3ae929b2d
27 changed files with 60 additions and 57 deletions

View File

@@ -47,8 +47,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnnecessaryMutPassed {
}
},
ExprMethodCall(ref path, _, ref arguments) => {
let def_id = cx.tables.type_dependent_defs[&e.id].def_id();
let substs = cx.tables.node_substs(e.id);
let def_id = cx.tables.type_dependent_defs()[e.hir_id].def_id();
let substs = cx.tables.node_substs(e.hir_id);
let method_type = cx.tcx.type_of(def_id).subst(cx.tcx, substs);
check_arguments(cx, arguments, method_type, &path.name.as_str())
},