add tcx
to fn walk
This commit is contained in:
parent
bfaf13af4e
commit
cc47998e28
29 changed files with 73 additions and 67 deletions
|
@ -278,7 +278,7 @@ fn predicate_references_self(
|
|||
(predicate, sp): (ty::Predicate<'tcx>, Span),
|
||||
) -> Option<Span> {
|
||||
let self_ty = tcx.types.self_param;
|
||||
let has_self_ty = |arg: &GenericArg<'_>| arg.walk().any(|arg| arg == self_ty.into());
|
||||
let has_self_ty = |arg: &GenericArg<'tcx>| arg.walk(tcx).any(|arg| arg == self_ty.into());
|
||||
match predicate.kind().skip_binder() {
|
||||
ty::PredicateKind::Trait(ref data) => {
|
||||
// In the case of a trait predicate, we can skip the "self" type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue