Rollup merge of #133517 - compiler-errors:deep-norm, r=lcnr

Deeply normalize when computing implied outlives bounds

r? lcnr

Unfortunately resolving regions is still slightly scuffed (though in an unrelated way). Specifically, we should be normalizing our param-env outlives when constructing the `OutlivesEnv`; otherwise, these assumptions (dd2837ec5d/compiler/rustc_infer/src/infer/outlives/env.rs (L78)) are not constructed correctly.

Let me know if you want us to track that somewhere.
This commit is contained in:
Matthias Krüger 2024-12-03 07:48:33 +01:00 committed by GitHub
commit 68279097d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 88 additions and 29 deletions

View file

@ -117,13 +117,12 @@ where
}
f(&mut wfcx)?;
let assumed_wf_types = wfcx.ocx.assumed_wf_types_and_report_errors(param_env, body_def_id)?;
let errors = wfcx.select_all_or_error();
if !errors.is_empty() {
return Err(infcx.err_ctxt().report_fulfillment_errors(errors));
}
let assumed_wf_types = wfcx.ocx.assumed_wf_types_and_report_errors(param_env, body_def_id)?;
debug!(?assumed_wf_types);
let infcx_compat = infcx.fork();