region_outlives_predicate
no snapshot
This commit is contained in:
parent
608625dae9
commit
43ccacf89b
6 changed files with 15 additions and 42 deletions
|
@ -1061,16 +1061,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
&self,
|
||||
cause: &traits::ObligationCause<'tcx>,
|
||||
predicate: ty::PolyRegionOutlivesPredicate<'tcx>,
|
||||
) -> UnitResult<'tcx> {
|
||||
self.commit_if_ok(|_snapshot| {
|
||||
let ty::OutlivesPredicate(r_a, r_b) =
|
||||
self.replace_bound_vars_with_placeholders(predicate);
|
||||
let origin = SubregionOrigin::from_obligation_cause(cause, || {
|
||||
RelateRegionParamBound(cause.span)
|
||||
});
|
||||
self.sub_regions(origin, r_b, r_a); // `b : a` ==> `a <= b`
|
||||
Ok(())
|
||||
})
|
||||
) {
|
||||
let ty::OutlivesPredicate(r_a, r_b) = self.replace_bound_vars_with_placeholders(predicate);
|
||||
let origin =
|
||||
SubregionOrigin::from_obligation_cause(cause, || RelateRegionParamBound(cause.span));
|
||||
self.sub_regions(origin, r_b, r_a); // `b : a` ==> `a <= b`
|
||||
}
|
||||
|
||||
/// Number of type variables created so far.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue