fix: issue 22826 - #23256
Merged
Merged
fix: issue 22826 #23256
Conversation
Contributor
Author
ChayimFriedman2
requested changes
Aug 30, 2026
| _ => None, | ||
| }) | ||
| .map(|container| GenericParams::of(db, container).len()) | ||
| .unwrap_or(0); |
Contributor
There was a problem hiding this comment.
This is not good enough because of late-bound lifetimes.
I think the best solution is to avoid computing the parent length at all, instead directly chain
self.subst.types().zip(container_type_params.into_iter().flatten().chain(type_params)).filter_map(|(ty, name)| {
Some((
name?.symbol().clone(),
Type { ty: EarlyBinder::bind(ty), owner: self.owner },
))
})
Contributor
Author
There was a problem hiding this comment.
did a similar approach in the new commit
ChayimFriedman2
approved these changes
Aug 30, 2026
j-ricardo-goncalves
force-pushed
the
master
branch
from
August 30, 2026 18:02
c5d06d8 to
6c0ec6a
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
squashed |
This comment has been minimized.
This comment has been minimized.
Collaborator
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
j-ricardo-goncalves
force-pushed
the
master
branch
from
August 30, 2026 18:30
42d9a3a to
4d55562
Compare
Contributor
Author
|
I think its done now, tried to clean up the git thing. |
ChayimFriedman2
approved these changes
Aug 30, 2026
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.
fixes issue by using a different approach on parent_len in crate/hir/src/lib.rs
added coverage test
seems to solve the issue while doing the least possible changes
Fixes #22826.