From 526dc4b5f567df5416261fbfe1c01bb9f7e35e6e Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 10 Apr 2021 20:30:19 +0200 Subject: Revert "Use `name![derive]`" This reverts commit d6187de4cd34a1288c7820c5477b81b1e9b692a9. --- crates/hir_expand/src/input.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/hir_expand/src/input.rs b/crates/hir_expand/src/input.rs index d1f22aba4..40f8da696 100644 --- a/crates/hir_expand/src/input.rs +++ b/crates/hir_expand/src/input.rs @@ -5,11 +5,7 @@ use syntax::{ AstNode, SyntaxNode, }; -use crate::{ - db::AstDatabase, - name::{name, AsName}, - AttrId, LazyMacroId, MacroCallKind, MacroCallLoc, -}; +use crate::{db::AstDatabase, name::AsName, AttrId, LazyMacroId, MacroCallKind, MacroCallLoc}; pub(crate) fn process_macro_input( db: &dyn AstDatabase, @@ -39,7 +35,7 @@ fn remove_derives_up_to(item: ast::Item, attr: AttrId) -> ast::Item { if let Some(name) = attr.path().and_then(|path| path.as_single_segment()).and_then(|seg| seg.name_ref()) { - if name.as_name() == name![derive] { + if name.as_name().to_string() == "derive" { attr.syntax().detach(); } } -- cgit v1.2.3