about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2024-04-17 20:21:38 +0000
committerXiretza <xiretza@xiretza.xyz>2024-05-21 20:11:42 +0000
commit3b979aebfe98099d2c2c6d320e364e9b7a50a8ac (patch)
treecc509ecb4e9b1356488324c9bf891403161e3e40 /compiler/rustc_errors/src
parent506512391b1a75ae450d36c9420978402a91abcc (diff)
downloadrust-3b979aebfe98099d2c2c6d320e364e9b7a50a8ac.tar.gz
rust-3b979aebfe98099d2c2c6d320e364e9b7a50a8ac.zip
Implement IntoDiagArg for hir Namespace
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>);