Skip to content

Commit 2e45cd4

Browse files
committed
Do not ICE when failing to resolve.
1 parent 114c928 commit 2e45cd4

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_mir_transform/src/inline

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/inline/cycle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub(crate) fn mir_callgraph_reachable<'tcx>(
4848
trace!(?caller, ?param_env, ?substs, "cannot normalize, skipping");
4949
continue;
5050
};
51-
let Some(callee) = ty::Instance::resolve(tcx, param_env, callee, substs).unwrap() else {
51+
let Ok(Some(callee)) = ty::Instance::resolve(tcx, param_env, callee, substs) else {
5252
trace!(?callee, "cannot resolve, skipping");
5353
continue;
5454
};

0 commit comments

Comments
 (0)