From 752485083151de5cb6056289db74ffee6407a4ff Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 4 Jun 2021 20:25:16 +0200 Subject: Render documentation for derive completion --- crates/hir_def/src/attr.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/hir_def/src') diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs index 385ba8c80..b7e72b790 100644 --- a/crates/hir_def/src/attr.rs +++ b/crates/hir_def/src/attr.rs @@ -36,6 +36,10 @@ use crate::{ pub struct Documentation(String); impl Documentation { + pub fn new(s: impl Into) -> Self { + Documentation(s.into()) + } + pub fn as_str(&self) -> &str { &self.0 } -- cgit v1.2.3