diff options
-rw-r--r-- | crates/hir_expand/src/input.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/hir_expand/src/input.rs b/crates/hir_expand/src/input.rs index 40f8da696..d1f22aba4 100644 --- a/crates/hir_expand/src/input.rs +++ b/crates/hir_expand/src/input.rs | |||
@@ -5,7 +5,11 @@ use syntax::{ | |||
5 | AstNode, SyntaxNode, | 5 | AstNode, SyntaxNode, |
6 | }; | 6 | }; |
7 | 7 | ||
8 | use crate::{db::AstDatabase, name::AsName, AttrId, LazyMacroId, MacroCallKind, MacroCallLoc}; | 8 | use crate::{ |
9 | db::AstDatabase, | ||
10 | name::{name, AsName}, | ||
11 | AttrId, LazyMacroId, MacroCallKind, MacroCallLoc, | ||
12 | }; | ||
9 | 13 | ||
10 | pub(crate) fn process_macro_input( | 14 | pub(crate) fn process_macro_input( |
11 | db: &dyn AstDatabase, | 15 | db: &dyn AstDatabase, |
@@ -35,7 +39,7 @@ fn remove_derives_up_to(item: ast::Item, attr: AttrId) -> ast::Item { | |||
35 | if let Some(name) = | 39 | if let Some(name) = |
36 | attr.path().and_then(|path| path.as_single_segment()).and_then(|seg| seg.name_ref()) | 40 | attr.path().and_then(|path| path.as_single_segment()).and_then(|seg| seg.name_ref()) |
37 | { | 41 | { |
38 | if name.as_name().to_string() == "derive" { | 42 | if name.as_name() == name![derive] { |
39 | attr.syntax().detach(); | 43 | attr.syntax().detach(); |
40 | } | 44 | } |
41 | } | 45 | } |