Use special DefIds for aliases#155981
Open
ChayimFriedman2 wants to merge 1 commit intorust-lang:mainfrom
Open
Conversation
lcnr
reviewed
Apr 30, 2026
lcnr
reviewed
Apr 30, 2026
lcnr
reviewed
Apr 30, 2026
lcnr
reviewed
Apr 30, 2026
lcnr
reviewed
Apr 30, 2026
Like we do for other things for better experience in rust-analyzer. It's possible now that the `AliasTyKind` and `AliasTermKind` contains the DefId. It does require a few `try_into().unwrap()`s since in the solver's `consider_X_candidate()` only get an untyped `DefId`. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf.
81000a1 to
5e8cb76
Compare
Collaborator
|
This PR was rebased onto a different main 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. |
Contributor
Author
|
@bors try @rust-timer queue |
Collaborator
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
Contributor
|
⌛ Trying commit 5e8cb76 with merge ce54c3a… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/25299606130 |
rust-bors Bot
pushed a commit
that referenced
this pull request
May 4, 2026
Use special DefIds for aliases
Contributor
Author
|
@bors cancel |
Contributor
|
❗ There is currently no auto build in progress on this PR. Hint: There is a pending try build on this PR. Maybe you meant to cancel it? You can do that using |
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.
View all comments
Renewal of #155025, after
AliasTermKindwas also ported.Like we do for other things for better experience in rust-analyzer.
It's possible now that the
AliasTyKindandAliasTermKindcontains the DefId.It does require a few
try_into().unwrap()s since in the solver'sconsider_X_candidate()only get an untypedDefId. It's possible to reduce that considerably if we'd pass them the typed def id as a parameter, but I don't know what will be the impact on perf. Should I try to pursue that?r? lcnr