Repository: rust
Issue: Pruning a dependency results in a confused compiler
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/
-->

I was in the middle of swapping the 'tokio_postgres' library for 'sqlx'. After rewriting my main db connector function I proceeded to unceremoniously hack away all the use statements for the old library so that the linter may tell me where there's still any dependencies left in the code. This compiler bug (as the message in the backtrace tells me) is a result of all that reckless abandon.

Please also note that I included two separate backtrace messages as somehow the one with RUST_BACKTRACE=1 seemed less detailed to me.

### Code

```Rust
#[derive(Debug)]
pub(crate) enum Command {
    (...)
    // after changing 'Row' to the unit type '()' the compiler is happy again
    // before me deleting the use statement, it used to refer to 'tokio_postgres::Row'
    GetBesties {
        re: oneshot::Sender<Result<Vec<Row>, sqlx::Error>>,
    },
    (...)
}
```


### 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`:
```
rustc 1.71.1 (eb26296b5 2023-08-03)
binary: rustc
commit-hash: eb26296b556cef10fb713a38f3d16b9886080f26
commit-date: 2023-08-03
host: x86_64-unknown-linux-gnu
release: 1.71.1
LLVM version: 16.0.5

```

### Error output

```
error[E0412]: cannot find type `Row` in this scope
   --> src/db/mod.rs:139:40
    |
139 |         re: oneshot::Sender<Result<Vec<Row>, sqlx::Error>>,
    |                                        ^^^ not found in this scope
    |
help: consider importing this trait
    |
1   + use sqlx::Row;
    |

error[E0412]: cannot find type `Row` in this scope
   --> src/db/mod.rs:142:40
    |
142 |         re: oneshot::Sender<Result<Vec<Row>, sqlx::Error>>,
    |                                        ^^^ not found in this scope
    |
help: consider importing this trait
    |
1   + use sqlx::Row;
    |
```

<!--
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>

