diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 76be71a30f1..1dcf5a30919 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -892,7 +892,7 @@ fn collect_proc_macro(&mut self, attrs: &Attrs) { 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 c2eb75ee522..0474523063c 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 9ff743b9ea3..932f47c3098 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 182c08eb34d..0b41d0e9581 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs @@ -30,7 +30,7 @@ pub fn new(db: &dyn AstDatabase, file_id: HirFileId) -> 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 ac1d1225223..86299459fa1 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)]