-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
A-cfgArea: `cfg` conditional compilationArea: `cfg` conditional compilationC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Repro
In a Bash shell / on a Linux host:
$ touch lib.rs
$ rustc --crate-name=foo --crate-type=lib --cfg foo="12xy" lib.rs
Meta
$ rustc --version --verbose
rustc 1.94.0-nightly (85c8ff69c 2026-01-02)
binary: rustc
commit-hash: 85c8ff69cb3efd950395cc444a54bbbdad668865
commit-date: 2026-01-02
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8
Error output
$ rustc --crate-name=foo --crate-type=lib --cfg foo="12xy" lib.rs
thread 'rustc' (1879107) panicked at /rustc-dev/85c8ff69cb3efd950395cc444a54bbbdad668865/compiler/rustc_errors/src/emitter.rs:1524:88:
called `Result::unwrap()` on an `Err` value: failed while formatting fluent string `session_invalid_num_literal_suffix`:
message was missing
stack backtrace:
0: 0x7ffb4502e2d3 - <<std[447efae271323c10]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[f6693e57cd064a40]::fmt::Display>::fmt
1: 0x7ffb4560e348 - core[f6693e57cd064a40]::fmt::write
2: 0x7ffb450449f6 - <std[447efae271323c10]::sys::stdio::unix::Stderr as std[447efae271323c10]::io::Write>::write_fmt
3: 0x7ffb45004ac8 - std[447efae271323c10]::panicking::default_hook::{closure#0}
4: 0x7ffb45022213 - std[447efae271323c10]::panicking::default_hook
5: 0x7ffb4400c49a - std[447efae271323c10]::panicking::update_hook::<alloc[73d32e15361375ff]::boxed::Box<rustc_driver_impl[6b3496e7fe174e5c]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7ffb450224f2 - std[447efae271323c10]::panicking::panic_with_hook
7: 0x7ffb45004b88 - std[447efae271323c10]::panicking::panic_handler::{closure#0}
8: 0x7ffb44ffbc69 - std[447efae271323c10]::sys::backtrace::__rust_end_short_backtrace::<std[447efae271323c10]::panicking::panic_handler::{closure#0}, !>
9: 0x7ffb4500663d - __rustc[84873610a2c64cf5]::rust_begin_unwind
10: 0x7ffb41d7bb4c - core[f6693e57cd064a40]::panicking::panic_fmt
11: 0x7ffb41984242 - core[f6693e57cd064a40]::result::unwrap_failed
12: 0x7ffb440532a8 - <rustc_errors[a7a7ba0b85486070]::emitter::HumanEmitter>::emit_messages_default_inner::{closure#0}
13: 0x7ffb4406726f - <rustc_errors[a7a7ba0b85486070]::emitter::HumanEmitter as rustc_errors[a7a7ba0b85486070]::emitter::Emitter>::emit_diagnostic
14: 0x7ffb4406ada4 - <rustc_errors[a7a7ba0b85486070]::emitter::EmitterWithNote as rustc_errors[a7a7ba0b85486070]::emitter::Emitter>::emit_diagnostic
15: 0x7ffb46b4491e - <rustc_errors[a7a7ba0b85486070]::DiagCtxtInner>::emit_diagnostic::{closure#3}
16: 0x7ffb46b423de - rustc_interface[10ca444cfc40e8be]::callbacks::track_diagnostic::<core[f6693e57cd064a40]::option::Option<rustc_span[38c555654447a964]::ErrorGuaranteed>>
17: 0x7ffb46b41434 - <rustc_errors[a7a7ba0b85486070]::DiagCtxtInner>::emit_diagnostic
18: 0x7ffb46b412f1 - <rustc_errors[a7a7ba0b85486070]::DiagCtxtHandle>::emit_diagnostic
19: 0x7ffb421eeb4c - <rustc_span[38c555654447a964]::ErrorGuaranteed as rustc_errors[a7a7ba0b85486070]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
20: 0x7ffb44c1af9f - rustc_session[aa1d3d95b1c9c8b0]::errors::report_lit_error
21: 0x7ffb46415aff - <rustc_parse[f82cf85f42c09d87]::parser::Parser>::parse_unsuffixed_meta_item_lit
22: 0x7ffb46417c20 - <rustc_parse[f82cf85f42c09d87]::parser::Parser>::parse_meta_item
23: 0x7ffb464b92c1 - rustc_interface[10ca444cfc40e8be]::interface::parse_cfg
24: 0x7ffb46880360 - rustc_interface[10ca444cfc40e8be]::interface::run_compiler::<(), rustc_driver_impl[6b3496e7fe174e5c]::run_compiler::{closure#0}>::{closure#1}
25: 0x7ffb467c990e - std[447efae271323c10]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[10ca444cfc40e8be]::util::run_in_thread_with_globals<rustc_interface[10ca444cfc40e8be]::util::run_in_thread_pool_with_globals<rustc_interface[10ca444cfc40e8be]::interface::run_compiler<(), rustc_driver_impl[6b3496e7fe174e5c]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
26: 0x7ffb467c96e0 - <std[447efae271323c10]::thread::lifecycle::spawn_unchecked<rustc_interface[10ca444cfc40e8be]::util::run_in_thread_with_globals<rustc_interface[10ca444cfc40e8be]::util::run_in_thread_pool_with_globals<rustc_interface[10ca444cfc40e8be]::interface::run_compiler<(), rustc_driver_impl[6b3496e7fe174e5c]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[f6693e57cd064a40]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
27: 0x7ffb467d03b8 - <std[447efae271323c10]::sys::thread::unix::Thread>::new::thread_start
28: 0x7ffb4029cb7b - start_thread
at ./nptl/pthread_create.c:448:8
29: 0x7ffb4031a7b8 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
30: 0x0 - <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: please make sure that you have updated to the latest nightly
note: please attach the file at [`rustc-ice-2026-01-03T19_24_30-1878976.txt`](https://github.com/user-attachments/files/24417541/rustc-ice-2026-01-03T19_24_30-1878976.txt) to your bug report
note: rustc 1.94.0-nightly (85c8ff69c 2026-01-02) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
A-cfgArea: `cfg` conditional compilationArea: `cfg` conditional compilationC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.