diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/name.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/name.rs b/crates/ra_hir/src/name.rs index 283f37845..331da6027 100644 --- a/crates/ra_hir/src/name.rs +++ b/crates/ra_hir/src/name.rs | |||
@@ -46,6 +46,10 @@ impl Name { | |||
46 | Name::new(idx.to_string().into()) | 46 | Name::new(idx.to_string().into()) |
47 | } | 47 | } |
48 | 48 | ||
49 | pub fn to_smolstr(&self) -> SmolStr { | ||
50 | self.text.clone() | ||
51 | } | ||
52 | |||
49 | pub(crate) fn as_known_name(&self) -> Option<KnownName> { | 53 | pub(crate) fn as_known_name(&self) -> Option<KnownName> { |
50 | let name = match self.text.as_str() { | 54 | let name = match self.text.as_str() { |
51 | "isize" => KnownName::Isize, | 55 | "isize" => KnownName::Isize, |