Rename to CustomDerive
This commit is contained in:
parent
7667aa6033
commit
8afb445357
@ -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);
|
||||
|
@ -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())))
|
||||
}
|
||||
}
|
||||
|
@ -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)?
|
||||
|
@ -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,
|
||||
|
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user