Repository: rust
Issue: the compiler unexpectedly panicked.
Labels: I-ICE,T-compiler,C-bug,S-needs-repro

I am sorry, I don't know where the code went wrong, but the compiler prompts [error: the compiler unexpectedly panicked. this is a bug.]

<details><summary><strong>error msg</strong></summary>
<p>

```
thread 'rustc' panicked at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce\compiler\rustc_serialize\src\serialize.rs:129:9:
assertion failed: bytes[len] == STR_SENTINEL
stack backtrace:
   0:     0x7ffde4c922c2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7851e041f2b8bcc2
   1:     0x7ffde4cc4cdd - core::fmt::write::h1642dfca37b49735
   2:     0x7ffde4c88ca1 - <std::io::IoSlice as core::fmt::Debug>::fmt::h7801514a6fc13a4a
   3:     0x7ffde4c920ea - std::sys_common::backtrace::lock::h8caaa69a6cc2258b
   4:     0x7ffde4c95529 - std::panicking::default_hook::h67f6260a0bf37eca
   5:     0x7ffde4c951e5 - std::panicking::default_hook::h67f6260a0bf37eca
   6:     0x7ffdc455fb03 - <tracing_subscriber[b129777695c18cc]::fmt::format::Writer>::write_fmt
   7:     0x7ffde4c95b43 - std::panicking::rust_panic_with_hook::h870983d929e74e12
   8:     0x7ffde4c959ab - <std::panicking::begin_panic_handler::StaticStrPayload as core::panic::PanicPayload>::take_box::h971268ed26284d4c
   9:     0x7ffde4c92bc9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7851e041f2b8bcc2
  10:     0x7ffde4c956b2 - rust_begin_unwind
  11:     0x7ffde4cea447 - core::panicking::panic_fmt::ha5dd7a91f3010b68
  12:     0x7ffde4cea522 - core::panicking::panic::h61d0277f5e1a7407
  13:     0x7ffdc41778de - <rustc_span[64dbdf40f18d9543]::symbol::Symbol as rustc_serialize[5c2de7cb72870ff8]::serialize::Encodable<rustc_metadata[6225089cefb65fc8]::rmeta::encoder::EncodeContext>>::encode
  14:     0x7ffdc420680a - <rustc_span[64dbdf40f18d9543]::def_id::CrateNum as rustc_serialize[5c2de7cb72870ff8]::serialize::Encodable<rustc_metadata[6225089cefb65fc8]::rmeta::encoder::EncodeContext>>::encode
  15:     0x7ffdc33176ee - <rustc_span[64dbdf40f18d9543]::SpanData as rustc_serialize[5c2de7cb72870ff8]::serialize::Encodable<rustc_metadata[6225089cefb65fc8]::rmeta::encoder::EncodeContext>>::encode
  16:     0x7ffdc30fe7c0 - rustc_query_impl[1b1c3ff2f5873f4d]::profiling_support::alloc_self_profile_query_strings
  17:     0x7ffdc30ea637 - rustc_query_impl[1b1c3ff2f5873f4d]::profiling_support::alloc_self_profile_query_strings
  18:     0x7ffdc3eb2b73 - <rustc_query_impl[1b1c3ff2f5873f4d]::plumbing::QueryCtxt as rustc_query_system[79eaec2bcc989eb1]::query::QueryContext>::load_side_effects
  19:     0x7ffdc31ac59b - <dyn std[9ab95dd99822253f]::io::Write as nu_ansi_term[e69e53107ba4ac27]::write::AnyWrite>::write_str
  20:     0x7ffdc2fcf619 - <rustc_builtin_macros[dd4f16c72cadaf36]::deriving::generic::find_type_parameters::Visitor as rustc_ast[e9dd69dd6ecea279]::visit::Visitor>::visit_ty
  21:     0x7ffdc3b3fe5d - <rustc_resolve[9c6e9c40bfd72874]::Segment as core[d8a3f01ca499b8ab]::convert::From<&rustc_ast[e9dd69dd6ecea279]::ast::PathSegment>>::from
  22:     0x7ffdc3b27c4c - <rustc_ast_lowering[78b18a5bf5a77e2]::index::NodeCollector as rustc_hir[bb3c913758e2f47e]::intravisit::Visitor>::visit_variant
  23:     0x7ffdc3b2a22b - <rustc_resolve[9c6e9c40bfd72874]::Resolver as rustc_expand[f8d40f23793d5605]::base::ResolverExpand>::resolve_imports
  24:     0x7ffdc42255fa - <rustc_expand[f8d40f23793d5605]::expand::MacroExpander>::fully_expand_fragment
  25:     0x7ffdc334f6aa - <rustc_expand[f8d40f23793d5605]::expand::MacroExpander>::expand_crate
  26:     0x7ffdc06d9fd9 - rustc_interface[9ef98228d448de4b]::interface::parse_check_cfg
  27:     0x7ffdc06baf1e - rustc_interface[9ef98228d448de4b]::passes::resolver_for_lowering
  28:     0x7ffdc30ff70d - rustc_query_impl[1b1c3ff2f5873f4d]::profiling_support::alloc_self_profile_query_strings
  29:     0x7ffdc3112919 - rustc_query_impl[1b1c3ff2f5873f4d]::profiling_support::alloc_self_profile_query_strings
  30:     0x7ffdc311e548 - rustc_query_impl[1b1c3ff2f5873f4d]::profiling_support::alloc_self_profile_query_strings
  31:     0x7ffdc312ebc4 - rustc_query_impl[1b1c3ff2f5873f4d]::profiling_support::alloc_self_profile_query_strings
  32:     0x7ffdc31933a1 - <dyn std[9ab95dd99822253f]::io::Write as nu_ansi_term[e69e53107ba4ac27]::write::AnyWrite>::write_str
  33:     0x7ffdc0669706 - rustc_driver_impl[5ff3db5439d2e5e5]::main
  34:     0x7ffdc0670e1b - rustc_driver_impl[5ff3db5439d2e5e5]::args::arg_expand_all
  35:     0x7ffdc0688809 - <rustc_middle[29ac2ae09cb008db]::ty::SymbolName as core[d8a3f01ca499b8ab]::fmt::Debug>::fmt
  36:     0x7ffdc068770f - <rustc_middle[29ac2ae09cb008db]::ty::SymbolName as core[d8a3f01ca499b8ab]::fmt::Debug>::fmt
  37:     0x7ffdc0691068 - <rustc_middle[29ac2ae09cb008db]::ty::SymbolName as core[d8a3f01ca499b8ab]::fmt::Debug>::fmt
  38:     0x7ffde4ca7ebc - std::sys::windows::thread::Thread::new::h827e23232df84eef
  39:     0x7ffe75fc257d - BaseThreadInitThunk
  40:     0x7ffe770caa58 - RtlUserThreadStart

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.76.0 (07dca489a 2024-02-04) running on x86_64-pc-windows-msvc

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 [module_children] collecting child items of module `vtable`
#1 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: could not compile `park_monitor` (bin "park_monitor")
```

</p>
</details>

### other descriptions
1. `cargo clippy` executed successfully
2. `cargo run` and `cargo build` executed fail
3. I re executed `cargo clean` and `cargo build`, then they executed successfully, and I not change any code