Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/name.rs')
| -rw-r--r-- | crates/hir-expand/src/name.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/hir-expand/src/name.rs b/crates/hir-expand/src/name.rs index 3ddc305f95..b511bc3c15 100644 --- a/crates/hir-expand/src/name.rs +++ b/crates/hir-expand/src/name.rs @@ -201,10 +201,15 @@ impl Name { #[inline] pub fn is_generated(&self) -> bool { - self.as_str().starts_with("<ra@gennew>") + is_generated(self.as_str()) } } +#[inline] +pub fn is_generated(name: &str) -> bool { + name.starts_with("<ra@gennew>") +} + struct Display<'a> { name: &'a Name, edition: Edition, |