1
Fork 0

Remove variances_of on RPITIT gats, remove its one use-case

This commit is contained in:
Michael Goulet 2023-07-07 02:29:57 +00:00
parent 87c8c83ec7
commit ca8202d429
2 changed files with 3 additions and 20 deletions

View file

@ -473,17 +473,6 @@ where
}
}
ty::Alias(ty::Projection, proj) if self.tcx.is_impl_trait_in_trait(proj.def_id) => {
// Skip lifetime parameters that are not captures.
let variances = self.tcx.variances_of(proj.def_id);
for (v, s) in std::iter::zip(variances, proj.substs.iter()) {
if *v != ty::Variance::Bivariant {
s.visit_with(self);
}
}
}
_ => {
ty.super_visit_with(self);
}