[ICE]: error performing operation: fully_perform
Open
Nobody has claimed this yet.
A-const-generics
A-trait-system
C-bug
fixed-by-next-solver
I-ICE
S-has-mcve
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Code
I am compiling a FunDSP adaptor.
use fundsp::audionode::AudioNode;
use fundsp::audiounit::AudioUnit;
use fundsp::net::Net;
use fundsp::typenum::{Const, ToUInt, U, U2};
use fundsp::{Frame, Size};
use std::sync::Arc;
type GenericStereoToN<const N: usize> = Arc<dyn Fn([f32; N]) -> Net + Send + Sync>;
#[derive(Clone)]
pub struct StereoStaticParamsWrapper<const N: usize> {
inner: GenericStereoToN<N>,
effect: Net,
params_state: [f32; N],
params_temp: [f32; N],
}
impl<const N: usize> StereoStaticParamsWrapper<N> {
fn new(inner: GenericStereoToN<N>) -> Self {
StereoStaticParamsWrapper {
inner,
params_temp: [0.0; N],
params_state: [0.0; N],
effect: Net::new(2, 2),
}
}
}
impl<const N: usize> StereoStaticParamsWrapper<N>
where
Const<N>: ToUInt,
U<N>: Size<f32>,
{
fn process_cc_events(&mut self, input: &Frame<f32, U<N>>) {
// By convention 0, 1 slots will be stereo audio
for i in 2..N {
self.params_temp[i] = input[i];
}
if self.params_temp != self.params_state {
self.effect = (self.inner)(self.params_temp);
self.params_state = self.params_temp;
};
}
}
impl<const N: usize> AudioNode for StereoStaticParamsWrapper<N>
where
Const<N>: ToUInt,
U<N>: Size<f32>,
{
const ID: u64 = 60000;
type Inputs = U<N>;
type Outputs = U2;
fn reset(&mut self) {
self.effect.reset();
}
fn set_sample_rate(&mut self, sample_rate: f64) {
self.effect.set_sample_rate(sample_rate);
}
fn tick(&mut self, input: &Frame<f32, U<N>>) -> Frame<f32, Self::Outputs> {
let mut output = [0.0f32; 2];
self.process_cc_events(input);
// By convention 0, 1 slots will be stereo audio
self.effect.tick(&input[0..2], &mut output);
Frame::from(output).into()
}
}
Meta
rustc --version --verbose:
rustc 1.94.1 (e408947bf 2026-03-25)
binary: rustc
commit-hash: e408947bfd200af42db322daf0fadfe7e26d3bd1
commit-date: 2026-03-25
host: aarch64-apple-darwin
release: 1.94.1
LLVM version: 21.1.8
Error output
error: internal compiler error: error performing operation: fully_perform
--> src/common/adapters.rs:83:9
|
83 | Frame::from(output).into()
| ^^^^^^^^^^^
|
note: delayed at /rustc-dev/e408947bfd200af42db322daf0fadfe7e26d3bd1/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs:95:25
0: std::backtrace::Backtrace::create
1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
3: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
4: <rustc_errors::DiagCtxtHandle>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
5: <rustc_borrowck::type_check::TypeChecker>::ascribe_user_type
6: rustc_borrowck::type_check::type_check
7: <rustc_borrowck::root_cx::BorrowCheckRootCtxt>::do_mir_borrowck
8: rustc_borrowck::mir_borrowck
9: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
11: rustc_query_impl::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
12: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
13: rustc_interface::passes::analysis
14: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
15: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
16: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
17: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
18: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
19: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
20: <std::thread::lifecycle::spawn_unchecked<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
21: std::sys::thread::unix::Thread::new::thread_start
22: __pthread_cond_wait
--> src/common/adapters.rs:83:9
|
83 | Frame::from(output).into()
| ^^^^^^^^^^^
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.94.1 (e408947bf 2026-03-25) running on aarch64-apple-darwin
note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C strip=debuginfo
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
warning: `nabi_core` (lib) generated 31 warnings (run `cargo fix --lib -p nabi_core` to apply 9 suggestions)
error: could not compile `nabi_core` (lib); 31 warnings emitted
Backtrace
<backtrace>
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 ICE with the FunDSP example and cargo build, then inspect src/common/adapters.rs:83 and the delayed operation in rustc_trait_selection/src/traits/query/type_op/custom.rs:95. Done means the example no longer triggers an internal compiler error and the regression is covered by an appropriate compiler test.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100