diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs index 9306b1980..6dc565486 100644 --- a/clippy_lints/src/needless_pass_by_value.rs +++ b/clippy_lints/src/needless_pass_by_value.rs @@ -117,7 +117,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue { // Note that we do not want to deal with qualified predicates here. let binder = obligation.predicate.bound_atom(); match binder.skip_binder() { - ty::PredicateAtom::Trait(pred, _) if !binder.has_escaping_bound_vars() => { + ty::PredicateAtom::Trait(pred, _) if !pred.has_escaping_bound_vars() => { if pred.def_id() == sized_trait { return None; }