1
Fork 0

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

@ -108,7 +108,7 @@ pub fn predicate_obligations<'a, 'tcx>(
// It's ok to skip the binder here because wf code is prepared for it
match predicate.kind().skip_binder() {
ty::PredicateKind::Trait(t, _) => {
ty::PredicateKind::Trait(t) => {
wf.compute_trait_ref(&t.trait_ref, Elaborate::None);
}
ty::PredicateKind::RegionOutlives(..) => {}
@ -226,7 +226,7 @@ fn extend_cause_with_original_assoc_item_obligation<'tcx>(
}
}
}
ty::PredicateKind::Trait(pred, _) => {
ty::PredicateKind::Trait(pred) => {
// An associated item obligation born out of the `trait` failed to be met. An example
// can be seen in `ui/associated-types/point-at-type-on-obligation-failure-2.rs`.
debug!("extended_cause_with_original_assoc_item_obligation trait proj {:?}", pred);