Use pred not binder
This commit is contained in:
parent
e76476afe4
commit
7f24c21a50
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue