Overhaul PredicateInner and Predicate.
Specifically, change `Ty` from this:
```
pub struct Predicate<'tcx> { inner: &'tcx PredicateInner<'tcx> }
```
to this:
```
pub struct Predicate<'tcx>(&'tcx Interned<PredicateS<'tcx>>)
```
where `PredicateInner` is renamed as `PredicateS`.
This (plus a few other minor changes) makes the parallels with `Ty` and
`TyS` much clearer, and makes the uniqueness more explicit.
This commit is contained in:
@@ -198,7 +198,7 @@ fn extend_cause_with_original_assoc_item_obligation<'tcx>(
|
||||
trait_ref: &ty::TraitRef<'tcx>,
|
||||
item: Option<&hir::Item<'tcx>>,
|
||||
cause: &mut traits::ObligationCause<'tcx>,
|
||||
pred: &ty::Predicate<'tcx>,
|
||||
pred: ty::Predicate<'tcx>,
|
||||
) {
|
||||
debug!(
|
||||
"extended_cause_with_original_assoc_item_obligation {:?} {:?} {:?} {:?}",
|
||||
@@ -319,7 +319,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
|
||||
trait_ref,
|
||||
item,
|
||||
&mut cause,
|
||||
&obligation.predicate,
|
||||
obligation.predicate,
|
||||
);
|
||||
traits::Obligation::with_depth(cause, depth, param_env, obligation.predicate)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user