parent
07a63e6d1f
commit
b334eef162
3 changed files with 72 additions and 6 deletions
|
@ -2031,12 +2031,19 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
&predicate.subst(tcx, substs),
|
||||
&mut obligations,
|
||||
);
|
||||
obligations.push(Obligation {
|
||||
cause: cause.clone(),
|
||||
recursion_depth,
|
||||
param_env,
|
||||
predicate,
|
||||
});
|
||||
if predicate.references_error() {
|
||||
self.tcx().sess.delay_span_bug(
|
||||
cause.span,
|
||||
&format!("impl_or_trait_obligation with errors: {:?}", predicate),
|
||||
);
|
||||
} else {
|
||||
obligations.push(Obligation {
|
||||
cause: cause.clone(),
|
||||
recursion_depth,
|
||||
param_env,
|
||||
predicate,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// We are performing deduplication here to avoid exponential blowups
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue