We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38e293c commit 3436e21Copy full SHA for 3436e21
clippy_lints/src/needless_pass_by_value.rs
@@ -115,7 +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 ty::PredicateKind::ForAll(binder) = obligation.predicate.kind();
+ let binder = obligation.predicate.kind();
119
match binder.skip_binder() {
120
ty::PredicateAtom::Trait(pred, _) if !binder.has_escaping_bound_vars() => {
121
if pred.def_id() == sized_trait {
0 commit comments