summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-14 10:35:31 +0200
committerGitHub <noreply@github.com>2022-06-14 10:35:31 +0200
commitd8333a7b59c7b1308955bbd5a37ceabf86ec7dea (patch)
tree6427dd859358312a704cb5d46591c259360da9e5 /compiler/rustc_span/src
parent9e5c5c57e97098b4d1e04a1215628ff6eb54986b (diff)
parent5ba81faba632883ee69be0d216959a5ef3bba030 (diff)
downloadrust-d8333a7b59c7b1308955bbd5a37ceabf86ec7dea.tar.gz
rust-d8333a7b59c7b1308955bbd5a37ceabf86ec7dea.zip
Rollup merge of #97948 - davidtwco:diagnostic-translation-lints, r=oli-obk
lint: add diagnostic translation migration lints

Introduce allow-by-default lints for checking whether diagnostics are written in
`SessionDiagnostic` or `AddSubdiagnostic` impls and whether diagnostics are translatable. These lints can be denied for modules once they are fully migrated to impls and translation.

These lints are intended to be temporary - once all diagnostics have been changed then we can just change the APIs we have and that will enforce these constraints thereafter.

r? `````@oli-obk`````
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 7b0fa65e808..6547ec493c8 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -125,6 +125,7 @@ symbols! {
     Symbols {
         AcqRel,
         Acquire,
+        AddSubdiagnostic,
         Alignment,
         Any,
         Arc,
@@ -169,6 +170,7 @@ symbols! {
         Decoder,
         Default,
         Deref,
+        DiagnosticMessage,
         DirBuilder,
         Display,
         DoubleEndedIterator,
@@ -253,11 +255,13 @@ symbols! {
         RustcEncodable,
         Send,
         SeqCst,
+        SessionDiagnostic,
         SliceIndex,
         Some,
         String,
         StructuralEq,
         StructuralPartialEq,
+        SubdiagnosticMessage,
         Sync,
         Target,
         ToOwned,
@@ -1205,6 +1209,7 @@ symbols! {
         rustc_layout_scalar_valid_range_end,
         rustc_layout_scalar_valid_range_start,
         rustc_legacy_const_generics,
+        rustc_lint_diagnostics,
         rustc_lint_query_instability,
         rustc_macro_transparency,
         rustc_main,