1
Fork 0

do not suggest a placeholder to const and static without a type

This commit is contained in:
Takayuki Maeda 2022-09-16 11:24:14 +09:00
parent b44197abb0
commit 527292a1a6
4 changed files with 37 additions and 3 deletions

View file

@ -637,6 +637,10 @@ impl Handler {
inner.steal((span, key)).map(|diag| DiagnosticBuilder::new_diagnostic(self, diag))
}
pub fn has_stashed_diagnostic(&self, span: Span, key: StashKey) -> bool {
self.inner.borrow().stashed_diagnostics.get(&(span, key)).is_some()
}
/// Emit all stashed diagnostics.
pub fn emit_stashed_diagnostics(&self) -> Option<ErrorGuaranteed> {
self.inner.borrow_mut().emit_stashed_diagnostics()