```
// THE MESSAGE I GOT AFTER RUNNING IT AS "RUST_BACKTRACE=1 cargo run"

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_mir_build/src/build/expr/as_place.rs:256:31
stack backtrace:
   0: rust_begin_unwind
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
   2: core::panicking::panic
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:117:5
   3: <rustc_mir_build::build::expr::as_place::PlaceBuilder>::to_place
   4: <rustc_mir_build::build::Builder>::match_simplified_candidates
   5: <rustc_mir_build::build::Builder>::match_candidates
   6: <rustc_mir_build::build::Builder>::lower_match_tree
   7: <rustc_mir_build::build::Builder>::expr_into_dest
   8: <rustc_mir_build::build::Builder>::as_temp_inner
   9: <rustc_mir_build::build::Builder>::stmt_expr
  10: <rustc_mir_build::build::Builder>::stmt_expr
  11: <rustc_mir_build::build::Builder>::ast_block_stmts
  12: <rustc_mir_build::build::Builder>::ast_block
  13: <rustc_mir_build::build::Builder>::expr_into_dest
  14: <rustc_mir_build::build::Builder>::expr_into_dest
  15: <rustc_mir_build::build::Builder>::expr_into_dest
  16: rustc_mir_build::build::mir_built
  17: rustc_mir_transform::check_unsafety::unsafety_check_result
  18: <rustc_middle::hir::map::Map>::for_each_module::<rustc_hir_analysis::check_crate::{closure#6}::{closure#0}>
  19: <rustc_session::session::Session>::time::<(), rustc_hir_analysis::check_crate::{closure#6}>
  20: rustc_hir_analysis::check_crate
  21: rustc_interface::passes::analysis
  22: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#4}>
  23: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
  24: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  25: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.71.1 (eb26296b5 2023-08-03) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -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 [mir_built] building MIR for `db::connector::start::{closure#0}::{closure#0}`
#1 [unsafety_check_result] unsafety-checking `db::connector::start::{closure#0}::{closure#0}`
#2 [unsafety_check_result] unsafety-checking `db::connector::start::{closure#0}`
#3 [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 unsafety_check_result(itp[e4a8]::db::connector::start::{closure#0}::{closure#0})
end of try_mark_green dep node stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 unsafety_check_result(itp[e4a8]::db::connector::start)
#1 mir_const(itp[e4a8]::db::connector::start)
#2 mir_promoted(itp[e4a8]::db::connector::start)
#3 mir_borrowck(itp[e4a8]::db::connector::start)
#4 type_of(itp[e4a8]::db::connector::start::{opaque#0})
#5 check_mod_item_types(itp[e4a8]::db::connector)
end of try_mark_green dep node stack

-------------------------------------------
// THE MESSAGE I INITIALLY GOT

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_mir_build/src/build/expr/as_place.rs:256:31
stack backtrace:
   0:     0x7f7918f63071 - std::backtrace_rs::backtrace::libunwind::trace::h782cc21a5acaf6cb
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f7918f63071 - std::backtrace_rs::backtrace::trace_unsynchronized::hc579eb24ab204515
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f7918f63071 - std::sys_common::backtrace::_print_fmt::h7223525cfdbacda2
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f7918f63071 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbd7d55b7108d2ab8
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f7918fc2d9f - core::fmt::rt::Argument::fmt::hb4f4a02b9bd9dd49
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/rt.rs:138:9
   5:     0x7f7918fc2d9f - core::fmt::write::h6d54cd7c9e155ec5
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f7918f56311 - std::io::Write::write_fmt::h6a453a71c692f63b
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/io/mod.rs:1713:15
   7:     0x7f7918f62e85 - std::sys_common::backtrace::_print::h1cbaa8b42678f928
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f7918f62e85 - std::sys_common::backtrace::print::h4ddf81241a51b337
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f7918f65b47 - std::panicking::default_hook::{{closure}}::hff91f1f484ade5cd
  10:     0x7f7918f65934 - std::panicking::default_hook::h21f14afd59f7aef9
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:288:9
  11:     0x7f791c0f70cb - <rustc_driver_impl[a4629e012e48ffc1]::install_ice_hook::{closure#0} as core[95ee2d8017598cc7]::ops::function::FnOnce<(&core[95ee2d8017598cc7]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7f7918f6628d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha1f76bdae3c27ab6
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/boxed.rs:1999:9
  13:     0x7f7918f6628d - std::panicking::rust_panic_with_hook::h45f66047b14c555c
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:709:13
  14:     0x7f7918f65fe1 - std::panicking::begin_panic_handler::{{closure}}::h49d1a88ef0908eb4
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:595:13
  15:     0x7f7918f634a6 - std::sys_common::backtrace::__rust_end_short_backtrace::hccebf9e57f8cc425
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:151:18
  16:     0x7f7918f65d72 - rust_begin_unwind
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
  17:     0x7f7918fbf023 - core::panicking::panic_fmt::h54ec9d0e3180a83d
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
  18:     0x7f7918fbf0b3 - core::panicking::panic::h65157a6ac7f1357a
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:117:5
  19:     0x7f791a400776 - <rustc_mir_build[cf1f0bb95c2c486a]::build::expr::as_place::PlaceBuilder>::to_place
  20:     0x7f791b208bbe - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::match_simplified_candidates
  21:     0x7f791b21071e - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::match_candidates
  22:     0x7f791a409547 - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::lower_match_tree
  23:     0x7f791a3f601d - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::expr_into_dest
  24:     0x7f791a417aac - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::as_temp_inner
  25:     0x7f791a415d90 - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::stmt_expr
  26:     0x7f791a415ab2 - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::stmt_expr
  27:     0x7f791a410a8f - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::ast_block_stmts
  28:     0x7f791a4083b3 - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::ast_block
  29:     0x7f791a3f5048 - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::expr_into_dest
  30:     0x7f791a3f3f8d - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::expr_into_dest
  31:     0x7f791a3f3f8d - <rustc_mir_build[cf1f0bb95c2c486a]::build::Builder>::expr_into_dest
  32:     0x7f791b00026e - rustc_mir_build[cf1f0bb95c2c486a]::build::mir_built
  33:     0x7f791a1b612c - rustc_query_impl[6e478c483b869c25]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6e478c483b869c25]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>
  34:     0x7f791a1b610e - <rustc_query_impl[6e478c483b869c25]::query_impl::mir_built::dynamic_query::{closure#2} as core[95ee2d8017598cc7]::ops::function::FnOnce<(rustc_middle[c682e143f9d710c7]::ty::context::TyCtxt, rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId)>>::call_once
  35:     0x7f791a7fe693 - rustc_query_system[93b6edfdc601e81a]::query::plumbing::try_execute_query::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::VecCache<rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt, true>
  36:     0x7f791acf8fc8 - rustc_query_system[93b6edfdc601e81a]::query::plumbing::force_query::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::VecCache<rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  37:     0x7f791baba921 - <rustc_query_impl[6e478c483b869c25]::plumbing::query_callback<rustc_query_impl[6e478c483b869c25]::query_impl::mir_built::QueryType>::{closure#0} as core[95ee2d8017598cc7]::ops::function::FnOnce<(rustc_middle[c682e143f9d710c7]::ty::context::TyCtxt, rustc_query_system[93b6edfdc601e81a]::dep_graph::dep_node::DepNode<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>)>>::call_once
  38:     0x7f791a3041af - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  39:     0x7f791a7fe448 - rustc_query_system[93b6edfdc601e81a]::query::plumbing::try_execute_query::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::VecCache<rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt, true>
  40:     0x7f791bad15ca - rustc_query_impl[6e478c483b869c25]::query_impl::unsafety_check_result::get_query_incr::__rust_end_short_backtrace
  41:     0x7f791b223b73 - rustc_mir_transform[53b92258a75e11c7]::check_unsafety::unsafety_check_result
  42:     0x7f791a1b756c - rustc_query_impl[6e478c483b869c25]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6e478c483b869c25]::query_impl::unsafety_check_result::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>
  43:     0x7f791a1b754e - <rustc_query_impl[6e478c483b869c25]::query_impl::unsafety_check_result::dynamic_query::{closure#2} as core[95ee2d8017598cc7]::ops::function::FnOnce<(rustc_middle[c682e143f9d710c7]::ty::context::TyCtxt, rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId)>>::call_once
  44:     0x7f791a7fe693 - rustc_query_system[93b6edfdc601e81a]::query::plumbing::try_execute_query::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::VecCache<rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt, true>
  45:     0x7f791acf8fc8 - rustc_query_system[93b6edfdc601e81a]::query::plumbing::force_query::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::VecCache<rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  46:     0x7f791bab6281 - <rustc_query_impl[6e478c483b869c25]::plumbing::query_callback<rustc_query_impl[6e478c483b869c25]::query_impl::unsafety_check_result::QueryType>::{closure#0} as core[95ee2d8017598cc7]::ops::function::FnOnce<(rustc_middle[c682e143f9d710c7]::ty::context::TyCtxt, rustc_query_system[93b6edfdc601e81a]::dep_graph::dep_node::DepNode<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>)>>::call_once
  47:     0x7f791a3041af - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  48:     0x7f791a304151 - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  49:     0x7f791a304151 - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  50:     0x7f791a304151 - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  51:     0x7f791a304151 - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  52:     0x7f791a304151 - <rustc_query_system[93b6edfdc601e81a]::dep_graph::graph::DepGraphData<rustc_middle[c682e143f9d710c7]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  53:     0x7f791b040f0e - rustc_query_system[93b6edfdc601e81a]::query::plumbing::ensure_must_run::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::VecCache<rustc_span[c2ff3b0962b898e5]::def_id::LocalDefId, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt>
  54:     0x7f791ba8be86 - rustc_query_impl[6e478c483b869c25]::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace
  55:     0x7f791b5cc7d7 - <rustc_middle[c682e143f9d710c7]::hir::map::Map>::for_each_module::<rustc_hir_analysis[647275e2a478dd3]::check_crate::{closure#6}::{closure#0}>
  56:     0x7f791b5cbc0d - <rustc_session[b7d9e6f930bc0bce]::session::Session>::time::<(), rustc_hir_analysis[647275e2a478dd3]::check_crate::{closure#6}>
  57:     0x7f791b5c9c47 - rustc_hir_analysis[647275e2a478dd3]::check_crate
  58:     0x7f791b5c4e2d - rustc_interface[c65fde630b50e8]::passes::analysis
  59:     0x7f791b60a8fa - rustc_query_impl[6e478c483b869c25]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[6e478c483b869c25]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 1usize]>>
  60:     0x7f791b60a8e9 - <rustc_query_impl[6e478c483b869c25]::query_impl::analysis::dynamic_query::{closure#2} as core[95ee2d8017598cc7]::ops::function::FnOnce<(rustc_middle[c682e143f9d710c7]::ty::context::TyCtxt, ())>>::call_once
  61:     0x7f791b91980c - rustc_query_system[93b6edfdc601e81a]::query::plumbing::try_execute_query::<rustc_query_impl[6e478c483b869c25]::DynamicConfig<rustc_query_system[93b6edfdc601e81a]::query::caches::SingleCache<rustc_middle[c682e143f9d710c7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[6e478c483b869c25]::plumbing::QueryCtxt, true>
  62:     0x7f791b9193b4 - rustc_query_impl[6e478c483b869c25]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  63:     0x7f791b352392 - <rustc_interface[c65fde630b50e8]::queries::QueryResult<&rustc_middle[c682e143f9d710c7]::ty::context::GlobalCtxt>>::enter::<core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>, rustc_driver_impl[a4629e012e48ffc1]::run_compiler::{closure#1}::{closure#2}::{closure#4}>
  64:     0x7f791b351475 - <rustc_interface[c65fde630b50e8]::interface::Compiler>::enter::<rustc_driver_impl[a4629e012e48ffc1]::run_compiler::{closure#1}::{closure#2}, core[95ee2d8017598cc7]::result::Result<core[95ee2d8017598cc7]::option::Option<rustc_interface[c65fde630b50e8]::queries::Linker>, rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>>
  65:     0x7f791b34f5c4 - rustc_span[c2ff3b0962b898e5]::set_source_map::<core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>, rustc_interface[c65fde630b50e8]::interface::run_compiler<core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>, rustc_driver_impl[a4629e012e48ffc1]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  66:     0x7f791b34f1a1 - <scoped_tls[24938f349c8d16f0]::ScopedKey<rustc_span[c2ff3b0962b898e5]::SessionGlobals>>::set::<rustc_interface[c65fde630b50e8]::interface::run_compiler<core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>, rustc_driver_impl[a4629e012e48ffc1]::run_compiler::{closure#1}>::{closure#0}, core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>>
  67:     0x7f791b34e796 - std[edecf719d62c0e6b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c65fde630b50e8]::util::run_in_thread_pool_with_globals<rustc_interface[c65fde630b50e8]::interface::run_compiler<core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>, rustc_driver_impl[a4629e012e48ffc1]::run_compiler::{closure#1}>::{closure#0}, core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>>
  68:     0x7f791b9a64c5 - <<std[edecf719d62c0e6b]::thread::Builder>::spawn_unchecked_<rustc_interface[c65fde630b50e8]::util::run_in_thread_pool_with_globals<rustc_interface[c65fde630b50e8]::interface::run_compiler<core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>, rustc_driver_impl[a4629e012e48ffc1]::run_compiler::{closure#1}>::{closure#0}, core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[95ee2d8017598cc7]::result::Result<(), rustc_span[c2ff3b0962b898e5]::ErrorGuaranteed>>::{closure#1} as core[95ee2d8017598cc7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  69:     0x7f7918f707b5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he3e5dbdfabe0b668
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/boxed.rs:1985:9
  70:     0x7f7918f707b5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h246f7c7964633611
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/boxed.rs:1985:9
  71:     0x7f7918f707b5 - std::sys::unix::thread::Thread::new::thread_start::hadf9e3501ff0df23
                               at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys/unix/thread.rs:108:17
  72:     0x7f7918c94ac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  73:     0x7f7918d26a40 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  74:                0x0 - <unknown>

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.71.1 (eb26296b5 2023-08-03) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -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 [mir_built] building MIR for `db::connector::start::{closure#0}::{closure#0}`
#1 [unsafety_check_result] unsafety-checking `db::connector::start::{closure#0}::{closure#0}`
#2 [unsafety_check_result] unsafety-checking `db::connector::start::{closure#0}`
#3 [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 unsafety_check_result(itp[e4a8]::db::connector::start::{closure#0}::{closure#0})
end of try_mark_green dep node stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 unsafety_check_result(itp[e4a8]::db::connector::start)
#1 mir_const(itp[e4a8]::db::connector::start)
#2 mir_promoted(itp[e4a8]::db::connector::start)
#3 mir_borrowck(itp[e4a8]::db::connector::start)
#4 type_of(itp[e4a8]::db::connector::start::{opaque#0})
#5 check_mod_item_types(itp[e4a8]::db::connector)
end of try_mark_green dep node stack


```

</p>
</details>