diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-23 13:49:31 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-23 13:49:31 +0100 |
commit | a094d5c621e44ff78dce953c0cae7cfba4b2840e (patch) | |
tree | 93d12337483968512db038b0b89aff7b9ef4eb20 /crates/ra_hir/src/path.rs | |
parent | e2835b46f6928eda21b7edb44f305f20473a3a98 (diff) | |
parent | 1ab7066e32ab482c70ea5c9bba7585eba275476a (diff) |
Merge #1147
1147: Handle macros in type checking / HIR r=matklad a=Lapz
An other attempt at #1102. I will need to flatten the nested if statements and im also not sure if the way that i get the resolver and module will always work
Co-authored-by: Lenard Pratt <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/path.rs')
-rw-r--r-- | crates/ra_hir/src/path.rs | 4 |
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 | ||
131 | impl GenericArgs { | 135 | impl GenericArgs { |