Repository: rust
Issue: panic during codegen/LLVM phase
Labels: I-ICE,T-compiler,A-incr-comp,C-bug,E-needs-mcve,O-windows-7

<!--
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

The full code in this branch of my fork of quick-xml: https://github.com/Mingun/quick-xml/tree/rustc-ice-2024-06-13

The compiler crashed after I made changes in `read_text` function in `srd/reader/buffered_reader.rs`. I tried to reuse introduced `read_text_chunk` function in implementation of `read_text` function:
https://github.com/Mingun/quick-xml/blob/171ca07dc2e2e7db38b63055a7b67d28c16c4b64/src/reader/buffered_reader.rs#L51-L69
```Rust
        #[inline]
        $($async)? fn read_text $(<$lf>)? ( // line 52
            &mut self,
            buf: &'b mut Vec<u8>,
            position: &mut usize,
        ) -> ReadTextResult<'b, &'b mut Vec<u8>> {
            let start = buf.len();
            loop {
                return match self.read_text_chunk(&mut *buf, position) $(.$await)? {
                    ReadTextResult::Markup(_) => return ReadTextResult::Markup(buf),
                    ReadTextResult::UpToMarkup(_) => ReadTextResult::UpToMarkup(&buf[start..]),
                    ReadTextResult::UpToEof(n) if n.is_empty() => ReadTextResult::UpToEof(&buf[start..]),
                    ReadTextResult::UpToEof(_) => continue,

                    ReadTextResult::Err(e) if e.kind() == io::ErrorKind::Interrupted => continue,
                    ReadTextResult::Err(e) => ReadTextResult::Err(e),
                    //_ => todo!() // that line was before the match was finished, I building with it while code was incomplete
                };
            }
        }
```
When I finish `match` in loop, compiler crashed. After `cargo clean` and attempt to reproduce bug it is gone.

### 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.
-->

Note, that I use Windows 7.

`rustc --version --verbose`:
```
rustc 1.77.1 (7cf61ebde 2024-03-27)
binary: rustc
commit-hash: 7cf61ebde7b22796c69757901dd346d0fe70bd97
commit-date: 2024-03-27
host: x86_64-pc-windows-gnu
release: 1.77.1
LLVM version: 17.0.6
```

### Error output

