Auto merge of #120847 - oli-obk:track_errors9, r=compiler-errors

Continue compilation after check_mod_type_wf errors

The ICEs fixed here were probably reachable through const eval gymnastics before, but now they are easily reachable without that, too.

The new errors are often bugfixes, where useful errors were missing, because they were reported after the early abort. In other cases sometimes they are just duplication of already emitted errors, which won't be user-visible due to deduplication.

fixes https://github.com/rust-lang/rust/issues/120860
This commit is contained in:
bors
2024-02-14 18:32:19 +00:00
215 changed files with 2723 additions and 293 deletions

View File

@@ -3116,10 +3116,11 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
obligation.param_env,
trait_ref.args.const_at(3),
) else {
span_bug!(
self.dcx().span_delayed_bug(
span,
"Unable to construct rustc_transmute::Assume where it was previously possible"
"Unable to construct rustc_transmute::Assume where it was previously possible",
);
return GetSafeTransmuteErrorAndReason::Silent;
};
match rustc_transmute::TransmuteTypeEnv::new(self.infcx).is_transmutable(