mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
parent
dea3ff609e
commit
526dc4b5f5
1 changed files with 2 additions and 6 deletions
|
@ -5,11 +5,7 @@ use syntax::{
|
||||||
AstNode, SyntaxNode,
|
AstNode, SyntaxNode,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{db::AstDatabase, name::AsName, AttrId, LazyMacroId, MacroCallKind, MacroCallLoc};
|
||||||
db::AstDatabase,
|
|
||||||
name::{name, AsName},
|
|
||||||
AttrId, LazyMacroId, MacroCallKind, MacroCallLoc,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(crate) fn process_macro_input(
|
pub(crate) fn process_macro_input(
|
||||||
db: &dyn AstDatabase,
|
db: &dyn AstDatabase,
|
||||||
|
@ -39,7 +35,7 @@ fn remove_derives_up_to(item: ast::Item, attr: AttrId) -> ast::Item {
|
||||||
if let Some(name) =
|
if let Some(name) =
|
||||||
attr.path().and_then(|path| path.as_single_segment()).and_then(|seg| seg.name_ref())
|
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();
|
attr.syntax().detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue