Rollup merge of #101790 - TaKO8Ki:do-not-suggest-placeholder-to-const-and-static-without-type, r=compiler-errors
Do not suggest a placeholder to const and static without a type Fixes #101755
This commit is contained in:
commit
4c64c14420
4 changed files with 37 additions and 3 deletions
|
@ -635,6 +635,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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue