Rollup merge of #121181 - oli-obk:normalize_with_conflicting_impls, r=cjgillot
Fix an ICE in the recursion lint fixes #121170 I looked into it, and there is no good path towards tainting mir_build (where the ICE happens), but using `try_normalize` in a lint seems generally better anyway
This commit is contained in:
commit
f82875e242
3 changed files with 73 additions and 1 deletions
|
@ -137,7 +137,9 @@ impl<'tcx> TerminatorClassifier<'tcx> for CallRecursion<'tcx> {
|
|||
|
||||
let func_ty = func.ty(body, tcx);
|
||||
if let ty::FnDef(callee, args) = *func_ty.kind() {
|
||||
let normalized_args = tcx.normalize_erasing_regions(param_env, args);
|
||||
let Ok(normalized_args) = tcx.try_normalize_erasing_regions(param_env, args) else {
|
||||
return false;
|
||||
};
|
||||
let (callee, call_args) = if let Ok(Some(instance)) =
|
||||
Instance::resolve(tcx, param_env, callee, normalized_args)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue