[ICE]: Way too much `const` and a random ICE
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
Unfortunately, I did not get an error in the terminal when this occurred, so I did not notice immediately. Here is the code as soon as I realized what happened: CATboardBETA/carr@9cf776
I think this is because the ICE was triggered by RustRover/clippy, so it only generated files rustc-ice-XXXXX
Meta
rustc --version --verbose:
rustc 1.100.0-nightly (fb6531d55 2026-08-23)
binary: rustc
commit-hash: fb6531d550e0075b9eb9a51464f404805eec87d9
commit-date: 2026-08-23
host: aarch64-apple-darwin
release: 1.100.0-nightly
LLVM version: 23.1.0
Enabled features:
#![feature(
const_trait_impl,
const_index,
min_generic_const_args,
generic_const_args,
macroless_generic_const_args,
unsized_const_params,
adt_const_params,
inherent_associated_types,
generic_const_items
)]
Error output
From the rustc-ice file:
thread 'rustc' panicked at /rustc/fb6531d550e0075b9eb9a51464f404805eec87d9/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:250:9:
Box<dyn Any>
stack backtrace:
0: 0x109161b18 - <std[e21b3683465a8967]::backtrace::Backtrace>::create
1: 0x106fd5060 - std[e21b3683465a8967]::panicking::update_hook::<alloc[b5c9ea2aabaa5b59]::boxed::Box<rustc_driver_impl[525399ffdc98f6d3]::install_ice_hook::{closure#1}>>::{closure#0}
2: 0x109175df0 - std[e21b3683465a8967]::panicking::panic_with_hook
3: 0x10703e990 - std[e21b3683465a8967]::panicking::begin_panic::<rustc_errors[7b88e3713d77cfbf]::ExplicitBug>::{closure#0}
4: 0x107031754 - std[e21b3683465a8967]::sys::backtrace::__rust_end_short_backtrace::<std[e21b3683465a8967]::panicking::begin_panic<rustc_errors[7b88e3713d77cfbf]::ExplicitBug>::{closure#0}, !>
5: 0x1092c9b84 - std[e21b3683465a8967]::panicking::begin_panic::<rustc_errors[7b88e3713d77cfbf]::ExplicitBug>
6: 0x1092ca8d0 - <rustc_errors[7b88e3713d77cfbf]::diagnostic::BugAbort as rustc_errors[7b88e3713d77cfbf]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
7: 0x10931eac0 - <rustc_errors[7b88e3713d77cfbf]::DiagCtxtHandle>::span_bug::<rustc_span[596e8c369ecbf1c7]::span_encoding::Span, alloc[b5c9ea2aabaa5b59]::string::String>
8: 0x109330154 - rustc_middle[a9132e072e41c531]::util::bug::opt_span_bug_fmt::<rustc_span[596e8c369ecbf1c7]::span_encoding::Span>::{closure#0}
9: 0x107bf1368 - rustc_middle[a9132e072e41c531]::ty::context::tls::with_opt::<rustc_middle[a9132e072e41c531]::util::bug::opt_span_bug_fmt<rustc_span[596e8c369ecbf1c7]::span_encoding::Span>::{closure#0}, !>::{closure#0}
10: 0x107bb3a54 - rustc_middle[a9132e072e41c531]::ty::context::tls::with_context_opt::<rustc_middle[a9132e072e41c531]::ty::context::tls::with_opt<rustc_middle[a9132e072e41c531]::util::bug::opt_span_bug_fmt<rustc_span[596e8c369ecbf1c7]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
11: 0x10932fab0 - rustc_middle[a9132e072e41c531]::util::bug::span_bug_fmt::<rustc_span[596e8c369ecbf1c7]::span_encoding::Span>
12: 0x1007e7158 - <(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId) as rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::TypeInformationCtxt>::report_bug::<&str>
13: 0x10025038c - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::cat_pattern::<<rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::walk_pat::{closure#0}>
14: 0x10044634c - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::walk_expr
15: 0x100444fcc - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::consume_expr
16: 0x10044544c - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::walk_expr
17: 0x100444fcc - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::consume_expr
18: 0x100445948 - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::walk_expr
19: 0x100444fcc - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::consume_expr
20: 0x100444e7c - <rustc_hir_typeck[10d8a8c1a54d8eda]::expr_use_visitor::ExprUseVisitor<(&rustc_lint[8f34f078bd1d4c76]::context::LateContext, rustc_span[596e8c369ecbf1c7]::def_id::LocalDefId), &mut clippy_lints[1fdc619c3c223321]::needless_pass_by_value::MovedVariablesCtxt>>::consume_body
21: 0x10053604c - <clippy_lints[1fdc619c3c223321]::needless_pass_by_value::NeedlessPassByValue as rustc_lint[8f34f078bd1d4c76]::passes::LateLintPass>::check_fn
22: 0x1005d2d98 - <clippy_lints[1fdc619c3c223321]::CombinedLateLintPass as rustc_lint[8f34f078bd1d4c76]::passes::LateLintPass>::check_fn
23: 0x1078f8ba8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
24: 0x107a29ac8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item
25: 0x1078f7ba8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
26: 0x107a29ac8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item
27: 0x1078f7ba8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
28: 0x107a29ac8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item
29: 0x1078f7ba8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass>>::with_param_env::<<rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item::{closure#0}::{closure#0}>
30: 0x107a29ac8 - <rustc_lint[8f34f078bd1d4c76]::late::LateContextAndPass<rustc_lint[8f34f078bd1d4c76]::late::RuntimeCombinedLateLintPass> as rustc_hir[960beeb4d7eff623]::intravisit::Visitor>::visit_item
31: 0x10796e61c - rustc_lint[8f34f078bd1d4c76]::late::check_crate::{closure#0}
32: 0x1079ad6a0 - rustc_lint[8f34f078bd1d4c76]::late::check_crate
33: 0x1078739f0 - rustc_interface[90380d98620dbc]::passes::analysis::{closure#0}::{closure#0}::{closure#2}
34: 0x106f53cb0 - rustc_data_structures[a476c867ecbd163d]::sync::parallel::par_fns
35: 0x107875438 - rustc_interface[90380d98620dbc]::passes::analysis::{closure#0}::{closure#0}
36: 0x106f53cb0 - rustc_data_structures[a476c867ecbd163d]::sync::parallel::par_fns
37: 0x1078905e0 - rustc_interface[90380d98620dbc]::passes::analysis
38: 0x10856e534 - rustc_query_impl[bdfb7834df9239d4]::execution::try_execute_query::<rustc_middle[a9132e072e41c531]::query::caches::SingleCache<rustc_middle[a9132e072e41c531]::query::erase::ErasedData<[u8; 0usize]>>, true>
39: 0x108727614 - rustc_query_impl[bdfb7834df9239d4]::query_vtables::analysis::execute_query_incr::__rust_end_short_backtrace
40: 0x106f6b5c8 - rustc_interface[90380d98620dbc]::passes::create_and_enter_global_ctxt::<core[3b94f939c518ac39]::option::Option<rustc_interface[90380d98620dbc]::queries::Linker>, rustc_driver_impl[525399ffdc98f6d3]::run_compiler::{closure#0}::{closure#1}>
41: 0x106fd38f0 - rustc_interface[90380d98620dbc]::interface::run_compiler::<(), rustc_driver_impl[525399ffdc98f6d3]::run_compiler::{closure#0}>::{closure#2}
42: 0x106fc9d78 - std[e21b3683465a8967]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[90380d98620dbc]::util::run_in_thread_with_globals<rustc_interface[90380d98620dbc]::util::run_in_thread_pool_with_globals<rustc_interface[90380d98620dbc]::interface::run_compiler<(), rustc_driver_impl[525399ffdc98f6d3]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
43: 0x106fd9068 - <std[e21b3683465a8967]::thread::lifecycle::spawn_unchecked<rustc_interface[90380d98620dbc]::util::run_in_thread_with_globals<rustc_interface[90380d98620dbc]::util::run_in_thread_pool_with_globals<rustc_interface[90380d98620dbc]::interface::run_compiler<(), rustc_driver_impl[525399ffdc98f6d3]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[3b94f939c518ac39]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
44: 0x109180c34 - <std[e21b3683465a8967]::sys::thread::unix::Thread>::new::thread_start
45: 0x19d783bc8 - __pthread_cond_wait
rustc version: 1.100.0-nightly (fb6531d55 2026-08-23)
platform: aarch64-apple-darwin
query stack during panic:
#0 [analysis] running analysis passes on crate `carr`
end of query stack
Sorry I don't have a MRE or anything.
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
Start with the linked CATboardBETA/carr commit and reproduce using rustc 1.100.0-nightly on the reported target, checking the rustc-ice output. Read compiler/rustc_hir_typeck/src/expr_use_visitor.rs around line 250 and the Clippy needless_pass_by_value path shown in the stack trace. Done means reducing the report to a minimal reproducer and providing a regression test or a confirmed diagnosis.
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
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100