diff options
Diffstat (limited to 'crates/hir-expand/src/mod_path.rs')
| -rw-r--r-- | crates/hir-expand/src/mod_path.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir-expand/src/mod_path.rs b/crates/hir-expand/src/mod_path.rs index 30b8c189f52..4618dcec70b 100644 --- a/crates/hir-expand/src/mod_path.rs +++ b/crates/hir-expand/src/mod_path.rs @@ -96,6 +96,10 @@ impl ModPath { self.kind == PathKind::Super(0) && self.segments.is_empty() } + pub fn is_pub_crate(&self) -> bool { + self.kind == PathKind::Crate && self.segments.is_empty() + } + #[allow(non_snake_case)] pub fn is_Self(&self) -> bool { self.kind == PathKind::Plain |
