Do not ICE when failing to resolve.

This commit is contained in:
Camille GILLOT 2022-02-04 18:53:06 +01:00
parent 114c9284b9
commit 2e45cd4b69

View File

@ -48,7 +48,7 @@ pub(crate) fn mir_callgraph_reachable<'tcx>(
trace!(?caller, ?param_env, ?substs, "cannot normalize, skipping");
continue;
};
let Some(callee) = ty::Instance::resolve(tcx, param_env, callee, substs).unwrap() else {
let Ok(Some(callee)) = ty::Instance::resolve(tcx, param_env, callee, substs) else {
trace!(?callee, "cannot resolve, skipping");
continue;
};