diff options
author | Benjamin Coenen <[email protected]> | 2020-04-14 18:20:30 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-14 18:20:30 +0100 |
commit | b092bbc83d13af6a79f8f282632ec1ea0a1560bd (patch) | |
tree | 2638559990ee6a93cd3b6d6d957b67063eb75c2d /crates/ra_hir_expand | |
parent | 064095742980d4c825391f643e437520599f51d8 (diff) | |
parent | c82e7696e6f86cc0843c5aab9f09b5d6dd0d4bac (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r-- | crates/ra_hir_expand/src/name.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 25cc1e9fc..fecce224e 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs | |||
@@ -83,6 +83,15 @@ impl AsName for ast::Name { | |||
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | impl AsName for ast::NameOrNameRef { | ||
87 | fn as_name(&self) -> Name { | ||
88 | match self { | ||
89 | ast::NameOrNameRef::Name(it) => it.as_name(), | ||
90 | ast::NameOrNameRef::NameRef(it) => it.as_name(), | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | |||
86 | impl AsName for tt::Ident { | 95 | impl AsName for tt::Ident { |
87 | fn as_name(&self) -> Name { | 96 | fn as_name(&self) -> Name { |
88 | Name::resolve(&self.text) | 97 | Name::resolve(&self.text) |