Skip to content

translation: lint fix + more migration#98420

Merged
bors merged 7 commits intorust-lang:masterfrom
davidtwco:translation-lint-fixes-and-more-migration
Jun 28, 2022
Merged

translation: lint fix + more migration#98420
bors merged 7 commits intorust-lang:masterfrom
davidtwco:translation-lint-fixes-and-more-migration

Conversation

@davidtwco
Copy link
Member

  • Unfortunately, the diagnostic lints are very broken and trigger much more often than they should. This PR corrects the conditional which checks if the function call being made is to a diagnostic function so that it returns in every intended case.
  • The rustc_lint_diagnostics attribute is used by the diagnostic translation/struct migration lints to identify calls where non-translatable diagnostics or diagnostics outwith impls are being created. Any function used in creating a diagnostic should be annotated with this attribute so this PR adds the attribute to many more functions.
  • Port the diagnostics from the rustc_privacy crate and enable the lints for that crate.

r? @compiler-errors

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants