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 eager token mapping panics #15248

Merged
merged 2 commits into from Jul 13, 2023
Merged

Fix eager token mapping panics #15248

merged 2 commits into from Jul 13, 2023

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Jul 10, 2023

No description provided.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 10, 2023
@bors
Copy link
Collaborator

bors commented Jul 10, 2023

☔ The latest upstream changes (presumably #15251) made this pull request unmergeable. Please resolve the merge conflicts.

@Veykril Veykril force-pushed the eager branch 2 times, most recently from dc2aecd to e0a2cb6 Compare July 13, 2023 07:20
@Veykril Veykril marked this pull request as ready for review July 13, 2023 07:36
@Veykril
Copy link
Member Author

Veykril commented Jul 13, 2023

Alright, I managed to make token mapping work again. There is still a problem here though, any macro calls in eager macro calls won't resolve properly, as they do not actually exist in any graspable expansion. That is in format_args!("{}", vec![]) the vec! call won't resolve in the IDE layer as it does not exist in the format_args output (as it was already expanded). We'll need to rewrite the eager expansion a bit by storing the expanded input in the db somewhere and then handle that as any other macro expansion. I don't have the time to do that right now though.

I also didn't check the perf impact of this PR but I hope its not too bad. (it will most likely increase mem usage a bit)
@bors r+

@bors
Copy link
Collaborator

bors commented Jul 13, 2023

📌 Commit 6a7b905 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 13, 2023

⌛ Testing commit 6a7b905 with merge 132ba2c...

@bors
Copy link
Collaborator

bors commented Jul 13, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 132ba2c to master...

@bors bors merged commit 132ba2c into rust-lang:master Jul 13, 2023
10 checks passed
@Veykril Veykril deleted the eager branch July 30, 2023 10:43
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