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

internal: Record import origins in ItemScope and PerNS #15472

Merged
merged 3 commits into from Aug 17, 2023

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Aug 17, 2023

This records the import items definitions come from in the module scope (as well as what an import resolves to in an ItemScope). It does ignore glob imports as thats a lot more work for little to no gain, glob imports act as if the importing items are "inlined" into the scope which suffices for almost all use cases I believe (to my knowledge, attributes on them have little effect).

There is still a lot of work needed to make this available to the IDE layer, but this lays out the ground work for havin IDE layer support.

cc #14079

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 17, 2023
@Veykril Veykril marked this pull request as ready for review August 17, 2023 08:56
@Veykril Veykril changed the title WIP: Record import origins in ItemScope and PerNS internal: Record import origins in ItemScope and PerNS Aug 17, 2023
@Veykril
Copy link
Member Author

Veykril commented Aug 17, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

📌 Commit a17d73a has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

⌛ Testing commit a17d73a with merge 49716e6...

@bors
Copy link
Collaborator

bors commented Aug 17, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 49716e6 to master...

@bors bors merged commit 49716e6 into rust-lang:master Aug 17, 2023
10 checks passed
@Veykril Veykril deleted the import-ide-support branch August 17, 2023 10:17
bors added a commit that referenced this pull request Aug 17, 2023
fix: Fix auto-import (and completions) importing `#[doc(hidden)]` items

Fixes #9197 and #9911

Turns out while #15472 didn't give access to the import stuff to the IDE layer, these can be fixed already since they use the import map which works in the hir-def crate 🎉
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.

None yet

3 participants