Repository: rust
Issue: Compiler panics unexpectedly when compiling a simple hyper network program
Labels: I-ICE,T-compiler,A-incr-comp,C-bug,S-needs-repro

<!--
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
use std::convert::Infallible;
use std::net::SocketAddr;
use std::ops::Deref;
use hyper::http::HeaderValue;
use hyper::{Body, Request, Response, Server, Client};
use hyper::service::{make_service_fn, service_fn};
use serde::{Deserialize, Serialize};
use anyhow::Result;

const UPSTREAM: &'static str = "http://localhost:8080";  

async fn bridge(mut req: Request<Body>) -> Result<Response<Body>> {
    if req.uri().path().contains("upstream") {
        println!("upstream...");
        dbg!(req.uri());
        Ok(Response::new("Hello, World".into()))
    
    } else {
        println!("bridge...");
        let client = Client::new();
        let actual_host = req.headers().get("HOST").unwrap().clone();
        req.headers_mut().append("PROKSI-REAL-HOST", actual_host.clone());
        dbg!(req.uri());
        req.headers_mut().insert("HOST", HeaderValue::from_str("localhost:8080").unwrap());
        let mut resp = client.request(req).await?;
        Ok(Response::new("Hello, World".into()))
    }
}

#[tokio::main]
async fn main() {
    let addr = SocketAddr::from(([127, 0, 0, 1], 8080));

    let make_svc = make_service_fn(|_conn| async {
        Ok::<_, anyhow::Error>(service_fn(bridge))
    });

    let server = Server::bind(&addr).serve(make_svc);

    if let Err(e) = server.await {
        eprintln!("server error: {}", e);
    }
}

```


### 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.63.0 (4b91a6ea7 2022-08-08) running on x86_64-unknown-linux-gnu
```

### Error output

