From 8afb445357f621eb5b4aada6041eb2a1afd41ee6 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Tue, 24 Mar 2020 03:45:52 +0800 Subject: Rename to CustomDerive --- crates/ra_hir_def/src/nameres/collector.rs | 2 +- crates/ra_hir_expand/src/db.rs | 2 +- crates/ra_hir_expand/src/eager.rs | 2 +- crates/ra_hir_expand/src/hygiene.rs | 2 +- crates/ra_hir_expand/src/lib.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 76be71a30..1dcf5a309 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -892,7 +892,7 @@ impl ModCollector<'_, '_> { let macro_id = MacroDefId { ast_id: None, krate: Some(krate), - kind: MacroDefKind::ProcMacro(expander), + kind: MacroDefKind::CustomDerive(expander), }; self.def_collector.define_proc_macro(name.clone(), macro_id); diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index c2eb75ee5..047452306 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs @@ -135,7 +135,7 @@ pub(crate) fn macro_def( Some(Arc::new((TokenExpander::BuiltinDerive(expander), mbe::TokenMap::default()))) } MacroDefKind::BuiltInEager(_) => None, - MacroDefKind::ProcMacro(expander) => { + MacroDefKind::CustomDerive(expander) => { Some(Arc::new((TokenExpander::ProcMacro(expander), mbe::TokenMap::default()))) } } diff --git a/crates/ra_hir_expand/src/eager.rs b/crates/ra_hir_expand/src/eager.rs index 9ff743b9e..932f47c30 100644 --- a/crates/ra_hir_expand/src/eager.rs +++ b/crates/ra_hir_expand/src/eager.rs @@ -113,7 +113,7 @@ fn eager_macro_recur( MacroDefKind::Declarative | MacroDefKind::BuiltIn(_) | MacroDefKind::BuiltInDerive(_) - | MacroDefKind::ProcMacro(_) => { + | MacroDefKind::CustomDerive(_) => { let expanded = lazy_expand(db, &def, curr.with_value(child.clone()))?; // replace macro inside eager_macro_recur(db, expanded, macro_resolver)? diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs index 182c08eb3..0b41d0e95 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs @@ -30,7 +30,7 @@ impl Hygiene { MacroDefKind::BuiltIn(_) => None, MacroDefKind::BuiltInDerive(_) => None, MacroDefKind::BuiltInEager(_) => None, - MacroDefKind::ProcMacro(_) => None, + MacroDefKind::CustomDerive(_) => None, } } MacroCallId::EagerMacro(_id) => None, diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs index ac1d12252..86299459f 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/ra_hir_expand/src/lib.rs @@ -219,7 +219,7 @@ pub enum MacroDefKind { // FIXME: maybe just Builtin and rename BuiltinFnLikeExpander to BuiltinExpander BuiltInDerive(BuiltinDeriveExpander), BuiltInEager(EagerExpander), - ProcMacro(ProcMacroExpander), + CustomDerive(ProcMacroExpander), } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -- cgit v1.2.3