Inline loose_check fn on call site
This commit is contained in:
parent
45983fecff
commit
8c4ffaaa7c
@ -287,7 +287,7 @@ fn implicit_negative<'cx, 'tcx>(
|
||||
predicate: p,
|
||||
})
|
||||
.chain(obligations)
|
||||
.find(|o| loose_check(selcx, o));
|
||||
.find(|o| !selcx.predicate_may_hold_fatal(o));
|
||||
|
||||
if let Some(failing_obligation) = opt_failing_obligation {
|
||||
debug!("overlap: obligation unsatisfiable {:?}", failing_obligation);
|
||||
@ -363,16 +363,6 @@ fn negative_impl<'cx, 'tcx>(
|
||||
})
|
||||
}
|
||||
|
||||
fn loose_check<'cx, 'tcx>(
|
||||
selcx: &mut SelectionContext<'cx, 'tcx>,
|
||||
o: &PredicateObligation<'tcx>,
|
||||
) -> bool {
|
||||
// FIXME: the call to `selcx.predicate_may_hold_fatal` below should be ported
|
||||
// to the canonical trait query form, `infcx.predicate_may_hold`, once
|
||||
// the new system supports intercrate mode (which coherence needs).
|
||||
!selcx.predicate_may_hold_fatal(o)
|
||||
}
|
||||
|
||||
fn negative_impl_exists<'cx, 'tcx>(
|
||||
selcx: &SelectionContext<'cx, 'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
|
Loading…
Reference in New Issue
Block a user