diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-09-17 15:31:08 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-17 15:31:08 +0530 |
| commit | 4c64c144202f6367755c476048aaaf0741af6086 (patch) | |
| tree | 01438396b2995a2c55e63673d3b4ded57e17965f /compiler/rustc_errors | |
| parent | cbd561d41f61201decae3adb45fe827d30aa96ec (diff) | |
| parent | 527292a1a697c8831fc1ec01b1047ecebc10f809 (diff) | |
| download | rust-4c64c144202f6367755c476048aaaf0741af6086.tar.gz rust-4c64c144202f6367755c476048aaaf0741af6086.zip | |
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
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index c3e78209612..6f969bfcc53 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -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() |
