rust/compiler/rustc_attr/src
Nicholas Nethercote b7d58eef4b Rewrite the untranslatable_diagnostic lint.
Currently it only checks calls to functions marked with
`#[rustc_lint_diagnostics]`. This commit changes it to check calls to
any function with an `impl Into<{D,Subd}iagMessage>` parameter. This
greatly improves its coverage and doesn't rely on people remembering to
add `#[rustc_lint_diagnostics]`.

The commit also adds `#[allow(rustc::untranslatable_diagnostic)`]
attributes to places that need it that are caught by the improved lint.
These places that might be easy to convert to translatable diagnostics.

Finally, it also:
- Expands and corrects some comments.
- Does some minor formatting improvements.
- Adds missing `DecorateLint` cases to
  `tests/ui-fulldeps/internal-lints/diagnostics.rs`.
2024-03-06 14:19:01 +11:00
..
builtin.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
lib.rs Use generic NonZero internally. 2024-02-15 08:09:42 +01:00
session_diagnostics.rs Fix misleading message when using a named constant as a struct alignment/pack 2024-03-02 23:15:39 +08:00