about summary refs log tree commit diff
path: root/src
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
commit7f24c21a5055f65e34decbf731b8a162502a0d0e (patch)
treec0cc664b9ec643248b0b9a67d006cbb175065d72 /src
parente76476afe4179fb0c430cfcd86d061cc990a7bf7 (diff)
downloadrust-7f24c21a5055f65e34decbf731b8a162502a0d0e.tar.gz
rust-7f24c21a5055f65e34decbf731b8a162502a0d0e.zip
Use pred not binder
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs b/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
index 9306b198051..6dc5654862b 100644
--- a/src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
+++ b/src/tools/clippy/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;
                         }