thread 'rustc' (796355) panicked at /rustc-dev/defdb83d4bde9406ec4b37dd3dd572c1d70a14ca/compiler/rustc_parse/src/parser/diagnostics.rs:2267:44:
called `Result::unwrap()` on an `Err` value: Some(DiagInner { level: Error, messages: [(FluentIdentifier("parse_expected_identifier_found_keyword_str", None), NoStyle)], code: None, lint_id: None, span: MultiSpan { primary_spans: [/tmp/icemaker_global_tempdir.kifsbI1txcVD/rustc_testrunner_tmpdir_reporting.6LYBMeUXY8XE/mvce.rs:10:23: 10:27 (#0)], span_labels: [(/tmp/icemaker_global_tempdir.kifsbI1txcVD/rustc_testrunner_tmpdir_reporting.6LYBMeUXY8XE/mvce.rs:10:23: 10:27 (#0), Translated("expected identifier, found keyword"))] }, children: [], suggestions: Enabled([]), args: {"token": Str("self")}, reserved_args: {}, sort_span: /tmp/icemaker_global_tempdir.kifsbI1txcVD/rustc_testrunner_tmpdir_reporting.6LYBMeUXY8XE/mvce.rs:10:23: 10:27 (#0), is_lint: None, long_ty_path: None, emitted_at: DiagLocation { file: "/rustc-dev/defdb83d4bde9406ec4b37dd3dd572c1d70a14ca/compiler/rustc_parse/src/parser/diagnostics.rs", line: 376, col: 34 } })
stack backtrace:
0: 0x7f80da241003 - <<std[51f25addf6667380]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[5126a227517a4cf5]::fmt::Display>::fmt
1: 0x7f80da80e2c8 - core[5126a227517a4cf5]::fmt::write
2: 0x7f80da2579f6 - <std[51f25addf6667380]::sys::stdio::unix::Stderr as std[51f25addf6667380]::io::Write>::write_fmt
3: 0x7f80da217078 - std[51f25addf6667380]::panicking::default_hook::{closure#0}
4: 0x7f80da234733 - std[51f25addf6667380]::panicking::default_hook
5: 0x7f80d9208e2a - std[51f25addf6667380]::panicking::update_hook::<alloc[38134d33c6c92a63]::boxed::Box<rustc_driver_impl[1d73b4288d20d386]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7f80da234a12 - std[51f25addf6667380]::panicking::panic_with_hook
7: 0x7f80da217138 - std[51f25addf6667380]::panicking::panic_handler::{closure#0}
8: 0x7f80da20b679 - std[51f25addf6667380]::sys::backtrace::__rust_end_short_backtrace::<std[51f25addf6667380]::panicking::panic_handler::{closure#0}, !>
9: 0x7f80da218c0d - __rustc[52d9cece14eac652]::rust_begin_unwind
10: 0x7f80d763bd7c - core[5126a227517a4cf5]::panicking::panic_fmt
11: 0x7f80d6bbe272 - core[5126a227517a4cf5]::result::unwrap_failed
12: 0x7f80daa4f7b8 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_param_general::{closure#0}
13: 0x7f80daa44870 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_fn_params
14: 0x7f80daa78482 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_fn
15: 0x7f80db2fb296 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_item_kind
16: 0x7f80db2f7737 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_item_common
17: 0x7f80daab2de8 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_assoc_item
18: 0x7f80db2eb96a - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_item_trait
19: 0x7f80db2fb6f9 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_item_kind
20: 0x7f80db2f7737 - <rustc_parse[e87bf106090b7c1a]::parser::Parser>::parse_item_common
21: 0x7f80dbe0c78c - <rustc_expand[f87a94d765ddf3ed]::expand::MacroExpander>::fully_expand_fragment
22: 0x7f80dbe041d2 - <rustc_expand[f87a94d765ddf3ed]::expand::MacroExpander>::expand_crate
23: 0x7f80dafcebf4 - rustc_interface[e7b4096e17a3c877]::passes::configure_and_expand
24: 0x7f80db99d0d5 - rustc_interface[e7b4096e17a3c877]::passes::resolver_for_lowering_raw
25: 0x7f80db99ce4d - rustc_query_impl[89c6b20ee6d2544b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[89c6b20ee6d2544b]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e5f0e31661f7e7f1]::query::erase::Erased<[u8; 16usize]>>
26: 0x7f80db99ce2f - <rustc_query_impl[89c6b20ee6d2544b]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[5126a227517a4cf5]::ops::function::FnOnce<(rustc_middle[e5f0e31661f7e7f1]::ty::context::TyCtxt, ())>>::call_once
27: 0x7f80db98279c - rustc_query_system[8ffed1da27509f09]::query::plumbing::try_execute_query::<rustc_query_impl[89c6b20ee6d2544b]::DynamicConfig<rustc_query_system[8ffed1da27509f09]::query::caches::SingleCache<rustc_middle[e5f0e31661f7e7f1]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[89c6b20ee6d2544b]::plumbing::QueryCtxt, false>
28: 0x7f80db982304 - rustc_query_impl[89c6b20ee6d2544b]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
29: 0x7f80dbb8dc38 - <rustc_interface[e7b4096e17a3c877]::passes::create_and_enter_global_ctxt<core[5126a227517a4cf5]::option::Option<rustc_interface[e7b4096e17a3c877]::queries::Linker>, rustc_driver_impl[1d73b4288d20d386]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[5126a227517a4cf5]::ops::function::FnOnce<(&rustc_session[971580cc16053ea2]::session::Session, rustc_middle[e5f0e31661f7e7f1]::ty::context::CurrentGcx, alloc[38134d33c6c92a63]::sync::Arc<rustc_data_structures[7382e954ae46016d]::jobserver::Proxy>, &std[51f25addf6667380]::sync::once_lock::OnceLock<rustc_middle[e5f0e31661f7e7f1]::ty::context::GlobalCtxt>, &rustc_data_structures[7382e954ae46016d]::sync::worker_local::WorkerLocal<rustc_middle[e5f0e31661f7e7f1]::arena::Arena>, &rustc_data_structures[7382e954ae46016d]::sync::worker_local::WorkerLocal<rustc_hir[dbd870516aefb0ef]::Arena>, rustc_driver_impl[1d73b4288d20d386]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
30: 0x7f80db9b70f4 - rustc_interface[e7b4096e17a3c877]::interface::run_compiler::<(), rustc_driver_impl[1d73b4288d20d386]::run_compiler::{closure#0}>::{closure#1}
31: 0x7f80db940fba - std[51f25addf6667380]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e7b4096e17a3c877]::util::run_in_thread_with_globals<rustc_interface[e7b4096e17a3c877]::util::run_in_thread_pool_with_globals<rustc_interface[e7b4096e17a3c877]::interface::run_compiler<(), rustc_driver_impl[1d73b4288d20d386]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
32: 0x7f80db940d7e - <std[51f25addf6667380]::thread::lifecycle::spawn_unchecked<rustc_interface[e7b4096e17a3c877]::util::run_in_thread_with_globals<rustc_interface[e7b4096e17a3c877]::util::run_in_thread_pool_with_globals<rustc_interface[e7b4096e17a3c877]::interface::run_compiler<(), rustc_driver_impl[1d73b4288d20d386]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[5126a227517a4cf5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
33: 0x7f80db942b42 - <std[51f25addf6667380]::sys::thread::unix::Thread>::new::thread_start
34: 0x7f80d529698b - <unknown>
35: 0x7f80d531a9cc - <unknown>
36: 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: rustc 1.94.0-nightly (defdb83d4 2026-01-17) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z dump-mir-dir=dir
query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack
see #149692 for prev case
auto-reduced (treereduce-rust):
original:
Version information
Possibly related line of code:
rust/compiler/rustc_parse/src/parser/diagnostics.rs
Lines 2261 to 2273 in defdb83
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --edition=2024Program output