-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-fn_delegation`#![feature(fn_delegation)]``#![feature(fn_delegation)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
Code
This first ICEs and then hangs while printing the query stack
impl Iterator {
reuse< < <for<'a> fn()>::Output>::Item as Iterator>::*;
}Meta
rustc --version --verbose:
rustc 1.96.0-nightly (d9563937f 2026-03-03)
binary: rustc
commit-hash: d9563937fa3b030c5845811113505070109414d2
commit-date: 2026-03-03
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.0
Error output
<output>
Backtrace
error[E0575]: expected method or associated constant, found associated type `Iterator::Item`
--> a.rs:2:8
|
2 | reuse< < <for<'a> fn()>::Output>::Item as Iterator>::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a method or associated constant
error[E0658]: functions delegation is not yet fully implemented
--> a.rs:2:3
|
2 | reuse< < <for<'a> fn()>::Output>::Item as Iterator>::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #118212 <https://github.com/rust-lang/rust/issues/118212> for more information
= help: add `#![feature(fn_delegation)]` to the crate attributes to enable
= note: this compiler was built on 2026-03-03; consider upgrading it if it is out of date
thread 'rustc' (4021229) panicked at /rustc-dev/d9563937fa3b030c5845811113505070109414d2/compiler/rustc_hir/src/definitions.rs:70:13:
found DefPathHash collision between DefPath {
data: [
DisambiguatedDefPathData {
data: Impl,
disambiguator: 0,
},
DisambiguatedDefPathData {
data: ValueNs(
"partition_in_place",
),
disambiguator: 0,
},
DisambiguatedDefPathData {
data: LifetimeNs(
"'a",
),
disambiguator: 0,
},
],
krate: crate0,
} and DefPath {
data: [
DisambiguatedDefPathData {
data: Impl,
disambiguator: 0,
},
DisambiguatedDefPathData {
data: ValueNs(
"partition_in_place",
),
disambiguator: 0,
},
DisambiguatedDefPathData {
data: LifetimeNs(
"'a",
),
disambiguator: 0,
},
],
krate: crate0,
}. Compilation cannot continue.
stack backtrace:
0: 0x7f14dad6495b - <<std[f1c45ce4ee161762]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[bca3ab08014da8dd]::fmt::Display>::fmt
1: 0x7f14db4228c8 - core[bca3ab08014da8dd]::fmt::write
2: 0x7f14dad7b966 - <std[f1c45ce4ee161762]::sys::stdio::unix::Stderr as std[f1c45ce4ee161762]::io::Write>::write_fmt
3: 0x7f14dad3aa38 - std[f1c45ce4ee161762]::panicking::default_hook::{closure#0}
4: 0x7f14dad57dc3 - std[f1c45ce4ee161762]::panicking::default_hook
5: 0x7f14d9d43eec - std[f1c45ce4ee161762]::panicking::update_hook::<alloc[69236e05dd7e86e4]::boxed::Box<rustc_driver_impl[87c87f3e97b6922c]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7f14dad580a2 - std[f1c45ce4ee161762]::panicking::panic_with_hook
7: 0x7f14dad3aaf8 - std[f1c45ce4ee161762]::panicking::panic_handler::{closure#0}
8: 0x7f14dad31829 - std[f1c45ce4ee161762]::sys::backtrace::__rust_end_short_backtrace::<std[f1c45ce4ee161762]::panicking::panic_handler::{closure#0}, !>
9: 0x7f14dad3c55d - __rustc[e7c1d660df8da2b8]::rust_begin_unwind
10: 0x7f14d7917ddc - core[bca3ab08014da8dd]::panicking::panic_fmt
11: 0x7f14dbccb465 - <rustc_middle[5922741a8fb3ae5b]::ty::context::TyCtxt>::create_def
12: 0x7f14d986b64c - <<rustc_ast_lowering[2f0d4b4a36627f7a]::delegation::generics::HirOrAstGenerics>::into_hir_generics::{closure#0} as core[bca3ab08014da8dd]::ops::function::FnOnce<(&mut rustc_ast[5f0b67c0ef4a6e26]::ast::Generics,)>>::call_once
13: 0x7f14d98527ed - <rustc_ast_lowering[2f0d4b4a36627f7a]::delegation::generics::HirOrAstGenerics>::into_hir_generics
14: 0x7f14d9849f44 - <rustc_ast_lowering[2f0d4b4a36627f7a]::LoweringContext>::process_segment
15: 0x7f14d984caf0 - <rustc_ast_lowering[2f0d4b4a36627f7a]::LoweringContext>::lower_delegation
16: 0x7f14dbba50c1 - <rustc_ast_lowering[2f0d4b4a36627f7a]::item::ItemLowerer>::lower_node
17: 0x7f14dbb9bd67 - rustc_ast_lowering[2f0d4b4a36627f7a]::lower_to_hir
18: 0x7f14dc5d5368 - rustc_query_impl[7668830077db65c5]::query_impl::hir_crate::invoke_provider_fn::__rust_begin_short_backtrace
19: 0x7f14dc5d4244 - rustc_query_impl[7668830077db65c5]::execution::try_execute_query::<rustc_middle[5922741a8fb3ae5b]::query::caches::SingleCache<rustc_middle[5922741a8fb3ae5b]::query::erase::ErasedData<[u8; 8usize]>>, false>
20: 0x7f14dc5d3ccf - rustc_query_impl[7668830077db65c5]::query_impl::hir_crate::execute_query_non_incr::__rust_end_short_backtrace
21: 0x7f14db56defd - rustc_query_impl[7668830077db65c5]::query_impl::opt_hir_owner_nodes::invoke_provider_fn::__rust_begin_short_backtrace
22: 0x7f14db56d0ca - rustc_query_impl[7668830077db65c5]::execution::try_execute_query::<rustc_data_structures[d0703324dfa1e5f8]::vec_cache::VecCache<rustc_span[cd7b03fc0c8acb50]::def_id::LocalDefId, rustc_middle[5922741a8fb3ae5b]::query::erase::ErasedData<[u8; 8usize]>, rustc_middle[5922741a8fb3ae5b]::dep_graph::graph::DepNodeIndex>, false>
23: 0x7f14db56cd45 - rustc_query_impl[7668830077db65c5]::query_impl::opt_hir_owner_nodes::execute_query_non_incr::__rust_end_short_backtrace
24: 0x7f14dbcfaee6 - <rustc_middle[5922741a8fb3ae5b]::ty::context::TyCtxt>::hir_owner_node
25: 0x7f14dc5da911 - rustc_middle[5922741a8fb3ae5b]::hir::map::hir_crate_items
26: 0x7f14dc5d5f31 - rustc_query_impl[7668830077db65c5]::query_impl::hir_crate_items::invoke_provider_fn::__rust_begin_short_backtrace
27: 0x7f14dc5d4244 - rustc_query_impl[7668830077db65c5]::execution::try_execute_query::<rustc_middle[5922741a8fb3ae5b]::query::caches::SingleCache<rustc_middle[5922741a8fb3ae5b]::query::erase::ErasedData<[u8; 8usize]>>, false>
28: 0x7f14dc5d3a4f - rustc_query_impl[7668830077db65c5]::query_impl::hir_crate_items::execute_query_non_incr::__rust_end_short_backtrace
29: 0x7f14db569a18 - rustc_interface[a32636ddb3a490e3]::passes::analysis
30: 0x7f14dc5d2fdc - rustc_query_impl[7668830077db65c5]::execution::try_execute_query::<rustc_middle[5922741a8fb3ae5b]::query::caches::SingleCache<rustc_middle[5922741a8fb3ae5b]::query::erase::ErasedData<[u8; 0usize]>>, false>
31: 0x7f14dc5d2d3b - rustc_query_impl[7668830077db65c5]::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
32: 0x7f14dc602aed - rustc_interface[a32636ddb3a490e3]::interface::run_compiler::<(), rustc_driver_impl[87c87f3e97b6922c]::run_compiler::{closure#0}>::{closure#1}
33: 0x7f14dc5e71be - std[f1c45ce4ee161762]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[a32636ddb3a490e3]::util::run_in_thread_with_globals<rustc_interface[a32636ddb3a490e3]::util::run_in_thread_pool_with_globals<rustc_interface[a32636ddb3a490e3]::interface::run_compiler<(), rustc_driver_impl[87c87f3e97b6922c]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
34: 0x7f14dc5e7820 - <std[f1c45ce4ee161762]::thread::lifecycle::spawn_unchecked<rustc_interface[a32636ddb3a490e3]::util::run_in_thread_with_globals<rustc_interface[a32636ddb3a490e3]::util::run_in_thread_pool_with_globals<rustc_interface[a32636ddb3a490e3]::interface::run_compiler<(), rustc_driver_impl[87c87f3e97b6922c]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[bca3ab08014da8dd]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
35: 0x7f14dc5e86ac - <std[f1c45ce4ee161762]::sys::thread::unix::Thread>::new::thread_start
36: 0x7f14d60a598b - <unknown>
37: 0x7f14d6129a0c - <unknown>
38: 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: please attach the file at `/tmp/im/rustc-ice-2026-03-04T15_38_58-4021211.txt` to your bug report
note: rustc 1.96.0-nightly (d9563937f 2026-03-03) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [hir_crate] getting the crate HIR
Reactions are currently unavailable
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-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.T-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.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.