From e1dbf43cf85f84c3a7e40f9731fc1f7ac96f8979 Mon Sep 17 00:00:00 2001
From: Lukas Wirth <lukastw97@gmail.com>
Date: Wed, 17 Feb 2021 14:02:34 +0100
Subject: Replace usage of ast::NameOrNameRef with ast::NameLike

---
 crates/hir_expand/src/name.rs | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

(limited to 'crates/hir_expand/src')

diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs
index c7609e90d..74cf64aab 100644
--- a/crates/hir_expand/src/name.rs
+++ b/crates/hir_expand/src/name.rs
@@ -87,11 +87,18 @@ impl AsName for ast::Name {
     }
 }
 
-impl AsName for ast::NameOrNameRef {
+impl AsName for ast::Lifetime {
+    fn as_name(&self) -> Name {
+        Name::resolve(self.text())
+    }
+}
+
+impl AsName for ast::NameLike {
     fn as_name(&self) -> Name {
         match self {
-            ast::NameOrNameRef::Name(it) => it.as_name(),
-            ast::NameOrNameRef::NameRef(it) => it.as_name(),
+            ast::NameLike::Name(it) => it.as_name(),
+            ast::NameLike::NameRef(it) => it.as_name(),
+            ast::NameLike::Lifetime(it) => it.as_name(),
         }
     }
 }
-- 
cgit v1.2.3