I'm seeing an ICE at this commit: https://github.com/sfackler/rust-postgres-derive/commit/50d93bd6f596fb38bc77674903fda0b9ac120933
Not sure if it's a derive issue or an issue with that lint - cc @keeperofdakeys
error: internal compiler error: ../src/librustc_metadata/decoder.rs:490: entry: id not found: DefIndex(1) in crate "postgres_derive" with number 12
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:424
stack backtrace:
1: 0x106b7d4ea - std::sys::imp::backtrace::tracing::imp::write::h944c02ac40aee2d7
2: 0x106b8a77f - std::panicking::default_hook::{{closure}}::h6875a2976258b020
3: 0x106b8a32d - std::panicking::default_hook::h88ffbc5922643264
4: 0x106b8ac46 - std::panicking::rust_panic_with_hook::ha5aed1dfc0e220e3
5: 0x10431bf2a - std::panicking::begin_panic::h264cdc75d51b518b
6: 0x10432cd34 - rustc_errors::Handler::bug::h620f7270292f0095
7: 0x103690ecc - rustc::session::opt_span_bug_fmt::{{closure}}::h4a9b70c3df8b4b3a
8: 0x103690cd9 - rustc::session::opt_span_bug_fmt::h7d83586c6e2c7ae6
9: 0x10369085a - rustc::session::bug_fmt::he2d2f00a4afa9d1e
10: 0x102bc7b73 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry::h5e3d8114267e9116
11: 0x102bd04ab - rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore<'tcx> for rustc_metadata::cstore::CStore>::visibility::h2949b511f18961ee
12: 0x102bd8f66 - rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore<'tcx> for rustc_metadata::cstore::CStore>::visible_parent_map::hab53861eb74bce8d
13: 0x1036da1c4 - rustc::ty::item_path::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::push_item_path::haa7f7a9afda5f72a
14: 0x1037262d5 - rustc::util::ppaux::parameterized::h7bcfb1fd3d8a947a
15: 0x10372cde1 - rustc::util::ppaux::<impl core::fmt::Display for rustc::ty::sty::TypeVariants<'tcx>>::fmt::haeadfb9e15605fa1
16: 0x106bcecb5 - core::fmt::write::h01739b8f12f355f9
17: 0x106bcfb6d - core::fmt::Formatter::write_fmt::h50f274f007b40806
18: 0x10372e600 - rustc::util::ppaux::<impl core::fmt::Display for rustc::ty::TyS<'tcx>>::fmt::h996bb925a7d044a6
19: 0x106bcecb5 - core::fmt::write::h01739b8f12f355f9
20: 0x106b8df6e - collections::fmt::format::h2e5dd97da45bd3ab
21: 0x102ee2e65 - rustc_lint::builtin::BoxPointers::check_heap_type::h95cba4228b2cf853
22: 0x102ee30cb - <rustc_lint::builtin::BoxPointers as rustc::lint::LateLintPass>::check_expr::hcb948f4ae841d1ba
23: 0x10361b61f - rustc::lint::context::LintContext::with_lint_attrs::h979dbacc7007af3e
24: 0x1036246ea - <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_fn::h09fb437fbbacb211
25: 0x103575e88 - rustc::hir::intravisit::walk_impl_item::hef51e524491a11f7
26: 0x1036159db - rustc::lint::context::LintContext::with_lint_attrs::h69c0c82b5b2484fd
27: 0x1036234fa - <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_item::h6b7c9b9fdd4d4734
28: 0x103625b9e - <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_block::hf87d7e961ad31ef2
29: 0x10357a9c1 - rustc::hir::intravisit::walk_expr::hb7389a396e853290
30: 0x10361b657 - rustc::lint::context::LintContext::with_lint_attrs::h979dbacc7007af3e
31: 0x1036246ea - <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_fn::h09fb437fbbacb211
32: 0x103623251 - <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_item::h6b7c9b9fdd4d4734
33: 0x10362579b - <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_mod::h0650ead2ce14ae2d
34: 0x10362c174 - rustc::lint::context::check_crate::h133ae6a0f266d11d
35: 0x102481b67 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h97a3a12d948df547
36: 0x10247b37d - rustc_driver::driver::phase_3_run_analysis_passes::hb0ad9de18d423e67
37: 0x102462bc5 - rustc_driver::driver::compile_input::h8e119234b60571d5
38: 0x1024a8229 - rustc_driver::run_compiler::hbdfc4f84e2e0f4b9
39: 0x1023c7988 - std::panicking::try::do_call::hf679f17bf3b43b0b
40: 0x106b8d1fa - __rust_maybe_catch_panic
41: 0x1023ebaaf - <F as alloc::boxed::FnBox<A>>::call_box::h506fb5d7b8891cd4
42: 0x106b898d4 - std::sys::imp::thread::Thread::new::thread_start::h8084b1107992ae5b
43: 0x7fff9ac4399c - _pthread_body
44: 0x7fff9ac43919 - _pthread_start
I can confirm that this ICE also happens with my own derive crate, which worked on the original PR that I submitted. So I suspect that another PR may have changed something. However, there are rpass-fulldeps tests, so I'm not sure how this snuck through. Note that the derive crate itself compiles fine, the ICE only happens when compiling a crate which uses a derive crate.
When I get some time, I'll start investigating this. I'm unfamiliar with the code where the panic is happening, but it must be related to my PR somehow.
Happened upon this bug on a project using Serde:
error: internal compiler error: ../src/librustc_metadata/decoder.rs:490: entry: id not found: DefIndex(1) in crate "serde_derive" with number 41
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:424
stack backtrace:
1: 0x111d774ea - std::sys::imp::backtrace::tracing::imp::write::h944c02ac40aee2d7
2: 0x111d8477f - std::panicking::default_hook::{{closure}}::h6875a2976258b020
3: 0x111d8432d - std::panicking::default_hook::h88ffbc5922643264
4: 0x111d84c46 - std::panicking::rust_panic_with_hook::ha5aed1dfc0e220e3
5: 0x10f508f2a - std::panicking::begin_panic::h264cdc75d51b518b
6: 0x10f519d34 - rustc_errors::Handler::bug::h620f7270292f0095
7: 0x10e87fecc - rustc::session::opt_span_bug_fmt::{{closure}}::h4a9b70c3df8b4b3a
8: 0x10e87fcd9 - rustc::session::opt_span_bug_fmt::h7d83586c6e2c7ae6
9: 0x10e87f85a - rustc::session::bug_fmt::he2d2f00a4afa9d1e
10: 0x10ddcab73 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry::h5e3d8114267e9116
11: 0x10ddd34ab - rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore<'tcx> for rustc_metadata::cstore::CStore>::visibility::h2949b511f18961ee
12: 0x10dddbf66 - rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore<'tcx> for rustc_metadata::cstore::CStore>::visible_parent_map::hab53861eb74bce8d
13: 0x10e8c91c4 - rustc::ty::item_path::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::push_item_path::haa7f7a9afda5f72a
14: 0x10e9152d5 - rustc::util::ppaux::parameterized::h7bcfb1fd3d8a947a
15: 0x111dc8cb5 - core::fmt::write::h01739b8f12f355f9
16: 0x10e8b1c4c - rustc::traits::specialize::specialization_graph::Graph::insert::h62250bf0632d4218
17: 0x10e8e5d12 - rustc::ty::trait_def::TraitDef::add_impl_for_specialization::h39896639aba068c7
18: 0x10dbc6b67 - <rustc_typeck::coherence::overlap::OverlapChecker<'cx, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_item::h5ba64bfdace3da91
19: 0x10dbcfaab - rustc_typeck::coherence::check_coherence::h7b433ad2f4520d1a
20: 0x10dbd66a1 - rustc_typeck::check_crate::h4045752b69a796e8
21: 0x10d67e1ac - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h97a3a12d948df547
22: 0x10d67b37d - rustc_driver::driver::phase_3_run_analysis_passes::hb0ad9de18d423e67
23: 0x10d662bc5 - rustc_driver::driver::compile_input::h8e119234b60571d5
24: 0x10d6a8229 - rustc_driver::run_compiler::hbdfc4f84e2e0f4b9
25: 0x10d5c7988 - std::panicking::try::do_call::hf679f17bf3b43b0b
26: 0x111d871fa - __rust_maybe_catch_panic
27: 0x10d5ebaaf - <F as alloc::boxed::FnBox<A>>::call_box::h506fb5d7b8891cd4
28: 0x111d838d4 - std::sys::imp::thread::Thread::new::thread_start::h8084b1107992ae5b
29: 0x7fff859de99c - _pthread_body
30: 0x7fff859de919 - _pthread_start
This was caused by #37542 -- I'll fix today.
Fixed in #37793.
Most helpful comment
Fixed in #37793.