mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Rename CustomDerive
to ProcMacro
It handles fn-like macros too, and will handle attribute macros in the future
This commit is contained in:
parent
700a3d5d75
commit
9dc0afe854
6 changed files with 8 additions and 8 deletions
|
@ -908,12 +908,12 @@ impl MacroDef {
|
|||
|
||||
/// Indicate it is a proc-macro
|
||||
pub fn is_proc_macro(&self) -> bool {
|
||||
matches!(self.id.kind, MacroDefKind::CustomDerive(_))
|
||||
matches!(self.id.kind, MacroDefKind::ProcMacro(_))
|
||||
}
|
||||
|
||||
/// Indicate it is a derive macro
|
||||
pub fn is_derive_macro(&self) -> bool {
|
||||
matches!(self.id.kind, MacroDefKind::CustomDerive(_) | MacroDefKind::BuiltInDerive(_))
|
||||
matches!(self.id.kind, MacroDefKind::ProcMacro(_) | MacroDefKind::BuiltInDerive(_))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue