about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJack Huey <jack.huey@umassmed.edu>2021-01-04 15:30:22 -0500
committerJack Huey <jack.huey@umassmed.edu>2021-01-16 18:40:47 -0500
commit7c3b6a63ade6ead9fc35d5fc20f53ea47f4eec71 (patch)
treef5536cc14c86378186f666eddc2cfb34302690e7
parentf06eeaf9827895f9ad67f07c4a85669ce6a1bba7 (diff)
downloadrust-7c3b6a63ade6ead9fc35d5fc20f53ea47f4eec71.tar.gz
rust-7c3b6a63ade6ead9fc35d5fc20f53ea47f4eec71.zip
Use pred not binder
-rw-r--r--clippy_lints/src/needless_pass_by_value.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs
index 9306b198051..6dc5654862b 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;
                         }