Repository: rust
Issue: thread 'rustc' panicked at 'Failed to extract DefId
Labels: I-ICE,T-compiler,A-incr-comp,C-bug

I got a compiler panic and am posting the stack trace here.
After running `cargo clean`, I'm no longer able to reproduce the crash.
I'm not sure if the below info will be helpful; feel free to close this issue if it's not.

<details>

```
$ cargo build
   Compiling sierrachart_dtc v0.1.0 (/home/homestar/dev/mrepo_wip/src_rs/trading/sierrachart_dtc)
thread 'rustc' panicked at 'Failed to extract DefId: hir_owner 517dff34ea351c14-23f977054d59daad', compiler/rustc_middle/src/dep_graph/dep_node.rs:181:17
stack backtrace:
   0:     0x7f7d252496fa - std::backtrace_rs::backtrace::libunwind::trace::h34aec3ef6cd8ad7e
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f7d252496fa - std::backtrace_rs::backtrace::trace_unsynchronized::h8035d38698d0f7a8
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7d252496fa - std::sys_common::backtrace::_print_fmt::hff968f6695a1ba22
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f7d252496fa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7eea0efe77acf1ec
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f7d252ac25e - core::fmt::write::hc553f17407eb0b48
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f7d25239a85 - std::io::Write::write_fmt::h62e5f01a089f48c0
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/io/mod.rs:1682:15
   6:     0x7f7d252494c5 - std::sys_common::backtrace::_print::h52d116aff3db4cd1
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f7d252494c5 - std::sys_common::backtrace::print::h9e7d2f98fb7af075
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f7d2524c20f - std::panicking::default_hook::{{closure}}::hf74999dab2d0a95c
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:267:22
   9:     0x7f7d2524bf4b - std::panicking::default_hook::hc11ca7d10c44c42f
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:286:9
  10:     0x7f7d2854cc31 - rustc_driver[faf1f11f94aaf6ff]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f7d2524ca4d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha7dbb2d260f78172
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2032:9
  12:     0x7f7d2524ca4d - std::panicking::rust_panic_with_hook::hdb4da1ae79c845a5
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:692:13
  13:     0x7f7d2524c7c9 - std::panicking::begin_panic_handler::{{closure}}::h02b5b35b126d5cf2
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:579:13
  14:     0x7f7d25249bac - std::sys_common::backtrace::__rust_end_short_backtrace::h6c6853376cf416d1
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7f7d2524c4d2 - rust_begin_unwind
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:575:5
  16:     0x7f7d252a8c43 - core::panicking::panic_fmt::hfd9e949092070b66
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/panicking.rs:64:14
  17:     0x7f7d289c17c2 - <rustc_query_system[daa376e8a1534a67]::dep_graph::dep_node::DepNode<rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepKind> as rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0}
  18:     0x7f7d26534abf - <rustc_query_system[daa376e8a1534a67]::dep_graph::dep_node::DepNode<rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepKind> as rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  19:     0x7f7d28e819fd - rustc_query_impl[7ca4c504d4b53a14]::plumbing::force_from_dep_node::<rustc_query_impl[7ca4c504d4b53a14]::queries::hir_owner>
  20:     0x7f7d265a25b9 - <rustc_query_system[daa376e8a1534a67]::dep_graph::graph::DepGraph<rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt>
  21:     0x7f7d267486c4 - rustc_query_system[daa376e8a1534a67]::query::plumbing::ensure_must_run::<rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt, rustc_span[5737ed96bfbdbd37]::def_id::LocalDefId, &rustc_middle[bcb6873cde329d56]::mir::query::BorrowCheckResult>
  22:     0x7f7d278e957e - rustc_query_system[daa376e8a1534a67]::query::plumbing::get_query::<rustc_query_impl[7ca4c504d4b53a14]::queries::check_mod_loops, rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt>
  23:     0x7f7d27aaa94c - <core[e12cfea94acfcb96]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[7e2dc299a6484f3b]::sync::par_for_each_in<&[rustc_hir[b6e9ee850fc36cc9]::hir_id::OwnerId], <rustc_middle[bcb6873cde329d56]::hir::map::Map>::par_for_each_module<rustc_interface[1d25fa3620f328b6]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}> as core[e12cfea94acfcb96]::ops::function::FnOnce<()>>::call_once
  24:     0x7f7d27aaa838 - rustc_data_structures[7e2dc299a6484f3b]::sync::par_for_each_in::<&[rustc_hir[b6e9ee850fc36cc9]::hir_id::OwnerId], <rustc_middle[bcb6873cde329d56]::hir::map::Map>::par_for_each_module<rustc_interface[1d25fa3620f328b6]::passes::analysis::{closure#0}::{closure#1}::{closure#0}>::{closure#0}>
  25:     0x7f7d27aaa6c2 - <core[e12cfea94acfcb96]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[1d25fa3620f328b6]::passes::analysis::{closure#0}::{closure#1}> as core[e12cfea94acfcb96]::ops::function::FnOnce<()>>::call_once
  26:     0x7f7d26a45f10 - <rustc_session[d01ee0491e5e5048]::session::Session>::time::<(), rustc_interface[1d25fa3620f328b6]::passes::analysis::{closure#0}>
  27:     0x7f7d26a441e2 - rustc_interface[1d25fa3620f328b6]::passes::analysis
  28:     0x7f7d27d02ccf - <rustc_query_system[daa376e8a1534a67]::dep_graph::graph::DepGraph<rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bcb6873cde329d56]::ty::context::TyCtxt, (), core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  29:     0x7f7d27d01dc7 - rustc_query_system[daa376e8a1534a67]::query::plumbing::try_execute_query::<rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt, rustc_query_system[daa376e8a1534a67]::query::caches::DefaultCache<(), core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>>
  30:     0x7f7d27d01820 - rustc_query_system[daa376e8a1534a67]::query::plumbing::get_query::<rustc_query_impl[7ca4c504d4b53a14]::queries::analysis, rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt>
  31:     0x7f7d277079a3 - <rustc_interface[1d25fa3620f328b6]::passes::QueryContext>::enter::<rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  32:     0x7f7d27703f23 - <rustc_interface[1d25fa3620f328b6]::interface::Compiler>::enter::<rustc_driver[faf1f11f94aaf6ff]::run_compiler::{clo
sure#1}::{closure#2}, core[e12cfea94acfcb96]::result::Result<core[e12cfea94acfcb96]::option::Option<rustc_interface[1d25fa3620f328b6]::queries::Linker>, rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  33:     0x7f7d276fef78 - rustc_span[5737ed96bfbdbd37]::with_source_map::<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  34:     0x7f7d276fea65 - <scoped_tls[85a67c9db469d989]::ScopedKey<rustc_span[5737ed96bfbdbd37]::SessionGlobals>>::set::<rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  35:     0x7f7d276fe052 - std[3da7f01c8c2aa3e3]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1d25fa3620f328b6]::util::run_in_thread_pool_with_globals<rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  36:     0x7f7d27e02bea - <<std[3da7f01c8c2aa3e3]::thread::Builder>::spawn_unchecked_<rustc_interface[1d25fa3620f328b6]::util::run_in_thread_pool_with_globals<rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>::{closure#1} as core[e12cfea94acfcb96]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  37:     0x7f7d25256803 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha93239d92e7b610d
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
  38:     0x7f7d25256803 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hebda57b0236de612
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
  39:     0x7f7d25256803 - std::sys::unix::thread::Thread::new::thread_start::h1541b4390bbc26ca
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys/unix/thread.rs:108:17
  40:     0x7f7d25107609 - start_thread
                               at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  41:     0x7f7d2502a133 - clone
                               at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  42:                0x0 - <unknown>

error: internal compiler error: unexpected panic

note: 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.67.0 (fc594f156 2023-01-24) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `sierrachart_dtc`
```

</details>

```
$ rustc --version --verbose
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-unknown-linux-gnu
release: 1.67.0
LLVM version: 15.0.6
```