aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/path.rs')
-rw-r--r--crates/ra_hir/src/path.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_hir/src/path.rs b/crates/ra_hir/src/path.rs
index 5449cddfd..1b129c752 100644
--- a/crates/ra_hir/src/path.rs
+++ b/crates/ra_hir/src/path.rs
@@ -126,6 +126,10 @@ impl Path {
126 } 126 }
127 self.segments.first().map(|s| &s.name) 127 self.segments.first().map(|s| &s.name)
128 } 128 }
129
130 pub fn expand_macro_expr(&self) -> Option<Name> {
131 self.as_ident().and_then(|name| Some(name.clone()))
132 }
129} 133}
130 134
131impl GenericArgs { 135impl GenericArgs {