Skip to content

[ICE]: expected no task dependency tracking #155729

Description

@matthiaskrgr

Code

rustc code.rs -Cincremental=.

#![feature(fn_delegation)]
pub mod to_reuse {
    pub fn bar() {}
}

mod a {
    use to_reuse;
    reuse to_reuse::bar;
}
fn main() {}

Meta

rustc --version --verbose:

rustc 1.97.0-nightly (36ba2c771 2026-04-23)
binary: rustc
commit-hash: 36ba2c7712052d731a7082d0eba5ed3d9d56c133
commit-date: 2026-04-23
host: x86_64-unknown-linux-gnu
release: 1.97.0-nightly
LLVM version: 22.1.2

Error output

<output>
Backtrace

thread 'rustc' (3071962) panicked at /rustc-dev/36ba2c7712052d731a7082d0eba5ed3d9d56c133/compiler/rustc_middle/src/dep_graph/graph.rs:207:17:
assertion `left matches right` failed: expected no task dependency tracking
  left: EvalAlways
 right: TaskDepsRef::Ignore
stack backtrace:
   0:     0x7f007001e9db - <<std[75ea15d2214b0ed8]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[2481842aaaac4afd]::fmt::Display>::fmt
   1:     0x7f007062d408 - core[2481842aaaac4afd]::fmt::write
   2:     0x7f0070035986 - <std[75ea15d2214b0ed8]::sys::stdio::unix::Stderr as std[75ea15d2214b0ed8]::io::Write>::write_fmt
   3:     0x7f006fff4c58 - std[75ea15d2214b0ed8]::panicking::default_hook::{closure#0}
   4:     0x7f0070012043 - std[75ea15d2214b0ed8]::panicking::default_hook
   5:     0x7f006efd301c - std[75ea15d2214b0ed8]::panicking::update_hook::<alloc[38765da0c132a06f]::boxed::Box<rustc_driver_impl[7a2168e1d29e28dc]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f0070012322 - std[75ea15d2214b0ed8]::panicking::panic_with_hook
   7:     0x7f006fff4d18 - std[75ea15d2214b0ed8]::panicking::panic_handler::{closure#0}
   8:     0x7f006ffeba59 - std[75ea15d2214b0ed8]::sys::backtrace::__rust_end_short_backtrace::<std[75ea15d2214b0ed8]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f006fff677d - __rustc[8f3dd88aee2b0d44]::rust_begin_unwind
  10:     0x7f006cc2569c - core[2481842aaaac4afd]::panicking::panic_fmt
  11:     0x7f006e8832d3 - core[2481842aaaac4afd]::panicking::assert_failed_inner
  12:     0x7f006f5f5786 - core[2481842aaaac4afd]::panicking::assert_matches_failed::<rustc_middle[c570919ef227af48]::dep_graph::graph::TaskDepsRef>
  13:     0x7f006f622bb1 - <rustc_middle[c570919ef227af48]::dep_graph::graph::DepGraph>::assert_ignored
  14:     0x7f006f62f2c8 - <rustc_middle[c570919ef227af48]::ty::context::TyCtxt>::feed_delayed_owner
  15:     0x7f006ea680d1 - rustc_ast_lowering[7e92bd53c071fb21]::lower_delayed_owner
  16:     0x7f0070abae2a - rustc_query_impl[f941e7d062ab7745]::execution::try_execute_query::<rustc_data_structures[121626c9cd4080a7]::vec_cache::VecCache<rustc_span[e4549c29dd024989]::def_id::LocalDefId, rustc_middle[c570919ef227af48]::query::erase::ErasedData<[u8; 0usize]>, rustc_middle[c570919ef227af48]::dep_graph::graph::DepNodeIndex>, true>
  17:     0x7f006faab40d - rustc_query_impl[f941e7d062ab7745]::query_impl::lower_delayed_owner::execute_query_incr::__rust_end_short_backtrace
  18:     0x7f0071862ee6 - rustc_middle[c570919ef227af48]::hir::map::hir_crate_items
  19:     0x7f0071741225 - rustc_query_impl[f941e7d062ab7745]::query_impl::hir_crate_items::invoke_provider_fn::__rust_begin_short_backtrace
  20:     0x7f0071737541 - rustc_query_impl[f941e7d062ab7745]::execution::try_execute_query::<rustc_middle[c570919ef227af48]::query::caches::SingleCache<rustc_middle[c570919ef227af48]::query::erase::ErasedData<[u8; 8usize]>>, true>
  21:     0x7f0071aa9d34 - rustc_query_impl[f941e7d062ab7745]::query_impl::hir_crate_items::execute_query_incr::__rust_end_short_backtrace
  22:     0x7f00714f52de - rustc_interface[27fd4870d2d649e5]::passes::analysis
  23:     0x7f007179d7f2 - rustc_query_impl[f941e7d062ab7745]::execution::try_execute_query::<rustc_middle[c570919ef227af48]::query::caches::SingleCache<rustc_middle[c570919ef227af48]::query::erase::ErasedData<[u8; 0usize]>>, true>
  24:     0x7f007179d1aa - rustc_query_impl[f941e7d062ab7745]::query_impl::analysis::execute_query_incr::__rust_end_short_backtrace
  25:     0x7f007175c3b9 - rustc_interface[27fd4870d2d649e5]::interface::run_compiler::<(), rustc_driver_impl[7a2168e1d29e28dc]::run_compiler::{closure#0}>::{closure#1}
  26:     0x7f007172c004 - std[75ea15d2214b0ed8]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[27fd4870d2d649e5]::util::run_in_thread_with_globals<rustc_interface[27fd4870d2d649e5]::util::run_in_thread_pool_with_globals<rustc_interface[27fd4870d2d649e5]::interface::run_compiler<(), rustc_driver_impl[7a2168e1d29e28dc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  27:     0x7f007172c6ed - <std[75ea15d2214b0ed8]::thread::lifecycle::spawn_unchecked<rustc_interface[27fd4870d2d649e5]::util::run_in_thread_with_globals<rustc_interface[27fd4870d2d649e5]::util::run_in_thread_pool_with_globals<rustc_interface[27fd4870d2d649e5]::interface::run_compiler<(), rustc_driver_impl[7a2168e1d29e28dc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[2481842aaaac4afd]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  28:     0x7f007172d56c - <std[75ea15d2214b0ed8]::sys::thread::unix::Thread>::new::thread_start
  29:     0x7f006b2a597a - <unknown>
  30:     0x7f006b3292bc - <unknown>
  31:                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 `/home/matthias/vcs/github/CRED/rustc-ice-2026-04-24T10_48_05-3071952.txt` to your bug report

note: rustc 1.97.0-nightly (36ba2c771 2026-04-23) running on x86_64-unknown-linux-gnu

note: compiler flags: -C incremental=[REDACTED]

query stack during panic:
#0 [lower_delayed_owner] lowering the delayed AST owner `a::bar`
#1 [hir_crate_items] getting HIR crate items
#2 [analysis] running analysis passes on crate `code`
end of query stack
warning: 1 warning emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.F-fn_delegation`#![feature(fn_delegation)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions