rustc 1.85.1 fails to compile jiff on x86_64-pc-windows-msvc
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
On my Windows machine, rustc is failing to build jiff (any version, 0.1 or 0.2) on stable (1.8.5.1). It builds fine on beta (1.86.0-beta.6 8c7969a3a 2025-03-16) and nightly (1.87.0-nightly 78948ac25 2025-03-20).
Code
src/main.rs
fn main() {
println!("Hello, world!");
}
Cargo.toml
[package]
name = "jiff-compile-bug"
version = "0.0.0"
edition = "2024"
publish = false
[dependencies]
jiff = "0.2.4"
rustc --version --verbose:
rustc 1.85.1 (4eb161250 2025-03-15)
binary: rustc
commit-hash: 4eb161250e340c8f48f66e2b929ef4a5bed7c181
commit-date: 2025-03-15
host: x86_64-pc-windows-msvc
release: 1.85.1
LLVM version: 19.1.7
Error output
RUST_BACKTRACE=1 cargo build
Compiling v0.2.4
thread 'rustc' panicked at compiler\rustc_metadata\src\rmeta\decoder.rs:1701:22:
missing source file
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\std\src\panicking.rs:692
1: core::panicking::panic_fmt
at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\panicking.rs:75
2: core::panicking::panic_display
at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\panicking.rs:261
3: core::option::expect_failed
at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\option.rs:2024
4: <rustc_metadata::rmeta::decoder::DecodeContext as rustc_span::SpanDecoder>::decode_span
5: RINvMs6_NtCsag7cZLPZgMG_9hashbrown3rawINtB6_8RawTableTNtNtCs4TvN3zakyDo_10rustc_span6def_id8DefIndexNtNtCsh5y175izj6V_9rustc_hir11definitions6DefKeyEE14reserve_rehashNCINvNtB8_3map11make_hasherBQ_B1A_NtCsbFfs2EFLlfU_10rustc_hash13FxBuildHasherE0ECs24hlJGjY
6: RINvMs6_NtCsag7cZLPZgMG_9hashbrown3rawINtB6_8RawTableTNtNtCs4TvN3zakyDo_10rustc_span6def_id8DefIndexNtNtCsh5y175izj6V_9rustc_hir11definitions6DefKeyEE14reserve_rehashNCINvNtB8_3map11make_hasherBQ_B1A_NtCsbFfs2EFLlfU_10rustc_hash13FxBuildHasherE0ECs24hlJGjY
7: rustc_metadata::fs::encode_and_write_metadata
8: rustc_query_impl::plumbing::query_key_hash_verify_all
9: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches10DefIdCacheINtNtNtCsdJ7Jdt3AtsE_12rustc_middle5query5erase6ErasedAhj8_EEKb0_KB3r_KB3r_ENtNtB1f_8plumbing9QueryCtxt
10: rustc_query_impl::plumbing::query_key_hash_verify_all
11: <rustc_middle::ty::context::TyCtxt>::instance_mir
12: rustc_monomorphize::mono_checks::check_mono_item
13: rustc_query_impl::plumbing::query_key_hash_verify_all
14: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches12DefaultCacheNtNtNtCsdJ7Jdt3AtsE_12rustc_middle2ty8instance8InstanceINtNtNtB2z_5query5erase6ErasedAhj0_EEKb0_KB3Y_
15: rustc_query_impl::plumbing::query_key_hash_verify_all
16: rustc_monomorphize::collector::items_of_instance
17: rustc_query_impl::plumbing::query_key_hash_verify_all
18: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches12DefaultCacheTNtNtNtCsdJ7Jdt3AtsE_12rustc_middle2ty8instance8InstanceNtNtNtB2A_3mir4mono14CollectionModeEINtNtNtB2
19: rustc_query_impl::plumbing::query_key_hash_verify_all
20: rustc_monomorphize::partitioning::collect_and_partition_mono_items
21: rustc_monomorphize::partitioning::collect_and_partition_mono_items
22: rustc_monomorphize::partitioning::collect_and_partition_mono_items
23: rustc_monomorphize::partitioning::collect_and_partition_mono_items
24: rustc_monomorphize::partitioning::collect_and_partition_mono_items
25: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
26: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
27: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsdJ7Jdt3AtsE_12rustc_middle5query5erase6ErasedAhj18_EEKb0_KB3t_KB3t_ENtNtB1f_8plumbing9QueryCt
28: rustc_query_impl::query_system
29: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
30: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
31: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
32: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtCs837yaQvHFj4_21rustc_data_structures9vec_cache8VecCacheNtNtCs4TvN3zakyDo_10rustc_span6def_id8CrateNumINtNtNtCsdJ7Jdt3AtsE_12
33: rustc_query_impl::query_system
34: <rustc_metadata::rmeta::encoder::EncodeContext as rustc_span::SpanEncoder>::encode_symbol
35: rustc_metadata::rmeta::encoder::encode_metadata
36: rustc_metadata::fs::encode_and_write_metadata
37: <rustc_interface::queries::Linker>::codegen_and_build_linker
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.85.1 (4eb161250 2025-03-15) running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [optimized_mir] optimizing MIR for `std::sys::sync::rwlock::futex::RwLock::read`
#1 [check_mono_item] monomorphization-time checking
#2 [items_of_instance] collecting items used by `std::sys::sync::rwlock::futex::RwLock::read`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
#4 [exported_symbols] collecting exported symbols for crate `0`
end of query stack
thread 'rustc' panicked at compiler\rustc_metadata\src\rmeta\decoder.rs:477:36:
Missing SyntaxContext 58 for crate "std"
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\std\src\panicking.rs:692
1: core::panicking::panic_fmt
at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\panicking.rs:75
2: <rustc_metadata::rmeta::decoder::DecodeContext as rustc_span::SpanDecoder>::decode_syntax_context
3: <rustc_metadata::rmeta::decoder::DecodeContext as rustc_span::SpanDecoder>::decode_span
4: RINvMs6_NtCsag7cZLPZgMG_9hashbrown3rawINtB6_8RawTableTNtNtCs4TvN3zakyDo_10rustc_span6def_id8DefIndexNtNtCsh5y175izj6V_9rustc_hir11definitions6DefKeyEE14reserve_rehashNCINvNtB8_3map11make_hasherBQ_B1A_NtCsbFfs2EFLlfU_10rustc_hash13FxBuildHasherE0ECs24hlJGjY
5: RINvMs6_NtCsag7cZLPZgMG_9hashbrown3rawINtB6_8RawTableTNtNtCs4TvN3zakyDo_10rustc_span6def_id8DefIndexNtNtCsh5y175izj6V_9rustc_hir11definitions6DefKeyEE14reserve_rehashNCINvNtB8_3map11make_hasherBQ_B1A_NtCsbFfs2EFLlfU_10rustc_hash13FxBuildHasherE0ECs24hlJGjY
6: rustc_metadata::fs::encode_and_write_metadata
7: rustc_query_impl::plumbing::query_key_hash_verify_all
8: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches10DefIdCacheINtNtNtCsdJ7Jdt3AtsE_12rustc_middle5query5erase6ErasedAhj8_EEKb0_KB3r_KB3r_ENtNtB1f_8plumbing9QueryCtxt
9: rustc_query_impl::plumbing::query_key_hash_verify_all
10: <rustc_middle::ty::context::TyCtxt>::instance_mir
11: rustc_monomorphize::mono_checks::check_mono_item
12: rustc_query_impl::plumbing::query_key_hash_verify_all
13: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches12DefaultCacheNtNtNtCsdJ7Jdt3AtsE_12rustc_middle2ty8instance8InstanceINtNtNtB2z_5query5erase6ErasedAhj0_EEKb0_KB3Y_
14: rustc_query_impl::plumbing::query_key_hash_verify_all
15: rustc_monomorphize::collector::items_of_instance
16: rustc_query_impl::plumbing::query_key_hash_verify_all
17: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches12DefaultCacheTNtNtNtCsdJ7Jdt3AtsE_12rustc_middle2ty8instance8InstanceNtNtNtB2A_3mir4mono14CollectionModeEINtNtNtB2
18: rustc_query_impl::plumbing::query_key_hash_verify_all
19: rustc_monomorphize::partitioning::collect_and_partition_mono_items
20: rustc_monomorphize::partitioning::collect_and_partition_mono_items
21: rustc_monomorphize::partitioning::collect_and_partition_mono_items
22: rustc_monomorphize::partitioning::collect_and_partition_mono_items
23: rustc_monomorphize::partitioning::collect_and_partition_mono_items
24: rustc_monomorphize::partitioning::collect_and_partition_mono_items
25: rustc_monomorphize::partitioning::collect_and_partition_mono_items
26: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
27: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
28: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsdJ7Jdt3AtsE_12rustc_middle5query5erase6ErasedAhj18_EEKb0_KB3t_KB3t_ENtNtB1f_8plumbing9QueryCt
29: rustc_query_impl::query_system
30: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
31: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
32: <alloc::sync::Arc<rustc_session::config::OutputFilenames>>::drop_slow
33: RINvNtNtCshEccyZ4IOWV_18rustc_query_system5query8plumbing17try_execute_queryINtCs5WUFc8ekKxI_16rustc_query_impl13DynamicConfigINtNtCs837yaQvHFj4_21rustc_data_structures9vec_cache8VecCacheNtNtCs4TvN3zakyDo_10rustc_span6def_id8CrateNumINtNtNtCsdJ7Jdt3AtsE_12
34: rustc_query_impl::query_system
35: <rustc_metadata::rmeta::encoder::EncodeContext as rustc_span::SpanEncoder>::encode_symbol
36: rustc_metadata::rmeta::encoder::encode_metadata
37: rustc_metadata::fs::encode_and_write_metadata
38: <rustc_interface::queries::Linker>::codegen_and_build_linker
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.85.1 (4eb161250 2025-03-15) running on x86_64-pc-windows-msvc
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [optimized_mir] optimizing MIR for `std::sync::poison::rwlock::RwLock::<T>::write`
#1 [check_mono_item] monomorphization-time checking
#2 [items_of_instance] collecting items used by `std::sync::poison::rwlock::RwLock::<tz::db::bundled::inner::global::CachedZones>::write`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
#4 [exported_symbols] collecting exported symbols for crate `0`
end of query stack
error: could not compile `` (lib)
Caused by:
process didn't exit successfully: `C:\Users\Al\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name --edition=2021 C:\Users\Al\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\jiff-0.2.4\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=178 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"alloc\"" --cfg "feature=\"default\"" --cfg "feature=\"std\"" --cfg "feature=\"tz-fat\"" --cfg "feature=\"tz-system\"" --cfg "feature=\"tzdb-bundle-platform\"" --cfg "feature=\"tzdb-concatenated\"" --cfg "feature=\"tzdb-zoneinfo\"" --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values(\"alloc\", \"default\", \"js\", \"logging\", \"serde\", \"static\", \"static-tz\", \"std\", \"tz-fat\", \"tz-system\", \"tzdb-bundle-always\", \"tzdb-bundle-platform\", \"tzdb-concatenated\", \"tzdb-zoneinfo\"))" -C metadata=a8d2e81290119069 -C extra-filename=-264f2e77efbdd8e1 --out-dir \jiff-compile-bug\target\debug\deps -L dependency=C:\Users\Al\jiff-compile-bug\target\debug\deps --extern jiff_tzdb_platform=C:\Users\Al\jiff-compile-bug\target\debug\deps\libjiff_tzdb_platform-395ee3f4fe696184.rmeta --extern windows_sys=C:\Users\Al\jiff-compile-bug\target\debug\deps\libwindows_sys-8042586e44b05abd.rmeta --cap-lints allow -L native=C:\Users\Al\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\windows_x86_64_msvc-0.52.6\lib` (exit code: 101)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the provided Cargo project on rustc 1.85.1 for x86_64-pc-windows-msvc, then compare with beta or nightly. Start in compiler/rustc_metadata/src/rmeta/decoder.rs at the reported lines 1701 and 477, using the optimized_mir query stack as context. Done means the jiff build no longer triggers the compiler panic on the affected stable toolchain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100