Repository: rust
Issue: The compiler unexpectedly panicked
Labels: I-ICE,T-compiler,A-incr-comp,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

```Rust
<code>
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
<version>
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
binary: rustc
commit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23
commit-date: 2024-08-06
host: aarch64-apple-darwin
release: 1.80.1
LLVM version: 18.1.7
```

### Error output

```
<output>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.80.1 (3f5fd8dd4 2024-08-06) running on aarch64-apple-darwin
note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `diesel::query_builder::select_statement::SelectStatement<diesel::query_builder::from_clause::FromClause<db::schema::customer::ps_customer::table>>: diesel::associations::HasTable`  |  = note: this failure-note originates in the macro `diesel::table` (in Nightly builds, run with -Z macro-backtrace for more info)
#1 [check_well_formed] checking that `db::schema::customer::ps_customer::<impl at src/db/schema/customer.rs:1:1: 78:2>` is well-formed
#2 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 representability(f1a03a494daa9112-4bf98043bc8a9b12)
#1 adt_sized_constraint(thread 'rustc' panicked at compiler/rustc_hir/src/definitions.rs:389:13:
("Failed to extract DefId", adt_sized_constraint, PackedFingerprint(Fingerprint(10236940663812725753, 15889046077414162429)))


```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
<backtrace>
stack backtrace:
   0:        0x1030ccc1c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h41035ce174e31160
   1:        0x10311187c - core::fmt::write::h7e946826fce7616b
   2:        0x1030c3088 - std::io::Write::write_fmt::he3645adfefb23e4a
   3:        0x1030cca74 - std::sys_common::backtrace::print::h2efe9ae66fda73dc
   4:        0x1030cf080 - std::panicking::default_hook::{{closure}}::hd27200b4fbd3bf40
   5:        0x1030ced4c - std::panicking::default_hook::hb8656334461229c8
   6:        0x10c753380 - <alloc[9bfd1da98798fc47]::boxed::Box<rustc_driver_impl[1ef2360f78401c14]::install_ice_hook::{closure#0}> as core[cec0bd9d2fc86fa9]::ops::function::Fn<(&dyn for<'a, 'b> core[cec0bd9d2fc86fa9]::ops::function::Fn<(&'a core[cec0bd9d2fc86fa9]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[cec0bd9d2fc86fa9]::marker::Sync + core[cec0bd9d2fc86fa9]::marker::Send, &core[cec0bd9d2fc86fa9]::panic::panic_info::PanicInfo)>>::call
   7:        0x1030cfa6c - std::panicking::rust_panic_with_hook::h10171cf76e1aed15
   8:        0x1030cf480 - std::panicking::begin_panic_handler::{{closure}}::h9344de43a47cae21
   9:        0x1030cd0a0 - std::sys_common::backtrace::__rust_end_short_backtrace::h55013ada3ab9c4e8
  10:        0x1030cf1f0 - _rust_begin_unwind
  11:        0x10312d128 - core::panicking::panic_fmt::h0b16bb09366e1f01
  12:        0x1108586b0 - <rustc_hir[370215242720f464]::definitions::Definitions>::local_def_path_hash_to_def_id::err
  13:        0x10d190008 - <rustc_middle[2867706b5eb6f7f9]::ty::context::TyCtxt>::def_path_hash_to_def_id
  14:        0x10ceee0ac - rustc_interface[6917c625c882dc9d]::callbacks::dep_node_debug
  15:        0x10dbbe228 - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::dep_node::DepNode as core[cec0bd9d2fc86fa9]::fmt::Debug>::fmt
  16:        0x10311187c - core::fmt::write::h7e946826fce7616b
  17:        0x1030c12d4 - <&std::io::stdio::Stderr as std::io::Write>::write_fmt::h106b890cac40debb
  18:        0x1030c1cd4 - std::io::stdio::_eprint::hf58134ec6abaf37d
  19:        0x11097b8ac - rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::print_markframe_trace::<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>
  20:        0x10daeab7c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  21:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  22:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  23:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  24:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  25:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  26:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  27:        0x10daeab0c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  28:        0x10daea88c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  29:        0x10d960774 - rustc_query_system[a56a14b00b0e8ff6]::query::plumbing::try_execute_query::<rustc_query_impl[9b9172b7a4c3de5d]::DynamicConfig<rustc_query_system[a56a14b00b0e8ff6]::query::caches::DefaultCache<rustc_type_ir[24e377033abc0aab]::canonical::Canonical<rustc_middle[2867706b5eb6f7f9]::ty::context::TyCtxt, rustc_middle[2867706b5eb6f7f9]::ty::ParamEnvAnd<rustc_middle[2867706b5eb6f7f9]::ty::predicate::Predicate>>, rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt, true>
  30:        0x10db7c124 - rustc_query_impl[9b9172b7a4c3de5d]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  31:        0x10dff8030 - <rustc_infer[12dda32e7c8ea680]::infer::InferCtxt as rustc_trait_selection[7e0d0f6886399ce9]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  32:        0x10dff8520 - <rustc_infer[12dda32e7c8ea680]::infer::InferCtxt as rustc_trait_selection[7e0d0f6886399ce9]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  33:        0x10df7366c - <rustc_trait_selection[7e0d0f6886399ce9]::traits::fulfill::FulfillProcessor>::process_trait_obligation
  34:        0x10df72c30 - <rustc_trait_selection[7e0d0f6886399ce9]::traits::fulfill::FulfillProcessor as rustc_data_structures[961a954d878499e9]::obligation_forest::ObligationProcessor>::process_obligation
  35:        0x10df5cc48 - <rustc_data_structures[961a954d878499e9]::obligation_forest::ObligationForest<rustc_trait_selection[7e0d0f6886399ce9]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[7e0d0f6886399ce9]::traits::fulfill::FulfillProcessor>
  36:        0x10df68e90 - <rustc_trait_selection[7e0d0f6886399ce9]::traits::fulfill::FulfillmentContext<rustc_trait_selection[7e0d0f6886399ce9]::traits::FulfillmentError> as rustc_infer[12dda32e7c8ea680]::traits::engine::TraitEngine<rustc_trait_selection[7e0d0f6886399ce9]::traits::FulfillmentError>>::select_where_possible
  37:        0x10c979a34 - rustc_hir_analysis[eb0b0898efcdc604]::check::compare_impl_item::compare_impl_method
  38:        0x10caa6c6c - rustc_hir_analysis[eb0b0898efcdc604]::check::check::check_impl_items_against_trait
  39:        0x10caa27a0 - rustc_hir_analysis[eb0b0898efcdc604]::check::check::check_item_type
  40:        0x10caf6710 - rustc_hir_analysis[eb0b0898efcdc604]::check::wfcheck::check_well_formed
  41:        0x10d9e9ad4 - rustc_query_impl[9b9172b7a4c3de5d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9b9172b7a4c3de5d]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 1usize]>>
  42:        0x10da320b4 - <rustc_query_impl[9b9172b7a4c3de5d]::query_impl::check_well_formed::dynamic_query::{closure#2} as core[cec0bd9d2fc86fa9]::ops::function::FnOnce<(rustc_middle[2867706b5eb6f7f9]::ty::context::TyCtxt, rustc_hir[370215242720f464]::hir_id::OwnerId)>>::call_once
  43:        0x10d9a06d8 - rustc_query_system[a56a14b00b0e8ff6]::query::plumbing::try_execute_query::<rustc_query_impl[9b9172b7a4c3de5d]::DynamicConfig<rustc_query_system[a56a14b00b0e8ff6]::query::caches::VecCache<rustc_hir[370215242720f464]::hir_id::OwnerId, rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt, true>
  44:        0x10d93f68c - rustc_query_system[a56a14b00b0e8ff6]::query::plumbing::force_query::<rustc_query_impl[9b9172b7a4c3de5d]::DynamicConfig<rustc_query_system[a56a14b00b0e8ff6]::query::caches::VecCache<rustc_hir[370215242720f464]::hir_id::OwnerId, rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  45:        0x10d9b1218 - <rustc_query_impl[9b9172b7a4c3de5d]::plumbing::query_callback<rustc_query_impl[9b9172b7a4c3de5d]::query_impl::check_well_formed::QueryType>::{closure#0} as core[cec0bd9d2fc86fa9]::ops::function::FnOnce<(rustc_middle[2867706b5eb6f7f9]::ty::context::TyCtxt, rustc_query_system[a56a14b00b0e8ff6]::dep_graph::dep_node::DepNode)>>::call_once
  46:        0x10daeaac8 - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  47:        0x10daea88c - <rustc_query_system[a56a14b00b0e8ff6]::dep_graph::graph::DepGraphData<rustc_middle[2867706b5eb6f7f9]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  48:        0x10d941204 - rustc_query_system[a56a14b00b0e8ff6]::query::plumbing::ensure_must_run::<rustc_query_impl[9b9172b7a4c3de5d]::DynamicConfig<rustc_query_system[a56a14b00b0e8ff6]::query::caches::DefaultCache<rustc_span[22cad54eabbc67cf]::def_id::LocalModDefId, rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt>
  49:        0x10db622dc - rustc_query_impl[9b9172b7a4c3de5d]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  50:        0x10c9463bc - std[4ec0ba9e3c6d748b]::panicking::try::<(), core[cec0bd9d2fc86fa9]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[961a954d878499e9]::sync::parallel::disabled::par_for_each_in<&[rustc_hir[370215242720f464]::hir_id::OwnerId], <rustc_middle[2867706b5eb6f7f9]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[eb0b0898efcdc604]::check_crate::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>>
  51:        0x10ca30184 - rustc_data_structures[961a954d878499e9]::sync::parallel::disabled::par_for_each_in::<&[rustc_hir[370215242720f464]::hir_id::OwnerId], <rustc_middle[2867706b5eb6f7f9]::hir::map::Map>::par_for_each_module<rustc_hir_analysis[eb0b0898efcdc604]::check_crate::{closure#1}::{closure#0}>::{closure#0}>
  52:        0x10ca8a284 - <rustc_session[6e72d4e14abb7feb]::session::Session>::time::<(), rustc_hir_analysis[eb0b0898efcdc604]::check_crate::{closure#1}>
  53:        0x10c963884 - rustc_hir_analysis[eb0b0898efcdc604]::check_crate
  54:        0x10cebb26c - rustc_interface[6917c625c882dc9d]::passes::analysis
  55:        0x10d9ecc10 - rustc_query_impl[9b9172b7a4c3de5d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[9b9172b7a4c3de5d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 1usize]>>
  56:        0x10db0eb84 - <rustc_query_impl[9b9172b7a4c3de5d]::query_impl::analysis::dynamic_query::{closure#2} as core[cec0bd9d2fc86fa9]::ops::function::FnOnce<(rustc_middle[2867706b5eb6f7f9]::ty::context::TyCtxt, ())>>::call_once
  57:        0x10d953690 - rustc_query_system[a56a14b00b0e8ff6]::query::plumbing::try_execute_query::<rustc_query_impl[9b9172b7a4c3de5d]::DynamicConfig<rustc_query_system[a56a14b00b0e8ff6]::query::caches::SingleCache<rustc_middle[2867706b5eb6f7f9]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[9b9172b7a4c3de5d]::plumbing::QueryCtxt, true>
  58:        0x10db54730 - rustc_query_impl[9b9172b7a4c3de5d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  59:        0x10c7704d8 - <rustc_middle[2867706b5eb6f7f9]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[1ef2360f78401c14]::run_compiler::{closure#0}::{closure#1}::{closure#3}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>
  60:        0x10c75b5a4 - <rustc_interface[6917c625c882dc9d]::interface::Compiler>::enter::<rustc_driver_impl[1ef2360f78401c14]::run_compiler::{closure#0}::{closure#1}, core[cec0bd9d2fc86fa9]::result::Result<core[cec0bd9d2fc86fa9]::option::Option<rustc_interface[6917c625c882dc9d]::queries::Linker>, rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>
  61:        0x10c71d6b8 - <scoped_tls[1950327f1bf28942]::ScopedKey<rustc_span[22cad54eabbc67cf]::SessionGlobals>>::set::<rustc_interface[6917c625c882dc9d]::util::run_in_thread_with_globals<rustc_interface[6917c625c882dc9d]::interface::run_compiler<core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>, rustc_driver_impl[1ef2360f78401c14]::run_compiler::{closure#0}>::{closure#1}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>
  62:        0x10c75af18 - rustc_span[22cad54eabbc67cf]::create_session_globals_then::<core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>, rustc_interface[6917c625c882dc9d]::util::run_in_thread_with_globals<rustc_interface[6917c625c882dc9d]::interface::run_compiler<core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>, rustc_driver_impl[1ef2360f78401c14]::run_compiler::{closure#0}>::{closure#1}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  63:        0x10c751d58 - std[4ec0ba9e3c6d748b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6917c625c882dc9d]::util::run_in_thread_with_globals<rustc_interface[6917c625c882dc9d]::interface::run_compiler<core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>, rustc_driver_impl[1ef2360f78401c14]::run_compiler::{closure#0}>::{closure#1}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>
  64:        0x10c72859c - <<std[4ec0ba9e3c6d748b]::thread::Builder>::spawn_unchecked_<rustc_interface[6917c625c882dc9d]::util::run_in_thread_with_globals<rustc_interface[6917c625c882dc9d]::interface::run_compiler<core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>, rustc_driver_impl[1ef2360f78401c14]::run_compiler::{closure#0}>::{closure#1}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cec0bd9d2fc86fa9]::result::Result<(), rustc_span[22cad54eabbc67cf]::ErrorGuaranteed>>::{closure#2} as core[cec0bd9d2fc86fa9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  65:        0x1030d8588 - std::sys::pal::unix::thread::Thread::new::thread_start::hb184f2abd415aef7
  66:        0x1886a6f94 - __pthread_joiner_wake
```

</p>
</details>