]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/rust-analyzer/crates/rust-analyzer/src/to_proto.rs
Rollup merge of #102345 - chenyukang:fix-102182-impl-trait, r=estebank
[rust.git] / src / tools / rust-analyzer / crates / rust-analyzer / src / to_proto.rs
index e083b9d0e33789ae448a42bd698dcee79a46f6c8..1de801e23e5c861c6e80e9dab1231332e4244e72 100644 (file)
@@ -83,10 +83,11 @@ pub(crate) fn structure_node_kind(kind: StructureNodeKind) -> lsp_types::SymbolK
 
 pub(crate) fn document_highlight_kind(
     category: ReferenceCategory,
-) -> lsp_types::DocumentHighlightKind {
+) -> Option<lsp_types::DocumentHighlightKind> {
     match category {
-        ReferenceCategory::Read => lsp_types::DocumentHighlightKind::READ,
-        ReferenceCategory::Write => lsp_types::DocumentHighlightKind::WRITE,
+        ReferenceCategory::Read => Some(lsp_types::DocumentHighlightKind::READ),
+        ReferenceCategory::Write => Some(lsp_types::DocumentHighlightKind::WRITE),
+        ReferenceCategory::Import => None,
     }
 }