Fix an ICE in the recursion lint
This commit is contained in:
parent
0f806a9812
commit
db4ba498d9
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