]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #98420 - davidtwco:translation-lint-fixes-and-more-migration, r=compi...
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Tue, 28 Jun 2022 10:00:04 +0000 (15:30 +0530)
committerGitHub <noreply@github.com>
Tue, 28 Jun 2022 10:00:04 +0000 (15:30 +0530)
translation: lint fix + more migration

- 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``


Trivial merge