Skip to content

Commit c3f7429

Browse files
committed
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 #80952 (comment)
1 parent 058a710 commit c3f7429

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)