Make select_* methods return Vec for TraitEngine

This commit is contained in:
Deadbeef 2021-11-08 23:35:23 +08:00
parent b3074819f6
commit f1126f1272
No known key found for this signature in database
GPG key ID: 027DF9338862ADDD
25 changed files with 147 additions and 117 deletions

View file

@ -120,7 +120,8 @@ where
// In principle, we only need to do this so long as `result`
// 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) {
let errors = fulfill_cx.select_all_or_error(infcx);
if !errors.is_empty() {
infcx.tcx.sess.delay_span_bug(
rustc_span::DUMMY_SP,
&format!("Encountered errors `{:?}` resolving bounds after type-checking", errors),