Closed
Fix ICE with generic associated type lifetime substitution#1721
Conversation
…eters (issue #1718) Co-authored-by: nilehmann <2400776+nilehmann@users.noreply.github.com>
Copilot
AI
changed the title
Fix ICE: assertion
Fix ICE: assertion Aug 13, 2026
left == right failed for FnPtr with lifetime parameters (#1718)left == right failed for FnPtr with lifetime parameters
Copilot created this pull request from a session on behalf of
nilehmann
August 13, 2026 22:55
View session
When normalizing a projection with a GAT that has its own generic parameters (e.g., `type Tok<'a> = &'a L`), the confirm_candidate function was only passing the impl-level generic args to instantiate the associated type definition. The GAT's own generic args from the obligation (e.g., the lifetime `'a`) were not included, causing a "region parameter out of range" ICE. Fix by appending the GAT's own generic args from the obligation to the impl-level substitution args before instantiation. Co-authored-by: nilehmann <2400776+nilehmann@users.noreply.github.com>
Co-authored-by: nilehmann <2400776+nilehmann@users.noreply.github.com>
left == right failed for FnPtr with lifetime parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1716
Summary
Flux ICEs with
region parameter out of rangewhen resolving a generic associated type (GAT) with a lifetime parameter, e.g.: