Rename ProcMacro
trait as BangProcMacro
.
Similar to the existing `AttrProcMacro` trait.
This commit is contained in:
parent
1a9514d5ce
commit
dbdc7dd0dc
2 changed files with 4 additions and 4 deletions
|
@ -266,7 +266,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ProcMacro {
|
pub trait BangProcMacro {
|
||||||
fn expand<'cx>(
|
fn expand<'cx>(
|
||||||
&self,
|
&self,
|
||||||
ecx: &'cx mut ExtCtxt<'_>,
|
ecx: &'cx mut ExtCtxt<'_>,
|
||||||
|
@ -275,7 +275,7 @@ pub trait ProcMacro {
|
||||||
) -> Result<TokenStream, ErrorGuaranteed>;
|
) -> Result<TokenStream, ErrorGuaranteed>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<F> ProcMacro for F
|
impl<F> BangProcMacro for F
|
||||||
where
|
where
|
||||||
F: Fn(TokenStream) -> TokenStream,
|
F: Fn(TokenStream) -> TokenStream,
|
||||||
{
|
{
|
||||||
|
@ -640,7 +640,7 @@ pub enum SyntaxExtensionKind {
|
||||||
/// A token-based function-like macro.
|
/// A token-based function-like macro.
|
||||||
Bang(
|
Bang(
|
||||||
/// An expander with signature TokenStream -> TokenStream.
|
/// 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.
|
/// An AST-based function-like macro.
|
||||||
|
|
|
@ -17,7 +17,7 @@ pub struct BangProcMacro {
|
||||||
pub client: pm::bridge::client::Client<fn(pm::TokenStream) -> pm::TokenStream>,
|
pub client: pm::bridge::client::Client<fn(pm::TokenStream) -> pm::TokenStream>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl base::ProcMacro for BangProcMacro {
|
impl base::BangProcMacro for BangProcMacro {
|
||||||
fn expand<'cx>(
|
fn expand<'cx>(
|
||||||
&self,
|
&self,
|
||||||
ecx: &'cx mut ExtCtxt<'_>,
|
ecx: &'cx mut ExtCtxt<'_>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue