rust-lang / rust-lang/rust

[ICE]: `callee_abis.next().is_none()`

Open
#153,889 4 comments 0 reactions 1 assignee View on GitHub

@folkertdev is already working on this.

Since Mar 15, 2026.

C-bug F-c_variadic I-ICE needs-triage T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

auto-reduced (treereduce-rust):

#![feature(const_c_variadic)]
#[track_caller]
const fn a(...) -> u32 {
    panic!()
}

const X: u32 = a();

original:

#![feature(c_variadic)]
#![feature(const_c_variadic)]
#[track_caller]
const fn a(...) -> u32 {
    panic!()
}

const X: u32 = a();
fn main() {}

Version information

rustc 1.96.0-nightly (35f1109ec 2026-03-14)
binary: rustc
commit-hash: 35f1109ece895199e4b8d755b101e9a481d18243
commit-date: 2026-03-14
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.0

Possibly related line of code:
https://github.com/rust-lang/rust/blob/35f1109ece895199e4b8d755b101e9a481d18243/compiler/rustc_const_eval/src/interpret/stack.rs#L649-L661

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

error: `...` is not supported for non-extern functions
 --> /tmp/icemaker_global_tempdir.DU778DEwcFKQ/rustc_testrunner_tmpdir_reporting.a5RbUPb18YWw/mvce.rs:3:12
  |
