move Constness into TraitPredicate

This commit is contained in:
Deadbeef 2021-07-22 21:56:07 +08:00
parent 04c9901a08
commit 32390a0df6
No known key found for this signature in database
GPG key ID: 027DF9338862ADDD
49 changed files with 157 additions and 124 deletions

View file

@ -2657,7 +2657,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
let obligations = predicates.predicates.iter().filter_map(|&(pred, _)| {
let bound_predicate = pred.kind();
match bound_predicate.skip_binder() {
ty::PredicateKind::Trait(data, _) => {
ty::PredicateKind::Trait(data) => {
// The order here needs to match what we would get from `subst_supertrait`
let pred_bound_vars = bound_predicate.bound_vars();
let mut all_bound_vars = bound_vars.clone();