diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-17 14:02:07 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-17 14:02:07 +0000 |
commit | 6334ce866ab095215381c4b72692b20a84d26e96 (patch) | |
tree | 38415f704e55200924997b16bcf69f6acbb3d886 /crates/hir_expand | |
parent | 4054525c418085db4ceb2df70475a1ac9c019aff (diff) | |
parent | 2887426da0ec8b4f8fc97894a5a29026d5259293 (diff) |
Merge #7706
7706: Revert "Replace usage of ast::NameOrNameRef with ast::NameLike" r=Veykril a=Veykril
This reverts commit e1dbf43cf85f84c3a7e40f9731fc1f7ac96f8979.
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_expand')
-rw-r--r-- | crates/hir_expand/src/name.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs index 74cf64aab..c7609e90d 100644 --- a/crates/hir_expand/src/name.rs +++ b/crates/hir_expand/src/name.rs | |||
@@ -87,18 +87,11 @@ impl AsName for ast::Name { | |||
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | impl AsName for ast::Lifetime { | 90 | impl AsName for ast::NameOrNameRef { |
91 | fn as_name(&self) -> Name { | ||
92 | Name::resolve(self.text()) | ||
93 | } | ||
94 | } | ||
95 | |||
96 | impl AsName for ast::NameLike { | ||
97 | fn as_name(&self) -> Name { | 91 | fn as_name(&self) -> Name { |
98 | match self { | 92 | match self { |
99 | ast::NameLike::Name(it) => it.as_name(), | 93 | ast::NameOrNameRef::Name(it) => it.as_name(), |
100 | ast::NameLike::NameRef(it) => it.as_name(), | 94 | ast::NameOrNameRef::NameRef(it) => it.as_name(), |
101 | ast::NameLike::Lifetime(it) => it.as_name(), | ||
102 | } | 95 | } |
103 | } | 96 | } |
104 | } | 97 | } |