Struct syntex_syntax::ext::base::DummyResult
[−]
[src]
pub struct DummyResult { // some fields omitted }
Fill-in macro expansion result, to allow compilation to continue after hitting errors.
Methods
impl DummyResult
[src]
fn any(sp: Span) -> Box<MacResult + 'static>
Create a default MacResult that can be anything.
Use this as a return value after hitting any errors and
calling span_err
.
fn expr(sp: Span) -> Box<MacResult + 'static>
Create a default MacResult that can only be an expression.
Use this for macros that must expand to an expression, so even if an error is encountered internally, the user will receive an error that they also used it in the wrong place.
fn raw_expr(sp: Span) -> P<Expr>
A plain dummy expression.
fn raw_pat(sp: Span) -> Pat
A plain dummy pattern.
fn raw_ty(sp: Span) -> P<Ty>
Trait Implementations
impl MacResult for DummyResult
[src]
fn make_expr(self: Box<DummyResult>) -> Option<P<Expr>>
Create an expression.
fn make_pat(self: Box<DummyResult>) -> Option<P<Pat>>
Create a pattern.
fn make_items(self: Box<DummyResult>) -> Option<SmallVector<P<Item>>>
Create zero or more items.
fn make_impl_items(self: Box<DummyResult>) -> Option<SmallVector<P<ImplItem>>>
Create zero or more impl items.
fn make_stmts(self: Box<DummyResult>) -> Option<SmallVector<P<Stmt>>>
Create zero or more statements. Read more
fn make_ty(self: Box<Self>) -> Option<P<Ty>>
Derived Implementations
impl Clone for DummyResult
[src]
fn clone(&self) -> DummyResult
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more