mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 12:36:47 +00:00
Rename ProcMacro
trait as BangProcMacro
.
Similar to the existing `AttrProcMacro` trait.
This commit is contained in:
parent
1a9514d5ce
commit
dbdc7dd0dc
@ -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.
|
||||
|
@ -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<'_>,
|
||||
|
Loading…
Reference in New Issue
Block a user