aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-09-18 14:37:31 +0100
committerJonas Schievink <[email protected]>2020-09-18 14:37:31 +0100
commit9dc0afe854380f17bbec9100187ef3d3aa397f28 (patch)
tree72332355087da5fb9f518ae04a9fa73a4f93a70d /crates/hir/src
parent700a3d5d75cdc1b8b7049d35af335c638e079c5c (diff)
Rename `CustomDerive` to `ProcMacro`
It handles fn-like macros too, and will handle attribute macros in the future
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/code_model.rs4
1 files changed, 2 insertions, 2 deletions
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 {
908 908
909 /// Indicate it is a proc-macro 909 /// Indicate it is a proc-macro
910 pub fn is_proc_macro(&self) -> bool { 910 pub fn is_proc_macro(&self) -> bool {
911 matches!(self.id.kind, MacroDefKind::CustomDerive(_)) 911 matches!(self.id.kind, MacroDefKind::ProcMacro(_))
912 } 912 }
913 913
914 /// Indicate it is a derive macro 914 /// Indicate it is a derive macro
915 pub fn is_derive_macro(&self) -> bool { 915 pub fn is_derive_macro(&self) -> bool {
916 matches!(self.id.kind, MacroDefKind::CustomDerive(_) | MacroDefKind::BuiltInDerive(_)) 916 matches!(self.id.kind, MacroDefKind::ProcMacro(_) | MacroDefKind::BuiltInDerive(_))
917 } 917 }
918} 918}
919 919