Rename ProcMacroDerive as DeriveProcMacro.

So it matches the existing `AttrProcMacro` and `BangProcMacro` types.
This commit is contained in:
Nicholas Nethercote 2022-05-16 11:56:36 +10:00
parent dbdc7dd0dc
commit bc70d0db92
2 changed files with 4 additions and 4 deletions

View File

@ -72,11 +72,11 @@ impl base::AttrProcMacro for AttrProcMacro {
}
}
pub struct ProcMacroDerive {
pub struct DeriveProcMacro {
pub client: pm::bridge::client::Client<fn(pm::TokenStream) -> pm::TokenStream>,
}
impl MultiItemModifier for ProcMacroDerive {
impl MultiItemModifier for DeriveProcMacro {
fn expand(
&self,
ecx: &mut ExtCtxt<'_>,

View File

@ -11,7 +11,7 @@ use rustc_data_structures::svh::Svh;
use rustc_data_structures::sync::{Lock, LockGuard, Lrc, OnceCell};
use rustc_data_structures::unhash::UnhashMap;
use rustc_expand::base::{SyntaxExtension, SyntaxExtensionKind};
use rustc_expand::proc_macro::{AttrProcMacro, BangProcMacro, ProcMacroDerive};
use rustc_expand::proc_macro::{AttrProcMacro, BangProcMacro, DeriveProcMacro};
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
use rustc_hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
use rustc_hir::definitions::{DefKey, DefPath, DefPathData, DefPathHash};
@ -837,7 +837,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
attributes.iter().cloned().map(Symbol::intern).collect::<Vec<_>>();
(
trait_name,
SyntaxExtensionKind::Derive(Box::new(ProcMacroDerive { client })),
SyntaxExtensionKind::Derive(Box::new(DeriveProcMacro { client })),
helper_attrs,
)
}