rust/compiler/rustc_expand/src
Matthias Krüger efe9deace8
Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco
Rework `untranslatable_diagnostic` lint

Currently it only checks calls to functions marked with `#[rustc_lint_diagnostics]`. This PR changes it to check calls to any function with an `impl Into<{D,Subd}iagnosticMessage>` parameter. This greatly improves its coverage and doesn't rely on people remembering to add `#[rustc_lint_diagnostics]`. It also lets us add `#[rustc_lint_diagnostics]` to a number of functions that don't have an `impl Into<{D,Subd}iagnosticMessage>`, such as `Diag::span`.

r? ``@davidtwco``
2024-03-06 22:02:46 +01:00
..
mbe Rename BuiltinLintDiagnostics as BuiltinLintDiag. 2024-03-05 12:15:10 +11:00
mut_visit rustc_ast: Turn MutVisitor::token_visiting_enabled into a constant 2021-10-18 00:23:24 +03:00
parse Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
tokenstream Add newtype for raw idents 2024-02-20 13:13:29 +00:00
base.rs Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
build.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
config.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
errors.rs Rollup merge of #121288 - tshepang:make-expand-translatable, r=michaelwoerister 2024-02-21 08:55:56 +00:00
expand.rs Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
lib.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
mbe.rs Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
module.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
placeholders.rs Give VariantData::Struct named fields, to clairfy recovered. 2023-12-20 00:07:34 +00:00
proc_macro_server.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
proc_macro.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
tests.rs Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00