```
PS D:\Projects\quick-xml> cargo test --all-features
   Compiling quick-xml v0.32.0 (D:\Projects\quick-xml)
thread 'copy LTO artifacts for 54jsaxrg6srxzhqm' panicked at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97\compiler\rustc_codegen_ssa\src\back\write.rs:917:44:
no saved object file in work product
stack backtrace:
   0:      0x7fedc406b9a - std::backtrace_rs::backtrace::dbghelp::trace::he9c08e339fd7a848
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:131:5
   1:      0x7fedc406b9a - std::backtrace_rs::backtrace::trace_unsynchronized::h3822cd7b213b4c21
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
   2:      0x7fedc406b9a - std::sys_common::backtrace::_print_fmt::haee6773617a31364
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:68:5
   3:      0x7fedc406b9a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he0530ea8af387102
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:44:22
   4:      0x7fedc45a24d - core::fmt::rt::Argument::fmt::h794b4e937d5d967a
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\fmt/rt.rs:142:9
   5:      0x7fedc45a24d - core::fmt::write::hb4e2957fb6520c47
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\fmt/mod.rs:1120:17
   6:      0x7fedc3fd04d - std::io::Write::write_fmt::hcf9d8f8698a0cf44
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\io/mod.rs:1846:15
   7:      0x7fedc4069c3 - std::sys_common::backtrace::_print::h628ef79e22f1f7e8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:47:5
   8:      0x7fedc4069c3 - std::sys_common::backtrace::print::h5798be0e3133eaa1
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:34:9
   9:      0x7fedc4096f9 - std::panicking::default_hook::{{closure}}::h1c46d06f25c1744e
  10:      0x7fedc4093f8 - std::panicking::default_hook::h78fe9a567e770141
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:292:9
  11:      0x7fecb2c8057 - <alloc[30f2e08722ab1d51]::boxed::Box<rustc_driver_impl[89eb4ee6ba782577]::install_ice_hook::{closure#0}> as core[793a98bc55adfe8a]::ops::function::Fn<(&dyn for<'a, 'b> core[793a98bc55adfe8a]::ops::function::Fn<(&'a core[793a98bc55adfe8a]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[793a98bc55adfe8a]::marker::Sync + core[793a98bc55adfe8a]::marker::Send, &core[793a98bc55adfe8a]::panic::panic_info::PanicInfo)>>::call
  12:      0x7fedc409dff - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf0ec3d306d27270e
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2029:9
  13:      0x7fedc409dff - std::panicking::rust_panic_with_hook::h316c0c13356a0d09
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:785:13
  14:      0x7fedc409cb2 - std::panicking::begin_panic_handler::{{closure}}::hff992a57fac84878
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:659:13
  15:      0x7fedc407339 - std::sys_common::backtrace::__rust_end_short_backtrace::h85ce963f963394e4
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:171:18
  16:      0x7fedc4099f6 - rust_begin_unwind
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:647:5
  17:      0x7fedc456857 - core::panicking::panic_fmt::h238c95df0e271ab3
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src/panicking.rs:72:14
  18:      0x7fedc4565f2 - core::panicking::panic_display::h17cfd668840768db
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src/panicking.rs:196:5
  19:      0x7fedc4565f2 - core::panicking::panic_str::h4e64f58d7b4c60e7
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src/panicking.rs:171:5
  20:      0x7fedc4565f2 - core::option::expect_failed::he3e288a0047bf79e
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src/option.rs:1988:5
  21:      0x7fecb5c26e0 - std[c2eae9dae018d9c1]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend as rustc_codegen_ssa[f57df10706d0b276]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[f57df10706d0b276]::back::write::spawn_work<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>
  22:      0x7fecb5ceae5 - <<std[c2eae9dae018d9c1]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend as rustc_codegen_ssa[f57df10706d0b276]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[f57df10706d0b276]::back::write::spawn_work<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>::{closure#1} as core[793a98bc55adfe8a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:      0x7fedc41b417 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he14a0c46b1c82c9c
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2015:9
  24:      0x7fedc41b417 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha5a21faa278bf6a0
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2015:9
  25:      0x7fedc41b417 - std::sys::pal::windows::thread::Thread::new::thread_start::h2316497b7f12aaab
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys\pal\windows/thread.rs:58:17
  26:         0x776e556d - <unknown>
  27:         0x7794372d - <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.77.1 (7cf61ebde 2024-03-27) running on x86_64-pc-windows-gnu

note: compiler flags: -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:
end of query stack
thread 'coordinator' panicked at compiler\rustc_middle\src\util\bug.rs:36:26:
/rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97\compiler\rustc_codegen_ssa\src\back\write.rs:1588:29: worker thread panicked
stack backtrace:
   0:      0x7fedc406b9a - std::backtrace_rs::backtrace::dbghelp::trace::he9c08e339fd7a848
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:131:5
   1:      0x7fedc406b9a - std::backtrace_rs::backtrace::trace_unsynchronized::h3822cd7b213b4c21
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
   2:      0x7fedc406b9a - std::sys_common::backtrace::_print_fmt::haee6773617a31364
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:68:5
   3:      0x7fedc406b9a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he0530ea8af387102
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:44:22
   4:      0x7fedc45a24d - core::fmt::rt::Argument::fmt::h794b4e937d5d967a
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\fmt/rt.rs:142:9
   5:      0x7fedc45a24d - core::fmt::write::hb4e2957fb6520c47
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\fmt/mod.rs:1120:17
   6:      0x7fedc3fd04d - std::io::Write::write_fmt::hcf9d8f8698a0cf44
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\io/mod.rs:1846:15
   7:      0x7fedc4069c3 - std::sys_common::backtrace::_print::h628ef79e22f1f7e8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:47:5
   8:      0x7fedc4069c3 - std::sys_common::backtrace::print::h5798be0e3133eaa1
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:34:9
   9:      0x7fedc4096f9 - std::panicking::default_hook::{{closure}}::h1c46d06f25c1744e
  10:      0x7fedc4093f8 - std::panicking::default_hook::h78fe9a567e770141
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:292:9
  11:      0x7fecb2c8057 - <alloc[30f2e08722ab1d51]::boxed::Box<rustc_driver_impl[89eb4ee6ba782577]::install_ice_hook::{closure#0}> as core[793a98bc55adfe8a]::ops::function::Fn<(&dyn for<'a, 'b> core[793a98bc55adfe8a]::ops::function::Fn<(&'a core[793a98bc55adfe8a]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[793a98bc55adfe8a]::marker::Sync + core[793a98bc55adfe8a]::marker::Send, &core[793a98bc55adfe8a]::panic::panic_info::PanicInfo)>>::call
  12:      0x7fedc409dff - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf0ec3d306d27270e
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2029:9
  13:      0x7fedc409dff - std::panicking::rust_panic_with_hook::h316c0c13356a0d09
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:785:13
  14:      0x7fecda74de8 - std[c2eae9dae018d9c1]::panicking::begin_panic::<alloc[30f2e08722ab1d51]::string::String>::{closure#0}
  15:      0x7fecda74319 - std[c2eae9dae018d9c1]::sys_common::backtrace::__rust_end_short_backtrace::<std[c2eae9dae018d9c1]::panicking::begin_panic<alloc[30f2e08722ab1d51]::string::String>::{closure#0}, !>
  16:      0x7fecdad3e74 - std[c2eae9dae018d9c1]::panicking::begin_panic::<alloc[30f2e08722ab1d51]::string::String>
  17:      0x7fecdb036a2 - rustc_middle[22a1d71e0f0ba5eb]::util::bug::opt_span_bug_fmt::<rustc_span[3fc1cd4e495214c4]::span_encoding::Span>::{closure#0}
  18:      0x7fecdafa671 - rustc_middle[22a1d71e0f0ba5eb]::ty::context::tls::with_opt::<rustc_middle[22a1d71e0f0ba5eb]::util::bug::opt_span_bug_fmt<rustc_span[3fc1cd4e495214c4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  19:      0x7fecdafa626 - rustc_middle[22a1d71e0f0ba5eb]::ty::context::tls::with_context_opt::<rustc_middle[22a1d71e0f0ba5eb]::ty::context::tls::with_opt<rustc_middle[22a1d71e0f0ba5eb]::util::bug::opt_span_bug_fmt<rustc_span[3fc1cd4e495214c4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  20:      0x7fecdb035b5 - rustc_middle[22a1d71e0f0ba5eb]::util::bug::bug_fmt
  21:      0x7fecb5c5702 - std[c2eae9dae018d9c1]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend as rustc_codegen_ssa[f57df10706d0b276]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[f57df10706d0b276]::back::write::start_executing_work<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend>::{closure#5}, core[793a98bc55adfe8a]::result::Result<rustc_codegen_ssa[f57df10706d0b276]::back::write::CompiledModules, ()>>::{closure#0},
core[793a98bc55adfe8a]::result::Result<rustc_codegen_ssa[f57df10706d0b276]::back::write::CompiledModules, ()>>
  22:      0x7fecb5cee20 - <<std[c2eae9dae018d9c1]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend as rustc_codegen_ssa[f57df10706d0b276]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[f57df10706d0b276]::back::write::start_executing_work<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend>::{closure#5}, core[793a98bc55adfe8a]::result::Result<rustc_codegen_ssa[f57df10706d0b276]::back::write::CompiledModules, ()>>::{closure#0}, core[793a98bc55adfe8a]::result::Result<rustc_codegen_ssa[f57df10706d0b276]::back::write::CompiledModules, ()>>::{closure#1} as core[793a98bc55adfe8a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:      0x7fedc41b417 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he14a0c46b1c82c9c
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2015:9
  24:      0x7fedc41b417 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha5a21faa278bf6a0
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2015:9
  25:      0x7fedc41b417 - std::sys::pal::windows::thread::Thread::new::thread_start::h2316497b7f12aaab
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys\pal\windows/thread.rs:58:17
  26:         0x776e556d - <unknown>
  27:         0x7794372d - <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.77.1 (7cf61ebde 2024-03-27) running on x86_64-pc-windows-gnu

note: compiler flags: -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:
end of query stack
thread 'rustc' panicked at compiler\rustc_middle\src\util\bug.rs:36:26:
/rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97\compiler\rustc_codegen_ssa\src\back\write.rs:1956:17: panic during codegen/LLVM phase
stack backtrace:
   0:      0x7fedc406b9a - std::backtrace_rs::backtrace::dbghelp::trace::he9c08e339fd7a848
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:131:5
   1:      0x7fedc406b9a - std::backtrace_rs::backtrace::trace_unsynchronized::h3822cd7b213b4c21
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
   2:      0x7fedc406b9a - std::sys_common::backtrace::_print_fmt::haee6773617a31364
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:68:5
   3:      0x7fedc406b9a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he0530ea8af387102
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:44:22
   4:      0x7fedc45a24d - core::fmt::rt::Argument::fmt::h794b4e937d5d967a
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\fmt/rt.rs:142:9
   5:      0x7fedc45a24d - core::fmt::write::hb4e2957fb6520c47
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\core\src\fmt/mod.rs:1120:17
   6:      0x7fedc3fd04d - std::io::Write::write_fmt::hcf9d8f8698a0cf44
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\io/mod.rs:1846:15
   7:      0x7fedc4069c3 - std::sys_common::backtrace::_print::h628ef79e22f1f7e8
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:47:5
   8:      0x7fedc4069c3 - std::sys_common::backtrace::print::h5798be0e3133eaa1
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys_common/backtrace.rs:34:9
   9:      0x7fedc4096f9 - std::panicking::default_hook::{{closure}}::h1c46d06f25c1744e
  10:      0x7fedc4093f8 - std::panicking::default_hook::h78fe9a567e770141
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:292:9
  11:      0x7fecb2c8057 - <alloc[30f2e08722ab1d51]::boxed::Box<rustc_driver_impl[89eb4ee6ba782577]::install_ice_hook::{closure#0}> as core[793a98bc55adfe8a]::ops::function::Fn<(&dyn for<'a, 'b> core[793a98bc55adfe8a]::ops::function::Fn<(&'a core[793a98bc55adfe8a]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[793a98bc55adfe8a]::marker::Sync + core[793a98bc55adfe8a]::marker::Send, &core[793a98bc55adfe8a]::panic::panic_info::PanicInfo)>>::call
  12:      0x7fedc409dff - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf0ec3d306d27270e
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2029:9
  13:      0x7fedc409dff - std::panicking::rust_panic_with_hook::h316c0c13356a0d09
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src/panicking.rs:785:13
  14:      0x7fecda74de8 - std[c2eae9dae018d9c1]::panicking::begin_panic::<alloc[30f2e08722ab1d51]::string::String>::{closure#0}
  15:      0x7fecda74319 - std[c2eae9dae018d9c1]::sys_common::backtrace::__rust_end_short_backtrace::<std[c2eae9dae018d9c1]::panicking::begin_panic<alloc[30f2e08722ab1d51]::string::String>::{closure#0}, !>
  16:      0x7fecdad3e74 - std[c2eae9dae018d9c1]::panicking::begin_panic::<alloc[30f2e08722ab1d51]::string::String>
  17:      0x7fecdb036a2 - rustc_middle[22a1d71e0f0ba5eb]::util::bug::opt_span_bug_fmt::<rustc_span[3fc1cd4e495214c4]::span_encoding::Span>::{closure#0}
  18:      0x7fecdafa671 - rustc_middle[22a1d71e0f0ba5eb]::ty::context::tls::with_opt::<rustc_middle[22a1d71e0f0ba5eb]::util::bug::opt_span_bug_fmt<rustc_span[3fc1cd4e495214c4]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  19:      0x7fecdafa626 - rustc_middle[22a1d71e0f0ba5eb]::ty::context::tls::with_context_opt::<rustc_middle[22a1d71e0f0ba5eb]::ty::context::tls::with_opt<rustc_middle[22a1d71e0f0ba5eb]::util::bug::opt_span_bug_fmt<rustc_span[3fc1cd4e495214c4]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  20:      0x7fecdb035b5 - rustc_middle[22a1d71e0f0ba5eb]::util::bug::bug_fmt
  21:      0x7fecb615648 - <rustc_session[972d999c881c949d]::session::Session>::time::<rustc_codegen_ssa[f57df10706d0b276]::back::write::CompiledModules, <rustc_codegen_ssa[f57df10706d0b276]::back::write::OngoingCodegen<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend>>::join::{closure#0}>
  22:      0x7fecb5cf9dd - <rustc_codegen_ssa[f57df10706d0b276]::back::write::OngoingCodegen<rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend>>::join
  23:      0x7fecb62e12c - <rustc_codegen_llvm[1c16590292ce0e33]::LlvmCodegenBackend as rustc_codegen_ssa[f57df10706d0b276]::traits::backend::CodegenBackend>::join_codegen
  24:      0x7fecb4b99fb - <rustc_interface[d28c1ca7e9fa8fda]::queries::Linker>::link
  25:      0x7fecb2afca8 - rustc_span[3fc1cd4e495214c4]::create_session_globals_then::<core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>, rustc_interface[d28c1ca7e9fa8fda]::interface::run_compiler<core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>, rustc_driver_impl[89eb4ee6ba782577]::run_compiler::{closure#0}>::{closure#0}>
  26:      0x7fecb29e6c0 - std[c2eae9dae018d9c1]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[d28c1ca7e9fa8fda]::util::run_in_thread_with_globals<rustc_interface[d28c1ca7e9fa8fda]::interface::run_compiler<core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>, rustc_driver_impl[89eb4ee6ba782577]::run_compiler::{closure#0}>::{closure#0}, core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>>
  27:      0x7fecb2b9d74 - <<std[c2eae9dae018d9c1]::thread::Builder>::spawn_unchecked_<rustc_interface[d28c1ca7e9fa8fda]::util::run_in_thread_with_globals<rustc_interface[d28c1ca7e9fa8fda]::interface::run_compiler<core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>, rustc_driver_impl[89eb4ee6ba782577]::run_compiler::{closure#0}>::{closure#0}, core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[793a98bc55adfe8a]::result::Result<(), rustc_span[3fc1cd4e495214c4]::ErrorGuaranteed>>::{closure#1} as core[793a98bc55adfe8a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:      0x7fedc41b417 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he14a0c46b1c82c9c
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2015:9
  29:      0x7fedc41b417 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha5a21faa278bf6a0
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\alloc\src/boxed.rs:2015:9
  30:      0x7fedc41b417 - std::sys::pal::windows::thread::Thread::new::thread_start::h2316497b7f12aaab
                               at /rustc/7cf61ebde7b22796c69757901dd346d0fe70bd97/library\std\src\sys\pal\windows/thread.rs:58:17
  31:         0x776e556d - <unknown>
  32:         0x7794372d - <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.77.1 (7cf61ebde 2024-03-27) running on x86_64-pc-windows-gnu

note: compiler flags: -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:
end of query stack
error: could not compile `quick-xml` (test "serde_roundtrip")
warning: build failed, waiting for other jobs to finish...
PS D:\Projects\quick-xml>
```