Skip to content

Commit f21624f

Browse files
committed
fix: don't lint the method receiver
"that would affect method lookup"
1 parent 1f63044 commit f21624f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/needless_path_new.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPathNew {
4343
ExprKind::Call(fn_expr, args) => {
4444
check_arguments(cx, &mut args.iter(), cx.typeck_results().expr_ty(fn_expr));
4545
},
46-
ExprKind::MethodCall(_, receiver, arguments, _)
46+
ExprKind::MethodCall(_, _, arguments, _)
4747
if let Some(def_id) = cx.typeck_results().type_dependent_def_id(e.hir_id) =>
4848
{
4949
let args = cx.typeck_results().node_args(e.hir_id);
5050
let method_type = cx.tcx.type_of(def_id).instantiate(cx.tcx, args);
51-
check_arguments(cx, &mut iter::once(receiver).chain(arguments.iter()), method_type);
51+
check_arguments(cx, &mut arguments.iter(), method_type);
5252
},
5353
_ => (),
5454
}

0 commit comments

Comments
 (0)