Skip to content

Commit dbdc7dd

Browse files
committed
Rename ProcMacro trait as BangProcMacro.
Similar to the existing `AttrProcMacro` trait.
1 parent 1a9514d commit dbdc7dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_expand/src/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ where
266266
}
267267
}
268268

269-
pub trait ProcMacro {
269+
pub trait BangProcMacro {
270270
fn expand<'cx>(
271271
&self,
272272
ecx: &'cx mut ExtCtxt<'_>,
@@ -275,7 +275,7 @@ pub trait ProcMacro {
275275
) -> Result<TokenStream, ErrorGuaranteed>;
276276
}
277277

278-
impl<F> ProcMacro for F
278+
impl<F> BangProcMacro for F
279279
where
280280
F: Fn(TokenStream) -> TokenStream,
281281
{
@@ -640,7 +640,7 @@ pub enum SyntaxExtensionKind {
640640
/// A token-based function-like macro.
641641
Bang(
642642
/// An expander with signature TokenStream -> TokenStream.
643-
Box<dyn ProcMacro + sync::Sync + sync::Send>,
643+
Box<dyn BangProcMacro + sync::Sync + sync::Send>,
644644
),
645645

646646
/// An AST-based function-like macro.

compiler/rustc_expand/src/proc_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct BangProcMacro {
1717
pub client: pm::bridge::client::Client<fn(pm::TokenStream) -> pm::TokenStream>,
1818
}
1919

20-
impl base::ProcMacro for BangProcMacro {
20+
impl base::BangProcMacro for BangProcMacro {
2121
fn expand<'cx>(
2222
&self,
2323
ecx: &'cx mut ExtCtxt<'_>,

0 commit comments

Comments
 (0)