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

Cleanup: modify RemoveLet to have two separate spans, one for the let and another for the let removal suggestion so that the primary span doesn't point at unnecessary whitespace #133031

Closed
jieyouxu opened this issue Nov 14, 2024 · 1 comment · Fixed by #133060
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Nov 14, 2024

Ideally we'd modify RemoveLet to have two separate spans, one for the let and another for the let removal suggestion so that the primary span doesn't point at unnecessary whitespace. We can address that as follow up.

Originally posted by @estebank in #132996 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 14, 2024
@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 14, 2024
@tyrone-wu
Copy link
Contributor

@rustbot claim

tyrone-wu added a commit to tyrone-wu/rust that referenced this issue Nov 15, 2024
Separate `RemoveLet` span into primary span for `let` and removal
suggestion span for `let `, so that primary span does not include
whitespace.

Fixes: rust-lang#133031

Signed-off-by: Tyrone Wu <wudevelops@gmail.com>
jieyouxu added a commit to jieyouxu/rust that referenced this issue Nov 17, 2024
…n, r=jieyouxu

Trim whitespace in RemoveLet primary span

Separate `RemoveLet` span into primary span for `let` and removal suggestion span for `let `, so that primary span does not include whitespace.

Fixes: rust-lang#133031
@bors bors closed this as completed in dd557c9 Nov 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 17, 2024
Rollup merge of rust-lang#133060 - tyrone-wu:removelet-span-suggestion, r=jieyouxu

Trim whitespace in RemoveLet primary span

Separate `RemoveLet` span into primary span for `let` and removal suggestion span for `let `, so that primary span does not include whitespace.

Fixes: rust-lang#133031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants