mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
review comments
This commit is contained in:
@@ -121,7 +121,10 @@ fn drain_fulfillment_cx_or_panic<T>(
|
||||
// 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,19 +2031,12 @@ fn impl_or_trait_obligations(
|
||||
&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,
|
||||
param_env,
|
||||
predicate,
|
||||
});
|
||||
}
|
||||
obligations.push(Obligation {
|
||||
cause: cause.clone(),
|
||||
recursion_depth,
|
||||
param_env,
|
||||
predicate,
|
||||
});
|
||||
}
|
||||
|
||||
// We are performing deduplication here to avoid exponential blowups
|
||||
|
||||
Reference in New Issue
Block a user