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: Correctly set and mark the proc-macro spans #16175

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Dec 21, 2023

This slows down analysis by 2-3s on self for me unfortunately (~2.5% slowdown)

Noisy diff due to two simple refactoring in the first 2 commits. Relevant changes are 7d762d1 and 1e1113c which introduce def site spans and correct marking for proc-macros respectively.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2023
Comment on lines 338 to 340
def_site: db
.span_map(loc.id.file_id())
.span_for_range(db.ast_id_map(loc.id.file_id()).get(makro.ast_id).text_range()),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slow down comes from this, which I assume misses the cache for the span maps in some occurrences unfortunately

@Veykril
Copy link
Member Author

Veykril commented Dec 21, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Dec 21, 2023

📌 Commit 1e1113c has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 21, 2023

⌛ Testing commit 1e1113c with merge 9ee71b4...

@bors
Copy link
Contributor

bors commented Dec 21, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 9ee71b4 to master...

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.

3 participants