From bc70d0db920c19e6764c45178027f17c2d2ac7f6 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 16 May 2022 11:56:36 +1000 Subject: [PATCH] Rename `ProcMacroDerive` as `DeriveProcMacro`. So it matches the existing `AttrProcMacro` and `BangProcMacro` types. --- compiler/rustc_expand/src/proc_macro.rs | 4 ++-- compiler/rustc_metadata/src/rmeta/decoder.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_expand/src/proc_macro.rs b/compiler/rustc_expand/src/proc_macro.rs index 115f3ef38387..eb59c5a18549 100644 --- a/compiler/rustc_expand/src/proc_macro.rs +++ b/compiler/rustc_expand/src/proc_macro.rs @@ -72,11 +72,11 @@ fn expand<'cx>( } } -pub struct ProcMacroDerive { +pub struct DeriveProcMacro { pub client: pm::bridge::client::Client pm::TokenStream>, } -impl MultiItemModifier for ProcMacroDerive { +impl MultiItemModifier for DeriveProcMacro { fn expand( &self, ecx: &mut ExtCtxt<'_>, diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 1420871b0256..9f53b24609a3 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -11,7 +11,7 @@ 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 @@ fn load_proc_macro(self, id: DefIndex, sess: &Session) -> SyntaxExtension { attributes.iter().cloned().map(Symbol::intern).collect::>(); ( trait_name, - SyntaxExtensionKind::Derive(Box::new(ProcMacroDerive { client })), + SyntaxExtensionKind::Derive(Box::new(DeriveProcMacro { client })), helper_attrs, ) }