Trait syntax::ext::base::MacResult
[−]
[src]
pub trait MacResult { fn make_expr(self: Box<Self>) -> Option<P<Expr>> { ... } fn make_items(self: Box<Self>) -> Option<SmallVector<P<Item>>> { ... } fn make_impl_items(self: Box<Self>) -> Option<SmallVector<ImplItem>> { ... } fn make_trait_items(self: Box<Self>) -> Option<SmallVector<TraitItem>> { ... } fn make_pat(self: Box<Self>) -> Option<P<Pat>> { ... } fn make_stmts(self: Box<Self>) -> Option<SmallVector<Stmt>> { ... } fn make_ty(self: Box<Self>) -> Option<P<Ty>> { ... } }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The result of a macro expansion. The return values of the various methods are spliced into the AST at the callsite of the macro.
Provided Methods
fn make_expr(self: Box<Self>) -> Option<P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create an expression.
fn make_items(self: Box<Self>) -> Option<SmallVector<P<Item>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create zero or more items.
fn make_impl_items(self: Box<Self>) -> Option<SmallVector<ImplItem>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create zero or more impl items.
fn make_trait_items(self: Box<Self>) -> Option<SmallVector<TraitItem>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create zero or more trait items.
fn make_pat(self: Box<Self>) -> Option<P<Pat>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a pattern.
fn make_stmts(self: Box<Self>) -> Option<SmallVector<Stmt>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create zero or more statements.
By default this attempts to create an expression statement, returning None if that fails.
fn make_ty(self: Box<Self>) -> Option<P<Ty>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Implementors
impl MacResult for MacEager
impl MacResult for DummyResult
impl<'a> MacResult for ParserAnyMacro<'a>