aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand
diff options
context:
space:
mode:
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 }