Repository navigation
delegation: OOM #155060
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-fn_delegation`#![feature(fn_delegation)]``#![feature(fn_delegation)]`I-compilememIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to memory usage during compilation.I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedT-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
I tried this code:
#![feature(fn_delegation)]
trait Trait<T> {
fn foo<U>(&self, _: dyn Trait) {}
}
reuse Trait::<_>::foo::<i32> as x;
fn main() {}I expected to see this happen:
no oom
Instead, this happened:
oom
Meta
rustc --version --verbose:
rustc 1.96.0-nightly (a87c9b960 2026-04-09)
binary: rustc
commit-hash: a87c9b96031d4d8698bb0cd6533e83bc6d77ddaa
commit-date: 2026-04-09
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.2
Backtrace
8,68% librustc_driver-5ecf1647954ff888.so [.] rustc_query_impl::execution::collect_active_query_jobs
4,59% librustc_driver-5ecf1647954ff888.so [.] rustc_query_impl::execution::collect_active_query_jobs_inner::<rustc_middle::query::caches::DefIdCache<rustc_middle::query::erase::ErasedData<[u8; 16]>>>
3,57% librustc_driver-5ecf1647954ff888.so [.] rustc_query_impl::execution::collect_active_query_jobs_inner::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 0]>, rustc_middle::dep_graph::graph::DepNodeIndex>>
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-fn_delegation`#![feature(fn_delegation)]``#![feature(fn_delegation)]`I-compilememIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to memory usage during compilation.I-cycleIssue: A query cycle occurred while none was expectedIssue: A query cycle occurred while none was expectedT-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.
Activity
spqr79 commentedon Apr 9, 2026
aerooneqq commentedon Apr 10, 2026
#154389 will fix OOM, the problem that delayed lowering of delegations causes query cycles will be hopefully soon fixed with more infrastructural solution.
petrochenkov commentedon Apr 15, 2026
Output now:
aerooneqq commentedon Apr 22, 2026
Other examples from #154169 (will not reopen it, let this issue track the problem):
error: internal compiler error: query cycle when printing cycle detected / when getting HIR crate items#165127 as a duplicate of this issue