Skip to content

ICE using new attributes(..) section of #[proc_macro_derive] #37788

Closed
@sfackler

Description

@sfackler

I'm seeing an ICE at this commit: sfackler/rust-postgres-derive@50d93bd

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

Metadata

Metadata

Assignees

Labels

I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions