Skip to content

Commit 9812c4d

Browse files
authored
Merge pull request #18735 from Veykril/push-rpuxqrzrzvsw
fix: Set `result_id` for `RelatedFullDocumentDiagnosticReport` everywhere
2 parents 0c409e5 + c2e2360 commit 9812c4d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/dispatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl RequestDispatcher<'_> {
126126

127127
/// Dispatches a non-latency-sensitive request onto the thread pool. When the VFS is marked not
128128
/// ready this will return a `default` constructed [`R::Result`].
129-
pub(crate) fn on_with<R>(
129+
pub(crate) fn on_with_vfs_default<R>(
130130
&mut self,
131131
f: fn(GlobalStateSnapshot, R::Params) -> anyhow::Result<R::Result>,
132132
default: impl FnOnce() -> R::Result,

src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,12 +1095,12 @@ impl GlobalState {
10951095
.on_latency_sensitive::<NO_RETRY, lsp_request::SemanticTokensRangeRequest>(handlers::handle_semantic_tokens_range)
10961096
// FIXME: Some of these NO_RETRY could be retries if the file they are interested didn't change.
10971097
// All other request handlers
1098-
.on_with::<lsp_request::DocumentDiagnosticRequest>(handlers::handle_document_diagnostics, || lsp_types::DocumentDiagnosticReportResult::Report(
1098+
.on_with_vfs_default::<lsp_request::DocumentDiagnosticRequest>(handlers::handle_document_diagnostics, || lsp_types::DocumentDiagnosticReportResult::Report(
10991099
lsp_types::DocumentDiagnosticReport::Full(
11001100
lsp_types::RelatedFullDocumentDiagnosticReport {
11011101
related_documents: None,
11021102
full_document_diagnostic_report: lsp_types::FullDocumentDiagnosticReport {
1103-
result_id: None,
1103+
result_id: Some("rust-analyzer".to_owned()),
11041104
items: vec![],
11051105
},
11061106
},

0 commit comments

Comments
 (0)