about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMax <max@depositlink.com>2024-10-05 13:27:03 -0400
committerMax <max@depositlink.com>2024-10-05 13:27:03 -0400
commit429d46dbb153ff2a3c4608777bf21ea66148aaea (patch)
tree8b2db90b0250e4e4a36b713d9188475ceb5b6db3
parentfe2b453c9747de5b7d47f0545bb4c6c3d0beed02 (diff)
downloadrust-429d46dbb153ff2a3c4608777bf21ea66148aaea.tar.gz
rust-429d46dbb153ff2a3c4608777bf21ea66148aaea.zip
Include description in label details when detail field is marked for resolution
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/to_proto.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/to_proto.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/to_proto.rs
index 375b7428c2d..1fb6535258e 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/to_proto.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp/to_proto.rs
@@ -339,7 +339,7 @@ fn completion_item(
         something_to_resolve = item.detail.is_some();
         None
     } else {
-        item.detail
+        item.detail.clone()
     };
 
     let documentation = if fields_to_resolve.resolve_documentation {
@@ -370,7 +370,7 @@ fn completion_item(
         } else {
             lsp_item.label_details = Some(lsp_types::CompletionItemLabelDetails {
                 detail: item.label_detail.as_ref().map(ToString::to_string),
-                description: lsp_item.detail.clone(),
+                description: item.detail,
             });
         }
     } else if let Some(label_detail) = item.label_detail {