]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rust-analyzer/crates/ide-completion/src/render/union_literal.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / src / tools / rust-analyzer / crates / ide-completion / src / render / union_literal.rs
index 54e97dd57ba82280074c27635f675d57fef6fa7c..1b09ad1731f9de498e71bff2dae0cda7e6f1e191 100644 (file)
@@ -24,7 +24,7 @@ pub(crate) fn render_union_literal(
         Some(p) => (p.unescaped().to_string(), p.to_string()),
         None => (name.unescaped().to_string(), name.to_string()),
     };
-    let label = format_literal_label(&name.to_smol_str(), StructKind::Record);
+    let label = format_literal_label(&name.to_smol_str(), StructKind::Record, ctx.snippet_cap());
     let lookup = format_literal_lookup(&name.to_smol_str(), StructKind::Record);
     let mut item = CompletionItem::new(
         CompletionItemKind::SymbolKind(SymbolKind::Union),
@@ -68,7 +68,7 @@ pub(crate) fn render_union_literal(
 
     item.set_documentation(ctx.docs(un))
         .set_deprecated(ctx.is_deprecated(un))
-        .detail(&detail)
+        .detail(detail)
         .set_relevance(ctx.completion_relevance());
 
     match ctx.snippet_cap() {