mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Make replace_derive_with_manual_impl work again
This commit is contained in:
parent
be3168dabe
commit
f13c98034b
9 changed files with 118 additions and 130 deletions
|
@ -1792,6 +1792,13 @@ impl MacroDef {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_builtin_derive(&self) -> bool {
|
||||
match self.id.kind {
|
||||
MacroDefKind::BuiltInAttr(exp, _) => exp.is_derive(),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_attr(&self) -> bool {
|
||||
matches!(self.kind(), MacroKind::Attr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue