Skip to content

Commit ffa87ca

Browse files
authored
Rollup merge of rust-lang#80969 - camelid:monomorph-ice-msg, r=nagisa
Use better ICE message when no MIR is available The ICE message is somewhat confusing and overly specific - the issue is that there's no MIR available. This should make debugging these ICEs easier since the error tells you what's actually wrong, not what it was trying to do when it failed. cc rust-lang#80952 (comment) cc ```@jyn514```
2 parents 17bfa9c + c3f7429 commit ffa87ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir/src/monomorphize/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>) ->
823823
}
824824

825825
if !tcx.is_mir_available(def_id) {
826-
bug!("cannot create local mono-item for {:?}", def_id)
826+
bug!("no MIR available for {:?}", def_id);
827827
}
828828

829829
true

0 commit comments

Comments
 (0)