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: assists panic when trying to edit usage inside macro #15810

Merged
merged 4 commits into from Jan 2, 2024

Conversation

rmehri01
Copy link
Contributor

When we try to make a syntax node mutable inside a macro to edit it, it seems like the edits aren't properly reflected and will cause a panic when trying to make another syntax node mutable.

This PR changes bool_to_enum and promote_local_to_const to use the original syntax range instead to edit the original file instead of the macro file. I'm not sure how to do it for inline_call with the example I mentioned in the issue, so I've left it out for now.

Fixes #15807

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

bors commented Dec 5, 2023

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

@Veykril
Copy link
Member

Veykril commented Jan 2, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 2, 2024

📌 Commit b105e9b has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 2, 2024

⌛ Testing commit b105e9b with merge e461efb...

@bors
Copy link
Collaborator

bors commented Jan 2, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing e461efb 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.

"request handler panicked" error on "Convert boolean to enum" assist
4 participants