From 9dc0afe854380f17bbec9100187ef3d3aa397f28 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 18 Sep 2020 15:37:31 +0200 Subject: Rename `CustomDerive` to `ProcMacro` It handles fn-like macros too, and will handle attribute macros in the future --- crates/hir/src/code_model.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 7a9747fc7..849c8f6d0 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -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(_)) } } -- cgit v1.2.3