mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-09 13:33:43 +00:00
Cleanup
This commit is contained in:
parent
3436e21df5
commit
f06eeaf982
@ -115,7 +115,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
|
|||||||
.filter(|p| !p.is_global())
|
.filter(|p| !p.is_global())
|
||||||
.filter_map(|obligation| {
|
.filter_map(|obligation| {
|
||||||
// Note that we do not want to deal with qualified predicates here.
|
// Note that we do not want to deal with qualified predicates here.
|
||||||
let binder = obligation.predicate.kind();
|
let binder = obligation.predicate.bound_atom();
|
||||||
match binder.skip_binder() {
|
match binder.skip_binder() {
|
||||||
ty::PredicateAtom::Trait(pred, _) if !binder.has_escaping_bound_vars() => {
|
ty::PredicateAtom::Trait(pred, _) if !binder.has_escaping_bound_vars() => {
|
||||||
if pred.def_id() == sized_trait {
|
if pred.def_id() == sized_trait {
|
||||||
|
Loading…
Reference in New Issue
Block a user