Skip to content

Commit 25d5653

Browse files
committed
Implement IntoDiagArg for hir Namespace
1 parent cb93c24 commit 25d5653

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
@@ -258,6 +258,12 @@ impl IntoDiagArg for ClosureKind {
258258
}
259259
}
260260

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

0 commit comments

Comments
 (0)