Rename ProcMacro trait as BangProcMacro.

Similar to the existing `AttrProcMacro` trait.
This commit is contained in:
Nicholas Nethercote 2022-05-13 14:07:56 +10:00
parent 1a9514d5ce
commit dbdc7dd0dc
2 changed files with 4 additions and 4 deletions

View File

@ -266,7 +266,7 @@ where
}
}
pub trait ProcMacro {
pub trait BangProcMacro {
fn expand<'cx>(
&self,
ecx: &'cx mut ExtCtxt<'_>,
@ -275,7 +275,7 @@ pub trait ProcMacro {
) -> Result<TokenStream, ErrorGuaranteed>;
}
impl<F> ProcMacro for F
impl<F> BangProcMacro for F
where
F: Fn(TokenStream) -> TokenStream,
{
@ -640,7 +640,7 @@ pub enum SyntaxExtensionKind {
/// A token-based function-like macro.
Bang(
/// An expander with signature TokenStream -> TokenStream.
Box<dyn ProcMacro + sync::Sync + sync::Send>,
Box<dyn BangProcMacro + sync::Sync + sync::Send>,
),
/// An AST-based function-like macro.

View File

@ -17,7 +17,7 @@ pub struct BangProcMacro {
pub client: pm::bridge::client::Client<fn(pm::TokenStream) -> pm::TokenStream>,
}
impl base::ProcMacro for BangProcMacro {
impl base::BangProcMacro for BangProcMacro {
fn expand<'cx>(
&self,
ecx: &'cx mut ExtCtxt<'_>,