Skip to content

Commit 934078d

Browse files
committed
Implement IntoDiagArg for hir Namespace
1 parent 97cf033 commit 934078d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_errors/src/diagnostic_impls.rs

+6
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ impl IntoDiagArg for type_ir::ClosureKind {
257257
}
258258
}
259259

260+
impl IntoDiagArg for hir::def::Namespace {
261+
fn into_diag_arg(self) -> DiagArgValue {
262+
DiagArgValue::Str(Cow::Borrowed(self.descr()))
263+
}
264+
}
265+
260266
#[derive(Clone)]
261267
pub struct DiagSymbolList(Vec<Symbol>);
262268

0 commit comments

Comments
 (0)