diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-01-14 18:00:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-14 18:00:16 +0000 |
| commit | 90cc815829acacc1ccb831db4134ef3198cbb3b7 (patch) | |
| tree | 00dadeccadfbba969fa197ddbb260bcfdd3f7ee8 /compiler/rustc_mir | |
| parent | 7855a730b971d39a4743cf6183e9591fae6f17a6 (diff) | |
| parent | c3f7429fb4edae31b5e4838404aa2a11117dabcc (diff) | |
| download | rust-90cc815829acacc1ccb831db4134ef3198cbb3b7.tar.gz rust-90cc815829acacc1ccb831db4134ef3198cbb3b7.zip | |
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`````
Diffstat (limited to 'compiler/rustc_mir')
| -rw-r--r-- | compiler/rustc_mir/src/monomorphize/collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir/src/monomorphize/collector.rs b/compiler/rustc_mir/src/monomorphize/collector.rs index a8f2b4d60e1..75f80f69bea 100644 --- a/compiler/rustc_mir/src/monomorphize/collector.rs +++ b/compiler/rustc_mir/src/monomorphize/collector.rs @@ -823,7 +823,7 @@ fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>) -> } if !tcx.is_mir_available(def_id) { - bug!("cannot create local mono-item for {:?}", def_id) + bug!("no MIR available for {:?}", def_id); } true |
