rust/compiler/rustc_metadata/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
..
rmeta Auto merge of #120675 - oli-obk:intrinsics3.0, r=pnkfelix 2024-03-05 00:13:01 +00:00
creader.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
dependency_format.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
errors.rs Rename DiagnosticBuilder as Diag. 2024-02-28 08:55:35 +11:00
foreign_modules.rs Do not fetch HIR in native_libs. 2023-07-17 07:37:03 +00:00
fs.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
lib.rs Unify dylib loading between proc macros and codegen backends 2024-02-21 11:17:07 +00:00
locator.rs Rename DiagnosticArg{,Map,Name,Value} as DiagArg{,Map,Name,Value}. 2024-02-28 08:55:37 +11:00
native_libs.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00