about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-05-22 10:08:32 +0200
committerRalf Jung <post@ralfj.de>2024-05-22 10:08:32 +0200
commita1bc030b70ca9f4efdc358af222c664c3ec0b148 (patch)
tree3994ab53ef7dd1da291c7d1835dc3f7b78d0a7a4 /compiler/rustc_errors
parent24138f003472051e1ecdc41c27748a4d0f2e511d (diff)
parentde644626c3789e62d24bb90873bdc1b41b5f6db2 (diff)
downloadrust-a1bc030b70ca9f4efdc358af222c664c3ec0b148.tar.gz
rust-a1bc030b70ca9f4efdc358af222c664c3ec0b148.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_errors')
-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>);