[ICE]: could not normalize Binder
Open
Nobody has claimed this yet.
C-bug
I-ICE
needs-triage
T-compiler
WG-trait-system-refactor
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Code
//@compile-flags: --edition=2021 --crate-type lib -Znext-solver=globally
trait Trait<Input> {
type Output;
}
fn walk2<F>()
where
for<'a> F: 'a,
for<'a> <F as Trait<&'a u32>>::Output: 'a,
{
}
Meta
rustc --version --verbose:
rustc 1.97.0-nightly (37d85e592 2026-04-28)
binary: rustc
commit-hash: 37d85e592f9ae5f20f7d9a9f99785246fa7298da
commit-date: 2026-04-28
host: x86_64-unknown-linux-gnu
release: 1.97.0-nightly
LLVM version: 22.1.4
Error output
warning: trait `Trait` is never used
--> /tmp/crash.rs:2:7
|
2 | trait Trait<Input> {
| ^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
warning: function `walk2` is never used
--> /tmp/crash.rs:6:4
|
6 | fn walk2<F>()
| ^^^^^
warning: 2 warnings emitted
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: could not normalize `for<'a> <F as Trait<&'a u32>>::Output: 'a`
|
= note: delayed at /rustc-dev/37d85e592f9ae5f20f7d9a9f99785246fa7298da/compiler/rustc_trait_selection/src/regions.rs:41:41 - disabled backtrace
error: internal compiler error: error performing operation: query type op
--> /tmp/crash.rs:6:1
|
6 | / fn walk2<F>()
7 | | where
8 | | for<'a> F: 'a,
9 | | for<'a> <F as Trait<&'a u32>>::Output: 'a,
| |______________________________________________^
|
note: delayed at /rustc-dev/37d85e592f9ae5f20f7d9a9f99785246fa7298da/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs:126:26 - disabled backtrace
--> /tmp/crash.rs:6:1
|
6 | / fn walk2<F>()
7 | | where
8 | | for<'a> F: 'a,
9 | | for<'a> <F as Trait<&'a u32>>::Output: 'a,
| |______________________________________________^
error: internal compiler error: could not normalize Binder { value: OutlivesPredicate(Alias(AliasTy { args: [F/#0, &'^0.Named(DefId(0:9 ~ crash[3b23]::walk2::'a#1)) u32], kind: Projection { def_id: DefId(0:5 ~ crash[3b23]::Trait::Output) }, .. }), '^0.Named(DefId(0:9 ~ crash[3b23]::walk2::'a#1))), bound_vars: [Region(BrNamed(DefId(0:9 ~ crash[3b23]::walk2::'a#1)))] }
|
= note: delayed at /rustc-dev/37d85e592f9ae5f20f7d9a9f99785246fa7298da/compiler/rustc_borrowck/src/type_check/free_region_relations.rs:363:34 - disabled backtrace
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/rust_bisect/rustc-ice-2026-04-29T21_08_35-1927978.txt` to your bug report
note: rustc 1.97.0-nightly (37d85e592 2026-04-28) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -Z next-solver=globally
query stack during panic:
end of query stack
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 issue's Rust snippet and --edition=2021 --crate-type lib -Znext-solver=globally. Trace the normalization failure through compiler/rustc_trait_selection/src/regions.rs, compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs, and compiler/rustc_borrowck/src/type_check/free_region_relations.rs; done means the example no longer produces an internal compiler error.
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
- Needs clarification
- Newbie friendliness
- 35/100