Skip to content

Commit c1eae3d

Browse files
committed
make diagnostic function public
1 parent 196f389 commit c1eae3d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

crates/hir-def/src/nameres.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,14 @@ impl DefMap {
511511
self.diagnostics.as_slice()
512512
}
513513

514+
pub fn push_diagnostic(&mut self, d: DefDiagnostic) {
515+
self.diagnostics.push(d)
516+
}
517+
518+
pub fn push_diagnostics(&mut self, i: impl Iterator<Item = DefDiagnostic>) {
519+
self.diagnostics.extend(i)
520+
}
521+
514522
pub fn recursion_limit(&self) -> Option<u32> {
515523
self.recursion_limit
516524
}

crates/hir-def/src/nameres/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl DefDiagnostic {
7373
Self { in_module: container, kind: DefDiagnosticKind::UnresolvedImport { id, index } }
7474
}
7575

76-
pub(super) fn unconfigured_code(
76+
pub fn unconfigured_code(
7777
container: LocalModuleId,
7878
ast: AstId<ast::Item>,
7979
cfg: CfgExpr,

0 commit comments

Comments
 (0)