From 2887426da0ec8b4f8fc97894a5a29026d5259293 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 17 Feb 2021 15:00:44 +0100 Subject: Revert "Replace usage of ast::NameOrNameRef with ast::NameLike" This reverts commit e1dbf43cf85f84c3a7e40f9731fc1f7ac96f8979. --- crates/hir_expand/src/name.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'crates/hir_expand/src') 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 { } } -impl AsName for ast::Lifetime { - fn as_name(&self) -> Name { - Name::resolve(self.text()) - } -} - -impl AsName for ast::NameLike { +impl AsName for ast::NameOrNameRef { fn as_name(&self) -> Name { match self { - ast::NameLike::Name(it) => it.as_name(), - ast::NameLike::NameRef(it) => it.as_name(), - ast::NameLike::Lifetime(it) => it.as_name(), + ast::NameOrNameRef::Name(it) => it.as_name(), + ast::NameOrNameRef::NameRef(it) => it.as_name(), } } } -- cgit v1.2.3