3 | const fn a(...) -> u32 {
  |            ^^^
  |
  = help: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list

error[E0658]: C-variadic functions are unstable
 --> /tmp/icemaker_global_tempdir.DU778DEwcFKQ/rustc_testrunner_tmpdir_reporting.a5RbUPb18YWw/mvce.rs:3:1
  |
3 | / const fn a(...) -> u32 {
4 | |     panic!()
5 | | }
  | |_^
  |
  = note: see issue #44930 <https://github.com/rust-lang/rust/issues/44930> for more information
  = help: add `#![feature(c_variadic)]` to the crate attributes to enable
  = note: this compiler was built on 2026-03-14; consider upgrading it if it is out of date

warning: missing pattern for `...` argument
 --> /tmp/icemaker_global_tempdir.DU778DEwcFKQ/rustc_testrunner_tmpdir_reporting.a5RbUPb18YWw/mvce.rs:3:12
  |
3 | const fn a(...) -> u32 {
  |            ^^^
  |
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #145544 <https://github.com/rust-lang/rust/issues/145544>
  = note: `#[warn(varargs_without_pattern)]` (part of `#[warn(future_incompatible)]`) on by default
help: name the argument, or use `_` to continue ignoring it
  |
3 | const fn a(_: ...) -> u32 {
  |            ++

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.DU778DEwcFKQ/rustc_testrunner_tmpdir_reporting.a5RbUPb18YWw/mvce.rs:7:20
  |
7 | const X: u32 = a();
  |                    ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.DU778DEwcFKQ/rustc_testrunner_tmpdir_reporting.a5RbUPb18YWw/mvce.rs`


thread 'rustc' (514165) panicked at /rustc-dev/35f1109ece895199e4b8d755b101e9a481d18243/compiler/rustc_const_eval/src/interpret/stack.rs:655:9:
assertion failed: callee_abis.next().is_none()
stack backtrace:
   0:     0x7fdae67213eb - <<std[61fe9fb7598c59ec]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[4d6fecf5427e9877]::fmt::Display>::fmt
   1:     0x7fdae6e1d688 - core[4d6fecf5427e9877]::fmt::write
   2:     0x7fdae67383f6 - <std[61fe9fb7598c59ec]::sys::stdio::unix::Stderr as std[61fe9fb7598c59ec]::io::Write>::write_fmt
   3:     0x7fdae66f74d8 - std[61fe9fb7598c59ec]::panicking::default_hook::{closure#0}
   4:     0x7fdae6714863 - std[61fe9fb7598c59ec]::panicking::default_hook
   5:     0x7fdae571097c - std[61fe9fb7598c59ec]::panicking::update_hook::<alloc[f42d5cfb2491bc0e]::boxed::Box<rustc_driver_impl[4f72d89ade9facad]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7fdae6714b42 - std[61fe9fb7598c59ec]::panicking::panic_with_hook
   7:     0x7fdae66f75ca - std[61fe9fb7598c59ec]::panicking::panic_handler::{closure#0}
   8:     0x7fdae66ee2c9 - std[61fe9fb7598c59ec]::sys::backtrace::__rust_end_short_backtrace::<std[61fe9fb7598c59ec]::panicking::panic_handler::{closure#0}, !>
   9:     0x7fdae66f8ffd - __rustc[4cbb57e93c2da2c]::rust_begin_unwind
  10:     0x7fdae32dc4dc - core[4d6fecf5427e9877]::panicking::panic_fmt
  11:     0x7fdae2ddcd62 - core[4d6fecf5427e9877]::panicking::panic
  12:     0x7fdae55ebb37 - <rustc_const_eval[c867a7fc65327f01]::interpret::eval_context::InterpCx<rustc_const_eval[c867a7fc65327f01]::const_eval::machine::CompileTimeMachine>>::allocate_varargs::<&mut core[4d6fecf5427e9877]::iter::adapters::filter::Filter<core[4d6fecf5427e9877]::iter::adapters::zip::Zip<core[4d6fecf5427e9877]::slice::iter::Iter<rustc_const_eval[c867a7fc65327f01]::interpret::call::FnArg>, core[4d6fecf5427e9877]::slice::iter::Iter<rustc_target[71a2d010c995e1c2]::callconv::ArgAbi<rustc_middle[a02619f756b66d19]::ty::Ty>>>, <rustc_const_eval[c867a7fc65327f01]::interpret::eval_context::InterpCx<rustc_const_eval[c867a7fc65327f01]::const_eval::machine::CompileTimeMachine>>::init_stack_frame::{closure#1}>, core[4d6fecf5427e9877]::iter::adapters::filter::Filter<&mut core[4d6fecf5427e9877]::iter::adapters::enumerate::Enumerate<core[4d6fecf5427e9877]::slice::iter::Iter<rustc_target[71a2d010c995e1c2]::callconv::ArgAbi<rustc_middle[a02619f756b66d19]::ty::Ty>>>, <rustc_const_eval[c867a7fc65327f01]::interpret::eval_context::InterpCx<rustc_const_eval[c867a7fc65327f01]::const_eval::machine::CompileTimeMachine>>::init_stack_frame::{closure#3}>>
  13:     0x7fdae7e18808 - <rustc_const_eval[c867a7fc65327f01]::interpret::eval_context::InterpCx<rustc_const_eval[c867a7fc65327f01]::const_eval::machine::CompileTimeMachine>>::init_stack_frame
  14:     0x7fdae7e1016f - <rustc_const_eval[c867a7fc65327f01]::interpret::eval_context::InterpCx<rustc_const_eval[c867a7fc65327f01]::const_eval::machine::CompileTimeMachine>>::init_fn_call
  15:     0x7fdae7e3bbdc - rustc_const_eval[c867a7fc65327f01]::const_eval::eval_queries::eval_to_allocation_raw_provider
  16:     0x7fdae7e3a456 - rustc_query_impl[93b176b1fd053a9]::query_impl::eval_to_allocation_raw::invoke_provider_fn::__rust_begin_short_backtrace
  17:     0x7fdae70e561b - rustc_query_impl[93b176b1fd053a9]::execution::try_execute_query::<rustc_middle[a02619f756b66d19]::query::caches::DefaultCache<rustc_middle[a02619f756b66d19]::ty::PseudoCanonicalInput<rustc_middle[a02619f756b66d19]::mir::interpret::GlobalId>, rustc_middle[a02619f756b66d19]::query::erase::ErasedData<[u8; 24usize]>>, false>
  18:     0x7fdae70e5013 - rustc_query_impl[93b176b1fd053a9]::query_impl::eval_to_allocation_raw::execute_query_non_incr::__rust_end_short_backtrace
  19:     0x7fdae70e3efa - rustc_const_eval[c867a7fc65327f01]::const_eval::eval_queries::eval_to_const_value_raw_provider
  20:     0x7fdae70e3a56 - rustc_query_impl[93b176b1fd053a9]::query_impl::eval_to_const_value_raw::invoke_provider_fn::__rust_begin_short_backtrace
  21:     0x7fdae70e5517 - rustc_query_impl[93b176b1fd053a9]::execution::try_execute_query::<rustc_middle[a02619f756b66d19]::query::caches::DefaultCache<rustc_middle[a02619f756b66d19]::ty::PseudoCanonicalInput<rustc_middle[a02619f756b66d19]::mir::interpret::GlobalId>, rustc_middle[a02619f756b66d19]::query::erase::ErasedData<[u8; 24usize]>>, false>
  22:     0x7fdae70e50cb - rustc_query_impl[93b176b1fd053a9]::query_impl::eval_to_const_value_raw::execute_query_non_incr::__rust_end_short_backtrace
  23:     0x7fdae782dae0 - <rustc_middle[a02619f756b66d19]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[cd1968800e5e3789]::check_crate::{closure#2}>::{closure#0}
  24:     0x7fdae782d139 - rustc_hir_analysis[cd1968800e5e3789]::check_crate
  25:     0x7fdae6f4a293 - rustc_interface[5823a45d1c8a071a]::passes::analysis
  26:     0x7fdae8028e49 - rustc_query_impl[93b176b1fd053a9]::execution::try_execute_query::<rustc_middle[a02619f756b66d19]::query::caches::SingleCache<rustc_middle[a02619f756b66d19]::query::erase::ErasedData<[u8; 0usize]>>, false>
  27:     0x7fdae8028ab5 - rustc_query_impl[93b176b1fd053a9]::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
  28:     0x7fdae7fd2838 - rustc_interface[5823a45d1c8a071a]::interface::run_compiler::<(), rustc_driver_impl[4f72d89ade9facad]::run_compiler::{closure#0}>::{closure#1}
  29:     0x7fdae80073fe - std[61fe9fb7598c59ec]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[5823a45d1c8a071a]::util::run_in_thread_with_globals<rustc_interface[5823a45d1c8a071a]::util::run_in_thread_pool_with_globals<rustc_interface[5823a45d1c8a071a]::interface::run_compiler<(), rustc_driver_impl[4f72d89ade9facad]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  30:     0x7fdae8007ca0 - <std[61fe9fb7598c59ec]::thread::lifecycle::spawn_unchecked<rustc_interface[5823a45d1c8a071a]::util::run_in_thread_with_globals<rustc_interface[5823a45d1c8a071a]::util::run_in_thread_pool_with_globals<rustc_interface[5823a45d1c8a071a]::interface::run_compiler<(), rustc_driver_impl[4f72d89ade9facad]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[4d6fecf5427e9877]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7fdae8008b2c - <std[61fe9fb7598c59ec]::sys::thread::unix::Thread>::new::thread_start
  32:     0x7fdae1aa597a - <unknown>
  33:     0x7fdae1b292bc - <unknown>
  34:                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.96.0-nightly (35f1109ec 2026-03-14) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `X`
#1 [eval_to_const_value_raw] simplifying constant for the type system `X`
#2 [analysis] running analysis passes on crate `mvce`
end of query stack
error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0601, E0658.
For more information about an error, try `rustc --explain E0601`.

@rustbot label +F-c_variadic +F-const_c_variadic

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.