```

thread 'rustc' panicked at 'Failed to extract DefId: local_def_id_to_hir_id 6f83f68fed8f99c5-8405bf066b7e7a41', compiler/rustc_middle/src/dep_graph/dep_node.rs:273:17
stack backtrace:
   0:     0x7f70ed09e18d - std::backtrace_rs::backtrace::libunwind::trace::h8217d0a8f3fd2f41
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f70ed09e18d - std::backtrace_rs::backtrace::trace_unsynchronized::h308103876b3af410
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f70ed09e18d - std::sys_common::backtrace::_print_fmt::hc208018c6153605e
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f70ed09e18d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf89a7ed694dfb585
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f70ed0f9f7c - core::fmt::write::h21038c1382fe4264
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/fmt/mod.rs:1197:17
   5:     0x7f70ed08f8a1 - std::io::Write::write_fmt::h7dbb1c9a3c254aef
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/io/mod.rs:1672:15
   6:     0x7f70ed0a0e55 - std::sys_common::backtrace::_print::h4e8889719c9ddeb8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f70ed0a0e55 - std::sys_common::backtrace::print::h1506fe2cb3022667
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f70ed0a0e55 - std::panicking::default_hook::{{closure}}::hd9d7ce2a8a782440
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:295:22
   9:     0x7f70ed0a0b76 - std::panicking::default_hook::h5b16ec25444b1b5d
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:314:9
  10:     0x7f70ed8feb54 - rustc_driver[e01eec72899701d3]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f70dabefa13 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h0fca1e6b56e03279
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1965:9
  12:     0x7f70dabcabad - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::hb41430a168552952
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/proc_macro/src/bridge/client.rs:328:21
  13:     0x7f70ed0a152a - std::panicking::rust_panic_with_hook::hb0138cb6e6fea3e4
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17
  14:     0x7f70ed0a1367 - std::panicking::begin_panic_handler::{{closure}}::h4cb67095557cd1aa
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
  15:     0x7f70ed09e644 - std::sys_common::backtrace::__rust_end_short_backtrace::h2bfcac279dcdc911
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
  16:     0x7f70ed0a1099 - rust_begin_unwind
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
  17:     0x7f70ed066253 - core::panicking::panic_fmt::h1de71520faaa17d3
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
  18:     0x7f70ee95d231 - <rustc_query_system[141d649b4129d34f]::dep_graph::dep_node::DepNode<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind> as rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0}
  19:     0x7f70ef958a39 - <rustc_query_system[141d649b4129d34f]::dep_graph::dep_node::DepNode<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind> as rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  20:     0x7f70effdab4c - rustc_query_impl[f9d56364e2ba3b26]::query_callbacks::local_def_id_to_hir_id::force_from_dep_node
  21:     0x7f70ef9fe0c1 - <rustc_middle[6ba33e07887d312d]::ty::context::TyCtxt as rustc_query_system[141d649b4129d34f]::dep_graph::DepContext>::try_force_from_dep_node
  22:     0x7f70ef422910 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  23:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  24:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  25:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  26:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  27:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  28:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  29:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  30:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  31:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  32:     0x7f70ef4221e6 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  33:     0x7f70ef4fc054 - rustc_query_system[141d649b4129d34f]::query::plumbing::get_query::<rustc_query_impl[f9d56364e2ba3b26]::queries::evaluate_obligation, rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  34:     0x7f70ef4943e5 - <rustc_query_impl[f9d56364e2ba3b26]::Queries as rustc_middle[6ba33e07887d312d]::ty::query::QueryEngine>::evaluate_obligation
  35:     0x7f70ef7ebb4b - <rustc_trait_selection[a24496718f2f9ce]::traits::fulfill::FulfillProcessor as rustc_data_structures[a72e3ab837655e00]::obligation_forest::ObligationProcessor>::process_obligation
  36:     0x7f70ef83ddb3 - <rustc_data_structures[a72e3ab837655e00]::obligation_forest::ObligationForest<rustc_trait_selection[a24496718f2f9ce]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[a24496718f2f9ce]::traits::fulfill::FulfillProcessor, rustc_data_structures[a72e3ab837655e00]::obligation_forest::Outcome<rustc_trait_selection[a24496718f2f9ce]::traits::fulfill::PendingPredicateObligation, rustc_infer[dac8c065ff7906eb]::traits::FulfillmentErrorCode>>
  37:     0x7f70ef7e9570 - <rustc_trait_selection[a24496718f2f9ce]::traits::fulfill::FulfillmentContext as rustc_infer[dac8c065ff7906eb]::traits::engine::TraitEngine>::select_all_or_error
  38:     0x7f70ef781069 - <rustc_infer[dac8c065ff7906eb]::infer::InferCtxtBuilder>::enter::<core[3edb0f9afb6adb32]::result::Result<&rustc_middle[6ba33e07887d312d]::traits::ImplSource<()>, rustc_middle[6ba33e07887d312d]::traits::CodegenObligationError>, rustc_trait_selection[a24496718f2f9ce]::traits::codegen::codegen_fulfill_obligation::{closure#0}>
  39:     0x7f70ef7f7bd5 - rustc_trait_selection[a24496718f2f9ce]::traits::codegen::codegen_fulfill_obligation
  40:     0x7f70eff89fb0 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[6ba33e07887d312d]::ty::context::TyCtxt, (rustc_middle[6ba33e07887d312d]::ty::ParamEnv, rustc_middle[6ba33e07887d312d]::ty::sty::Binder<rustc_middle[6ba33e07887d312d]::ty::sty::TraitRef>), core[3edb0f9afb6adb32]::result::Result<&rustc_middle[6ba33e07887d312d]::traits::ImplSource<()>, rustc_middle[6ba33e07887d312d]::traits::CodegenObligationError>>
  41:     0x7f70ef4d62ce - rustc_query_system[141d649b4129d34f]::query::plumbing::try_execute_query::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt, rustc_query_system[141d649b4129d34f]::query::caches::DefaultCache<(rustc_middle[6ba33e07887d312d]::ty::ParamEnv, rustc_middle[6ba33e07887d312d]::ty::sty::Binder<rustc_middle[6ba33e07887d312d]::ty::sty::TraitRef>), core[3edb0f9afb6adb32]::result::Result<&rustc_middle[6ba33e07887d312d]::traits::ImplSource<()>, rustc_middle[6ba33e07887d312d]::traits::CodegenObligationError>>>
  42:     0x7f70ef49242a - <rustc_query_impl[f9d56364e2ba3b26]::Queries as rustc_middle[6ba33e07887d312d]::ty::query::QueryEngine>::codegen_fulfill_obligation
  43:     0x7f70eeff0c11 - rustc_ty_utils[f1d85cafe939e07f]::instance::inner_resolve_instance
  44:     0x7f70eefefcef - rustc_ty_utils[f1d85cafe939e07f]::instance::resolve_instance
  45:     0x7f70ef42959b - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[6ba33e07887d312d]::ty::context::TyCtxt, rustc_middle[6ba33e07887d312d]::ty::ParamEnvAnd<(rustc_span[fb9cf5df1e5e5539]::def_id::DefId, &rustc_middle[6ba33e07887d312d]::ty::list::List<rustc_middle[6ba33e07887d312d]::ty::subst::GenericArg>)>, core[3edb0f9afb6adb32]::result::Result<core[3edb0f9afb6adb32]::option::Option<rustc_middle[6ba33e07887d312d]::ty::instance::Instance>, rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>
  46:     0x7f70ef4f4013 - rustc_query_system[141d649b4129d34f]::query::plumbing::get_query::<rustc_query_impl[f9d56364e2ba3b26]::queries::resolve_instance, rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  47:     0x7f70ef4946f8 - <rustc_query_impl[f9d56364e2ba3b26]::Queries as rustc_middle[6ba33e07887d312d]::ty::query::QueryEngine>::resolve_instance
  48:     0x7f70ef925d7c - <rustc_middle[6ba33e07887d312d]::ty::instance::Instance>::resolve
  49:     0x7f70eed179e0 - rustc_monomorphize[b38b1d2862772160]::collector::collect_neighbours
  50:     0x7f70eed14d1a - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  51:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  52:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  53:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  54:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  55:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  56:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  57:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  58:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  59:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  60:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  61:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  62:     0x7f70eed151e2 - rustc_monomorphize[b38b1d2862772160]::collector::collect_items_rec
  63:     0x7f70efc4736b - <rustc_session[72c90254a58d88d1]::session::Session>::time::<(), rustc_monomorphize[b38b1d2862772160]::collector::collect_crate_mono_items::{closure#1}>
  64:     0x7f70efc3e32b - rustc_monomorphize[b38b1d2862772160]::collector::collect_crate_mono_items
  65:     0x7f70efc41e76 - rustc_monomorphize[b38b1d2862772160]::partitioning::collect_and_partition_mono_items
  66:     0x7f70eff946a7 - <rustc_query_system[141d649b4129d34f]::dep_graph::graph::DepGraph<rustc_middle[6ba33e07887d312d]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[6ba33e07887d312d]::ty::context::TyCtxt, (), (&std[f9ee9c7d4fd68eda]::collections::hash::set::HashSet<rustc_span[fb9cf5df1e5e5539]::def_id::DefId, core[3edb0f9afb6adb32]::hash::BuildHasherDefault<rustc_hash[90d1a13de5890b1a]::FxHasher>>, &[rustc_middle[6ba33e07887d312d]::mir::mono::CodegenUnit])>
  67:     0x7f70f004b867 - rustc_query_system[141d649b4129d34f]::query::plumbing::try_execute_query::<rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt, rustc_query_system[141d649b4129d34f]::query::caches::DefaultCache<(), (&std[f9ee9c7d4fd68eda]::collections::hash::set::HashSet<rustc_span[fb9cf5df1e5e5539]::def_id::DefId, core[3edb0f9afb6adb32]::hash::BuildHasherDefault<rustc_hash[90d1a13de5890b1a]::FxHasher>>, &[rustc_middle[6ba33e07887d312d]::mir::mono::CodegenUnit])>>
  68:     0x7f70f00887e0 - rustc_query_system[141d649b4129d34f]::query::plumbing::get_query::<rustc_query_impl[f9d56364e2ba3b26]::queries::collect_and_partition_mono_items, rustc_query_impl[f9d56364e2ba3b26]::plumbing::QueryCtxt>
  69:     0x7f70effd9082 - <rustc_query_impl[f9d56364e2ba3b26]::Queries as rustc_middle[6ba33e07887d312d]::ty::query::QueryEngine>::collect_and_partition_mono_items
  70:     0x7f70efb4f9df - <rustc_codegen_llvm[2f479a9f59493764]::LlvmCodegenBackend as rustc_codegen_ssa[4198c3a8f20e319b]::traits::backend::CodegenBackend>::codegen_crate
  71:     0x7f70efae4e67 - <rustc_session[72c90254a58d88d1]::session::Session>::time::<alloc[59e4fb8ddcfb913c]::boxed::Box<dyn core[3edb0f9afb6adb32]::any::Any>, rustc_interface[be6c6c80f2cd8cf2]::passes::start_codegen::{closure#0}>
  72:     0x7f70efae01da - <rustc_interface[be6c6c80f2cd8cf2]::passes::QueryContext>::enter::<<rustc_interface[be6c6c80f2cd8cf2]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[3edb0f9afb6adb32]::result::Result<alloc[59e4fb8ddcfb913c]::boxed::Box<dyn core[3edb0f9afb6adb32]::any::Any>, rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>
  73:     0x7f70efb0885f - <rustc_interface[be6c6c80f2cd8cf2]::queries::Queries>::ongoing_codegen
  74:     0x7f70efaaf4a2 - <rustc_interface[be6c6c80f2cd8cf2]::interface::Compiler>::enter::<rustc_driver[e01eec72899701d3]::run_compiler::{closure#1}::{closure#2}, core[3edb0f9afb6adb32]::result::Result<core[3edb0f9afb6adb32]::option::Option<rustc_interface[be6c6c80f2cd8cf2]::queries::Linker>, rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>
  75:     0x7f70efaa8a7f - rustc_span[fb9cf5df1e5e5539]::with_source_map::<core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>, rustc_interface[be6c6c80f2cd8cf2]::interface::create_compiler_and_run<core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>, rustc_driver[e01eec72899701d3]::run_compiler::{closure#1}>::{closure#1}>
  76:     0x7f70efab0302 - <scoped_tls[134a193f706323ee]::ScopedKey<rustc_span[fb9cf5df1e5e5539]::SessionGlobals>>::set::<rustc_interface[be6c6c80f2cd8cf2]::interface::run_compiler<core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>, rustc_driver[e01eec72899701d3]::run_compiler::{closure#1}>::{closure#0}, core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>
  77:     0x7f70efad399f - std[f9ee9c7d4fd68eda]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[be6c6c80f2cd8cf2]::util::run_in_thread_pool_with_globals<rustc_interface[be6c6c80f2cd8cf2]::interface::run_compiler<core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>, rustc_driver[e01eec72899701d3]::run_compiler::{closure#1}>::{closure#0}, core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>::{closure#0}, core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>
  78:     0x7f70efac5529 - <<std[f9ee9c7d4fd68eda]::thread::Builder>::spawn_unchecked_<rustc_interface[be6c6c80f2cd8cf2]::util::run_in_thread_pool_with_globals<rustc_interface[be6c6c80f2cd8cf2]::interface::run_compiler<core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>, rustc_driver[e01eec72899701d3]::run_compiler::{closure#1}>::{closure#0}, core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>::{closure#0}, core[3edb0f9afb6adb32]::result::Result<(), rustc_errors[b2e8492a1747ee42]::ErrorGuaranteed>>::{closure#1} as core[3edb0f9afb6adb32]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  79:     0x7f70ed0ab463 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1680342795a2dc08
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9
  80:     0x7f70ed0ab463 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h45204a69827b0e83
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9
  81:     0x7f70ed0ab463 - std::sys::unix::thread::Thread::new::thread_start::h5d4e11bbda4161c8
                               at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys/unix/thread.rs:108:17
  82:     0x7f70ece6cb43 - <unknown>
  83:     0x7f70ecefea00 - <unknown>
  84:                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.63.0 (4b91a6ea7 2022-08-08) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `hyper::server::server::new_svc::NewSvcTask<hyper::server::tcp::addr_stream::AddrStream, core::future::from_generator::GenFuture<[static generator@src/main.rs:34:50: 36:6]>, hyper::service::util::ServiceFn<fn(http::request::Request<hyper::body::body::Body>) -> impl core::future::future::Future<Output = core::result::Result<http::response::Response<hyper::body::body::Body>, anyhow::Error>> {bridge}, hyper::body::body::Body>, hyper::common::exec::Exec, hyper::server::server::NoopWatcher>: core::future::future::Future`
#1 [codegen_fulfill_obligation] checking if `core::future::into_future::IntoFuture` fulfills its obligations
#2 [resolve_instance] resolving instance `<hyper::server::server::Server<hyper::server::tcp::AddrIncoming, hyper::service::make::MakeServiceFn<[closure@src/main.rs:34:36: 36:6]>> as core::future::into_future::IntoFuture>::into_future`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
```

<!--
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>

```
0: rust_begin_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
   2: <rustc_query_system::dep_graph::dep_node::DepNode<rustc_middle::dep_graph::dep_node::DepKind> as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0}
   3: <rustc_query_system::dep_graph::dep_node::DepNode<rustc_middle::dep_graph::dep_node::DepKind> as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id
   4: rustc_query_impl::query_callbacks::local_def_id_to_hir_id::force_from_dep_node
   5: <rustc_middle::ty::context::TyCtxt as rustc_query_system::dep_graph::DepContext>::try_force_from_dep_node
   6: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   7: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   8: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   9: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  10: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  11: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  12: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  13: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  14: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  15: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  16: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  17: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::evaluate_obligation, rustc_query_impl::plumbing::QueryCtxt>
  18: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation
  19: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
  20: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor, rustc_data_structures::obligation_forest::Outcome<rustc_trait_selection::traits::fulfill::PendingPredicateObligation, rustc_infer::traits::FulfillmentErrorCode>>
  21: <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_all_or_error
  22: <rustc_infer::infer::InferCtxtBuilder>::enter::<core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>, rustc_trait_selection::traits::codegen::codegen_fulfill_obligation::{closure#0}>
  23: rustc_trait_selection::traits::codegen::codegen_fulfill_obligation
  24: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (rustc_middle::ty::ParamEnv, rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::TraitRef>), core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>>
  25: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(rustc_middle::ty::ParamEnv, rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::TraitRef>), core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>>>
  26: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::codegen_fulfill_obligation
  27: rustc_ty_utils::instance::inner_resolve_instance
  28: rustc_ty_utils::instance::resolve_instance
  29: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<(rustc_span::def_id::DefId, &rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg>)>, core::result::Result<core::option::Option<rustc_middle::ty::instance::Instance>, rustc_errors::ErrorGuaranteed>>
  30: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::resolve_instance, rustc_query_impl::plumbing::QueryCtxt>
  31: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::resolve_instance
  32: <rustc_middle::ty::instance::Instance>::resolve
  33: rustc_monomorphize::collector::collect_neighbours
  34: rustc_monomorphize::collector::collect_items_rec
  35: rustc_monomorphize::collector::collect_items_rec
  36: rustc_monomorphize::collector::collect_items_rec
  37: rustc_monomorphize::collector::collect_items_rec
  38: rustc_monomorphize::collector::collect_items_rec
  39: rustc_monomorphize::collector::collect_items_rec
  40: rustc_monomorphize::collector::collect_items_rec
  41: rustc_monomorphize::collector::collect_items_rec
  42: rustc_monomorphize::collector::collect_items_rec
  43: rustc_monomorphize::collector::collect_items_rec
  44: rustc_monomorphize::collector::collect_items_rec
  45: rustc_monomorphize::collector::collect_items_rec
  46: rustc_monomorphize::collector::collect_items_rec
  47: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  48: rustc_monomorphize::collector::collect_crate_mono_items
  49: rustc_monomorphize::partitioning::collect_and_partition_mono_items
  50: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>
  51: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>>
  52: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::collect_and_partition_mono_items, rustc_query_impl::plumbing::QueryCtxt>
  53: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items
  54: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  55: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  56: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorGuaranteed>>
  57: <rustc_interface::queries::Queries>::ongoing_codegen
  58: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  59: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  60: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
```

</p>
</details>