diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-02-04 18:53:06 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-30 21:45:29 +0200 |
| commit | 2e45cd4b69bec951dda2120c070a38406d97ea1f (patch) | |
| tree | 153e7e2b81082a83afcc57a4896227823ef96cc1 /compiler/rustc_mir_transform/src/inline | |
| parent | 114c9284b91790fb8b807e763a1eed2b057ca2d1 (diff) | |
| download | rust-2e45cd4b69bec951dda2120c070a38406d97ea1f.tar.gz rust-2e45cd4b69bec951dda2120c070a38406d97ea1f.zip | |
Do not ICE when failing to resolve.
Diffstat (limited to 'compiler/rustc_mir_transform/src/inline')
| -rw-r--r-- | compiler/rustc_mir_transform/src/inline/cycle.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/inline/cycle.rs b/compiler/rustc_mir_transform/src/inline/cycle.rs index fd7de2bd1dc..ee4a6bfba0e 100644 --- a/compiler/rustc_mir_transform/src/inline/cycle.rs +++ b/compiler/rustc_mir_transform/src/inline/cycle.rs @@ -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; }; |
