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

Easier readability for needless_late_init message #8779

Merged
merged 2 commits into from
May 3, 2022

Conversation

spiral-ladder
Copy link
Contributor

@spiral-ladder spiral-ladder commented May 3, 2022

Closes #8530

Updated the lint to use a MultiSpan, showing where the let statement was first used and where the initialisation statement was done, as in the format described, for easier readability.

Was wondering why, when pushing the span label for the initialisation statement, that sometimes the prior statement above the initialisation statement gets pulled into the output as well - any insight is appreciated!


changelog: [needless_late_init]: Now shows the let statement where it was first initialized

@rust-highfive
Copy link

r? @llogiq

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 3, 2022
@llogiq
Copy link
Contributor

llogiq commented May 3, 2022

Thank you! @bors r+

@bors
Copy link
Contributor

bors commented May 3, 2022

📌 Commit 7017eb1 has been approved by llogiq

bors added a commit that referenced this pull request May 3, 2022
Easier readability for `needless_late_init` message

Closes #8530

Updated the lint to use a `MultiSpan`, showing where the `let` statement was first used and where the initialisation statement was done, as in the format described, for easier readability.

Was wondering why, when pushing the span label for the initialisation statement, that sometimes the prior statement above the initialisation statement gets pulled into the output as well - any insight is appreciated!
@bors
Copy link
Contributor

bors commented May 3, 2022

⌛ Testing commit 7017eb1 with merge 90b6330...

@bors
Copy link
Contributor

bors commented May 3, 2022

💔 Test failed - checks-action_test

@xFrednet
Copy link
Member

xFrednet commented May 3, 2022

The changelog entry was missing from the PR description. I've added it, now the CI should pass.

@bors retry

@bors
Copy link
Contributor

bors commented May 3, 2022

⌛ Testing commit 7017eb1 with merge a10fe90...

@bors
Copy link
Contributor

bors commented May 3, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing a10fe90 to master...

@bors bors merged commit a10fe90 into rust-lang:master May 3, 2022
@spiral-ladder spiral-ladder deleted the easier-needless-late-init branch May 4, 2022 00:03
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.

needless_late_init message could be easier to read
5 participants