Improve diagnostic-related lints: untranslatable_diagnostic & diagnostic_outside_of_impl by GrigorenkoPV · Pull Request #128941 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation3 Commits3 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

GrigorenkoPV

Summary:

@rustbot label D-imprecise-spans A-translation

@GrigorenkoPV

@GrigorenkoPV

and not the function/method call

@GrigorenkoPV

  1. Decouple them.
  2. Make logic around diagnostic_outside_of_impl's early exits simpler.
  3. Make untranslatable_diagnostic run one loop instead of two and not allocate an intermediate vec.
  4. Overall, reduce the amount of code executed when the lints do not end up firing.

@rustbot

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

A-translation

Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic

D-imprecise-spans

Diagnostics: spans don't point to exactly the erroneous code

labels

Aug 10, 2024

davidtwco

@davidtwco

@bors

📌 Commit e94a4ee has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Aug 21, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 21, 2024

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 21, 2024

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Aug 22, 2024

@jieyouxu

…ints, r=davidtwco

Improve diagnostic-related lints: untranslatable_diagnostic & diagnostic_outside_of_impl

Summary:

@rustbot label D-imprecise-spans A-translation

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 22, 2024

@bors

…iaskrgr

Rollup of 9 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Aug 22, 2024

@rust-timer

Rollup merge of rust-lang#128941 - GrigorenkoPV:internal-diagnostic-lints, r=davidtwco

Improve diagnostic-related lints: untranslatable_diagnostic & diagnostic_outside_of_impl

Summary:

@rustbot label D-imprecise-spans A-translation

Labels

A-translation

Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic

D-imprecise-spans

Diagnostics: spans don't point to exactly the erroneous code

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.