impl<'tcx> LateLintPass<'tcx> for NoopMethodCall {
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
// We only care about method calls.
- let ExprKind::MethodCall(call, _, elements, _) = &expr.kind else {
+ let ExprKind::MethodCall(call, elements, _) = &expr.kind else {
return
};
// We only care about method calls corresponding to the `Clone`, `Deref` and `Borrow`
_ => return,
};
let substs = cx.typeck_results().node_substs(expr.hir_id);
- if substs.definitely_needs_subst(cx.tcx) {
+ if substs.needs_subst() {
// We can't resolve on types that require monomorphization, so we don't handle them if
// we need to perfom substitution.
return;