add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed'

This commit is contained in:
yukang 2022-11-03 14:15:17 +08:00
parent 57d3c58ed6
commit 1f21b96dce
15 changed files with 68 additions and 47 deletions

View file

@ -611,11 +611,11 @@ pub fn collect_trait_impl_trait_tys<'tcx>(
collected_tys.insert(def_id, ty);
}
Err(err) => {
tcx.sess.delay_span_bug(
let reported = tcx.sess.delay_span_bug(
return_span,
format!("could not fully resolve: {ty} => {err:?}"),
);
collected_tys.insert(def_id, tcx.ty_error());
collected_tys.insert(def_id, tcx.ty_error_with_guaranteed(reported));
}
}
}