-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
ICE: could not replace AliasTerm on stable when a dyn Fn*-supertrait object's signature uses a const-length array #159457
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
Activity
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Note
Authors' note: this report was generated with Claude, that quickly reduced a 4-line repro from a massive many-crate repository. It is a regression to us in the 1.96 -> 1.97.0/.1 upgrade. It compiles fine under
rustc +1.96.0 --crate-type lib ice.rs.Code
Compiles with
rustc --crate-type lib ice.rs(no flags needed — happens on the default solver on stable, because vtable-slot resolution invokes the next solver internally):Bisecting the ingredients:
const([u32; N]). ReplacingNwith the literal6compiles fine.dyn CustomPassFnis actually called (f(b)), forcing vtable-slot resolution.This looks like the same family as #155761 and #155035, but those use associated-type / nested-
dyntriggers and require-Znext-solverexplicitly. This variant reproduces on stable with the default solver and no flags, triggered by aconst-length array in theFnsignature.Meta
rustc --version --verbose:Also reproduces on editions 2015, 2021, and 2024.
Error output
Backtrace
Query stack: