mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Auto merge of #15577 - Veykril:clear-native-diags, r=Veykril
Clear native diagnostics on file closing Fixes https://github.com/rust-lang/rust-analyzer/issues/15562
This commit is contained in:
commit
ea71a49c8e
@ -113,6 +113,10 @@ pub(crate) fn handle_did_close_text_document(
|
||||
tracing::error!("orphan DidCloseTextDocument: {}", path);
|
||||
}
|
||||
|
||||
if let Some(file_id) = state.vfs.read().0.file_id(&path) {
|
||||
state.diagnostics.clear_native_for(file_id);
|
||||
}
|
||||
|
||||
state.semantic_tokens_cache.lock().remove(¶ms.text_document.uri);
|
||||
|
||||
if let Some(path) = path.as_path() {
|
||||
|
Loading…
Reference in New Issue
Block a user