mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 10:04:23 +00:00
Rollup merge of #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 https://github.com/rust-lang/rust/pull/80952#issuecomment-759198841 cc `````@jyn514`````
This commit is contained in:
commit
90cc815829
@ -823,7 +823,7 @@ fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>) ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !tcx.is_mir_available(def_id) {
|
if !tcx.is_mir_available(def_id) {
|
||||||
bug!("cannot create local mono-item for {:?}", def_id)
|
bug!("no MIR available for {:?}", def_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
true
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user