diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-09-16 11:24:14 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-09-16 11:24:14 +0900 |
| commit | 527292a1a697c8831fc1ec01b1047ecebc10f809 (patch) | |
| tree | bf0afe4c72b4c7fd2684d2818063472f1589c5bc /compiler/rustc_errors | |
| parent | b44197abb0b3ffe4908892e1e08ab1cd721ff3b9 (diff) | |
| download | rust-527292a1a697c8831fc1ec01b1047ecebc10f809.tar.gz rust-527292a1a697c8831fc1ec01b1047ecebc10f809.zip | |
do not suggest a placeholder to const and static without a type
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 68abdd0bad1..d89b3da049c 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -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() |
