Skip to content

Commit 3b979ae

Browse files
committed
Implement IntoDiagArg for hir Namespace
1 parent 5065123 commit 3b979ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_errors/src/diagnostic_impls.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ impl IntoDiagArg for ClosureKind {
282282
}
283283
}
284284

285+
impl IntoDiagArg for hir::def::Namespace {
286+
fn into_diag_arg(self) -> DiagArgValue {
287+
DiagArgValue::Str(Cow::Borrowed(self.descr()))
288+
}
289+
}
290+
285291
#[derive(Clone)]
286292
pub struct DiagSymbolList(Vec<Symbol>);
287293

0 commit comments

Comments
 (0)