We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c3b6a6 commit 8256960Copy full SHA for 8256960
clippy_lints/src/needless_pass_by_value.rs
@@ -115,8 +115,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
115
.filter(|p| !p.is_global())
116
.filter_map(|obligation| {
117
// Note that we do not want to deal with qualified predicates here.
118
- let binder = obligation.predicate.bound_atom();
119
- match binder.skip_binder() {
+ match obligation.predicate.bound_atom().skip_binder() {
120
ty::PredicateAtom::Trait(pred, _) if !pred.has_escaping_bound_vars() => {
121
if pred.def_id() == sized_trait {
122
return None;
0 commit comments