about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-21 21:36:09 +0000
committerbors <bors@rust-lang.org>2024-05-21 21:36:09 +0000
commit791adf759cc065316f054961875052d5bc03e16c (patch)
tree17144e778b88c1cc27d2d9b605278b6fe1c9473c /compiler/rustc_errors/src
parent39e02f1bd1e53d009da382654139f7c0639172a8 (diff)
parent98dd6c7e8f33966221216200182175672294a719 (diff)
downloadrust-791adf759cc065316f054961875052d5bc03e16c.tar.gz
rust-791adf759cc065316f054961875052d5bc03e16c.zip
Auto merge of #124417 - Xiretza:translate-early-lints, r=fmease
Make early lints translatable

<del>Requires https://github.com/projectfluent/fluent-rs/pull/353.</del> https://github.com/rust-lang/rust/commit/5134a04eaa32b168cf5998a6ec13199356e2e017

r? diagnostics
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic_impls.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs
index 4bf7dccab92..662c8a7b8be 100644
--- a/compiler/rustc_errors/src/diagnostic_impls.rs
+++ b/compiler/rustc_errors/src/diagnostic_impls.rs
@@ -282,6 +282,12 @@ impl IntoDiagArg for ClosureKind {
     }
 }
 
+impl IntoDiagArg for hir::def::Namespace {
+    fn into_diag_arg(self) -> DiagArgValue {
+        DiagArgValue::Str(Cow::Borrowed(self.descr()))
+    }
+}
+
 #[derive(Clone)]
 pub struct DiagSymbolList(Vec<Symbol>);