diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2024-12-22 10:03:25 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-22 10:03:25 +0000 |
| commit | 9812c4de0778de9697d0a6759fc042f719f79e0c (patch) | |
| tree | 1b4cce17457b16d2ad279f32b9c94feae9e8434c /src | |
| parent | 0c409e5a693da3767a2f27c769665afcf5ab59ad (diff) | |
| parent | c2e2360d9bd0df6425ae2c3f90b537d7ae39057c (diff) | |
Merge pull request #18735 from Veykril/push-rpuxqrzrzvsw
fix: Set `result_id` for `RelatedFullDocumentDiagnosticReport` everywhere
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs | 2 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs index 03759b036b4..2aa4ffbe1dc 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs @@ -126,7 +126,7 @@ impl RequestDispatcher<'_> { /// Dispatches a non-latency-sensitive request onto the thread pool. When the VFS is marked not /// ready this will return a `default` constructed [`R::Result`]. - pub(crate) fn on_with<R>( + pub(crate) fn on_with_vfs_default<R>( &mut self, f: fn(GlobalStateSnapshot, R::Params) -> anyhow::Result<R::Result>, default: impl FnOnce() -> R::Result, diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs index 405860c5529..343910b52be 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs @@ -1095,12 +1095,12 @@ impl GlobalState { .on_latency_sensitive::<NO_RETRY, lsp_request::SemanticTokensRangeRequest>(handlers::handle_semantic_tokens_range) // FIXME: Some of these NO_RETRY could be retries if the file they are interested didn't change. // All other request handlers - .on_with::<lsp_request::DocumentDiagnosticRequest>(handlers::handle_document_diagnostics, || lsp_types::DocumentDiagnosticReportResult::Report( + .on_with_vfs_default::<lsp_request::DocumentDiagnosticRequest>(handlers::handle_document_diagnostics, || lsp_types::DocumentDiagnosticReportResult::Report( lsp_types::DocumentDiagnosticReport::Full( lsp_types::RelatedFullDocumentDiagnosticReport { related_documents: None, full_document_diagnostic_report: lsp_types::FullDocumentDiagnosticReport { - result_id: None, + result_id: Some("rust-analyzer".to_owned()), items: vec![], }, }, |
