review comments
This commit is contained in:
parent
b334eef162
commit
f71e9ed7f1
2 changed files with 10 additions and 14 deletions
|
@ -121,7 +121,10 @@ where
|
|||
// contains unbound type parameters. It could be a slight
|
||||
// optimization to stop iterating early.
|
||||
if let Err(errors) = fulfill_cx.select_all_or_error(infcx) {
|
||||
bug!("Encountered errors `{:?}` resolving bounds after type-checking", errors);
|
||||
infcx.tcx.sess.delay_span_bug(
|
||||
rustc_span::DUMMY_SP,
|
||||
&format!("Encountered errors `{:?}` resolving bounds after type-checking", errors),
|
||||
);
|
||||
}
|
||||
|
||||
let result = infcx.resolve_vars_if_possible(result);
|
||||
|
|
|
@ -2031,12 +2031,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
&predicate.subst(tcx, substs),
|
||||
&mut obligations,
|
||||
);
|
||||
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,
|
||||
|
@ -2044,7 +2038,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
predicate,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// We are performing deduplication here to avoid exponential blowups
|
||||
// (#38528) from happening, but the real cause of the duplication is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue