Repository: rust
Issue: error: internal compiler error: no errors encountered even though `delay_span_bug` issued
Labels: I-ICE,T-compiler,C-bug,E-needs-mcve

As I was compiling Substrate, I faced this error:

```
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DropGlue(DefId(2:2801 ~ core[b4b4]::ptr::drop_in_place), Some(hyper::proto::h1::dispatch::Server<hyper::service::util::ServiceFn<fn(http::request::Request<jsonrpsee::jsonrpsee_server::logger::Body>) -> impl futures::Future<Output = sc_service::Result<http::response::Response<jsonrpsee::jsonrpsee_server::logger::Body>, std::convert::Infallible>> {jsonrpsee::jsonrpsee_server::transport::http::reject_connection::{closure#0}::reject}, jsonrpsee::jsonrpsee_server::logger::Body>, jsonrpsee::jsonrpsee_server::logger::Body>)) (after phase change to runtime-optimized) at bb0[0]:
                                Field projection `(*_1).field[0]` specified type `std::pin::Pin<std::boxed::Box<std::option::Option<std::future::from_generator::GenFuture<[static generator@jsonrpsee::jsonrpsee_server::transport::http::reject_connection::{closure#0}::reject::{closure#0}]>>>>`, but actual type is `std::pin::Pin<std::boxed::Box<std::option::Option<<hyper::service::util::ServiceFn<fn(http::request::Request<jsonrpsee::jsonrpsee_server::logger::Body>) -> impl futures::Future<Output = sc_service::Result<http::response::Response<jsonrpsee::jsonrpsee_server::logger::Body>, std::convert::Infallible>> {jsonrpsee::jsonrpsee_server::transport::http::reject_connection::{closure#0}::reject}, jsonrpsee::jsonrpsee_server::logger::Body> as hyper::service::http::HttpService<jsonrpsee::jsonrpsee_server::logger::Body>>::Future>>>`
   --> /Users/kofiotuo/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:490:1
    |
490 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:88:36

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1594:13
stack backtrace:
   0:        0x100fd3c44 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5ceaa9f104581d16
   1:        0x101024ff0 - core::fmt::write::h70c33f48cfd4e8aa
   2:        0x100fc71f4 - std::io::Write::write_fmt::h24e387c05c0fa515
   3:        0x100fd3a58 - std::sys_common::backtrace::print::ha3dd569c0e03b1e6
   4:        0x100fd64ec - std::panicking::default_hook::{{closure}}::h85ce766fb3b3c496
   5:        0x100fd6244 - std::panicking::default_hook::h7c44756c2f138c7c
   6:        0x1090ce784 - rustc_driver[34fe2e47ceb1eef]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x100fd6be4 - std::panicking::rust_panic_with_hook::h243fdb33bd154152
   8:        0x10cffe950 - std[f91ad3a11560037b]::panicking::begin_panic::<rustc_errors[159eca52afa358bf]::ExplicitBug>::{closure#0}
   9:        0x10cffcfd8 - std[f91ad3a11560037b]::sys_common::backtrace::__rust_end_short_backtrace::<std[f91ad3a11560037b]::panicking::begin_panic<rustc_errors[159eca52afa358bf]::ExplicitBug>::{closure#0}, !>
  10:        0x10d3698ec - std[f91ad3a11560037b]::panicking::begin_panic::<rustc_errors[159eca52afa358bf]::ExplicitBug>
  11:        0x10cff0bec - std[f91ad3a11560037b]::panic::panic_any::<rustc_errors[159eca52afa358bf]::ExplicitBug>
  12:        0x10cff66d0 - <rustc_errors[159eca52afa358bf]::HandlerInner>::flush_delayed::<alloc[81ea9162d64fa727]::vec::Vec<rustc_errors[159eca52afa358bf]::diagnostic::Diagnostic>, &str>
  13:        0x10cff31bc - <rustc_errors[159eca52afa358bf]::HandlerInner as core[b4b423dc40156325]::ops::drop::Drop>::drop
  14:        0x10906201c - core[b4b423dc40156325]::ptr::drop_in_place::<rustc_session[ee64fa510201ce22]::parse::ParseSess>
  15:        0x109063400 - core[b4b423dc40156325]::ptr::drop_in_place::<rustc_session[ee64fa510201ce22]::session::Session>
  16:        0x1090be188 - core[b4b423dc40156325]::ptr::drop_in_place::<rustc_interface[d6308f9366e490e8]::interface::Compiler>
  17:        0x1090aa118 - rustc_span[668ea99b1ecd1622]::with_source_map::<core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>, rustc_interface[d6308f9366e490e8]::interface::run_compiler<core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>, rustc_driver[34fe2e47ceb1eef]::run_compiler::{closure#1}>::{closure#0}::{closure#1}>
  18:        0x1090a1f8c - <scoped_tls[44143ff9a1fdbbff]::ScopedKey<rustc_span[668ea99b1ecd1622]::SessionGlobals>>::set::<rustc_interface[d6308f9366e490e8]::interface::run_compiler<core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>, rustc_driver[34fe2e47ceb1eef]::run_compiler::{closure#1}>::{closure#0}, core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>>
  19:        0x109070f74 - std[f91ad3a11560037b]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[d6308f9366e490e8]::util::run_in_thread_pool_with_globals<rustc_interface[d6308f9366e490e8]::interface::run_compiler<core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>, rustc_driver[34fe2e47ceb1eef]::run_compiler::{closure#1}>::{closure#0}, core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>>
  20:        0x109056d40 - <<std[f91ad3a11560037b]::thread::Builder>::spawn_unchecked_<rustc_interface[d6308f9366e490e8]::util::run_in_thread_pool_with_globals<rustc_interface[d6308f9366e490e8]::interface::run_compiler<core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>, rustc_driver[34fe2e47ceb1eef]::run_compiler::{closure#1}>::{closure#0}, core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b4b423dc40156325]::result::Result<(), rustc_errors[159eca52afa358bf]::ErrorGuaranteed>>::{closure#1} as core[b4b423dc40156325]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  21:        0x100fdee60 - std::sys::unix::thread::Thread::new::thread_start::h94b0d6958f791f7f
  22:        0x1ab33206c - __pthread_deallocate

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-nightly (70f8737b2 2022-11-23) running on aarch64-apple-darwin

note: compiler flags: --crate-type bin -C opt-level=3 -C embed-bitcode=no

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `node-template`