aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-04-10 19:30:19 +0100
committerJonas Schievink <[email protected]>2021-04-10 19:30:19 +0100
commit526dc4b5f567df5416261fbfe1c01bb9f7e35e6e (patch)
treeb3ef7b5fed46d37361c38ae273b6b845d162abba /crates/hir_expand
parentdea3ff609e486b4b1eb8e4f1f88b84b498683b91 (diff)
Revert "Use `name![derive]`"
This reverts commit d6187de4cd34a1288c7820c5477b81b1e9b692a9.
Diffstat (limited to 'crates/hir_expand')
-rw-r--r--crates/hir_expand/src/input.rs8
1 files 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::{
5 AstNode, SyntaxNode, 5 AstNode, SyntaxNode,
6}; 6};
7 7
8use crate::{ 8use crate::{db::AstDatabase, name::AsName, AttrId, LazyMacroId, MacroCallKind, MacroCallLoc};
9 db::AstDatabase,
10 name::{name, AsName},
11 AttrId, LazyMacroId, MacroCallKind, MacroCallLoc,
12};
13 9
14pub(crate) fn process_macro_input( 10pub(crate) fn process_macro_input(
15 db: &dyn AstDatabase, 11 db: &dyn AstDatabase,
@@ -39,7 +35,7 @@ fn remove_derives_up_to(item: ast::Item, attr: AttrId) -> ast::Item {
39 if let Some(name) = 35 if let Some(name) =
40 attr.path().and_then(|path| path.as_single_segment()).and_then(|seg| seg.name_ref()) 36 attr.path().and_then(|path| path.as_single_segment()).and_then(|seg| seg.name_ref())
41 { 37 {
42 if name.as_name() == name![derive] { 38 if name.as_name().to_string() == "derive" {
43 attr.syntax().detach(); 39 attr.syntax().detach();
44 } 40 }
45 } 41 }