aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/attr.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs
index 385ba8c80..3886b6c04 100644
--- a/crates/hir_def/src/attr.rs
+++ b/crates/hir_def/src/attr.rs
@@ -36,6 +36,10 @@ use crate::{
36pub struct Documentation(String); 36pub struct Documentation(String);
37 37
38impl Documentation { 38impl Documentation {
39 pub fn new(s: String) -> Self {
40 Documentation(s)
41 }
42
39 pub fn as_str(&self) -> &str { 43 pub fn as_str(&self) -> &str {
40 &self.0 44 &self.0
41 } 45 }