Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix path qualified auto-importing completions not working with re-exports #18699

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Dec 16, 2024

Prior to this commit we used to generate import paths, then zipped them with the existing qualifier to check if they agree on the path to import. This is brittle when re-exports come into play causing items to have multiple applicable paths that refer to them. This commit instead rewrites this logic by generating the import path for the qualifier, verifying that the rest of the qualifier resolves and then doing a final lookup on that resolution result for the final segment instead.

Fixes #18689

…e-exports

Prior to this commit we used to generate import paths, then zipped them with the existing qualifier to check if they agree on the path to import.
This is brittle when re-exports come into play causing items to have multiple applicable paths that refer to them.
This commit instead rewrites this logic by generating the import path for the qualifier, verifying that the rest of the qualifier resolves and then doing a final lookup on that resolution result for the final segment instead.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 16, 2024
@Veykril Veykril enabled auto-merge December 16, 2024 12:21
@Veykril Veykril added this pull request to the merge queue Dec 16, 2024
Merged via the queue into rust-lang:master with commit dc6af80 Dec 16, 2024
9 checks passed
@Veykril Veykril deleted the push-ltqwwusvtlot branch December 16, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rust-intrinsics are not shown in prefix importing completions
2 participants