region_outlives_predicate
no snapshot
This commit is contained in:
parent
608625dae9
commit
43ccacf89b
6 changed files with 15 additions and 42 deletions
|
@ -793,9 +793,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
|
|||
}
|
||||
ty::PredicateKind::RegionOutlives(binder) => {
|
||||
let binder = bound_predicate.rebind(binder);
|
||||
if select.infcx().region_outlives_predicate(&dummy_cause, binder).is_err() {
|
||||
return false;
|
||||
}
|
||||
select.infcx().region_outlives_predicate(&dummy_cause, binder)
|
||||
}
|
||||
ty::PredicateKind::TypeOutlives(binder) => {
|
||||
let binder = bound_predicate.rebind(binder);
|
||||
|
|
|
@ -789,24 +789,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
span_bug!(span, "coerce requirement gave wrong error: `{:?}`", predicate)
|
||||
}
|
||||
|
||||
ty::PredicateKind::RegionOutlives(predicate) => {
|
||||
let predicate = bound_predicate.rebind(predicate);
|
||||
let predicate = self.resolve_vars_if_possible(predicate);
|
||||
let err = self
|
||||
.region_outlives_predicate(&obligation.cause, predicate)
|
||||
.err()
|
||||
.unwrap();
|
||||
struct_span_err!(
|
||||
self.tcx.sess,
|
||||
span,
|
||||
E0279,
|
||||
"the requirement `{}` is not satisfied (`{}`)",
|
||||
predicate,
|
||||
err,
|
||||
)
|
||||
}
|
||||
|
||||
ty::PredicateKind::Projection(..) | ty::PredicateKind::TypeOutlives(..) => {
|
||||
ty::PredicateKind::RegionOutlives(..)
|
||||
| ty::PredicateKind::Projection(..)
|
||||
| ty::PredicateKind::TypeOutlives(..) => {
|
||||
let predicate = self.resolve_vars_if_possible(obligation.predicate);
|
||||
struct_span_err!(
|
||||
self.tcx.sess,
|
||||
|
|
|
@ -359,15 +359,10 @@ impl<'a, 'b, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'tcx> {
|
|||
|
||||
ty::PredicateKind::RegionOutlives(data) => {
|
||||
if infcx.considering_regions || data.has_placeholders() {
|
||||
match infcx
|
||||
.region_outlives_predicate(&obligation.cause, Binder::dummy(data))
|
||||
{
|
||||
Ok(()) => ProcessResult::Changed(vec![]),
|
||||
Err(_) => ProcessResult::Error(CodeSelectionError(Unimplemented)),
|
||||
}
|
||||
} else {
|
||||
ProcessResult::Changed(vec![])
|
||||
infcx.region_outlives_predicate(&obligation.cause, Binder::dummy(data));
|
||||
}
|
||||
|
||||
ProcessResult::Changed(vec![])
|
||||
}
|
||||
|
||||
ty::PredicateKind::TypeOutlives(ty::OutlivesPredicate(t_a, r_b)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue