Struct syntax::ext::base::DummyResult
[−]
[src]
pub struct DummyResult { /* fields omitted */ }
Fill-in macro expansion result, to allow compilation to continue after hitting errors.
Methods
impl DummyResult
[src]
ⓘImportant traits for Box<W>pub fn any(sp: Span) -> Box<MacResult + 'static>
[src]
ⓘImportant traits for Box<W>
Create a default MacResult that can be anything.
Use this as a return value after hitting any errors and
calling span_err
.
ⓘImportant traits for Box<W>pub fn expr(sp: Span) -> Box<MacResult + 'static>
[src]
ⓘImportant traits for Box<W>
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.
pub fn raw_expr(sp: Span) -> P<Expr>
[src]
A plain dummy expression.
pub fn raw_pat(sp: Span) -> Pat
[src]
A plain dummy pattern.
pub fn raw_ty(sp: Span) -> P<Ty>
[src]
Trait Implementations
impl Copy for DummyResult
[src]
impl Clone for DummyResult
[src]
fn clone(&self) -> DummyResult
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl MacResult for DummyResult
[src]
fn make_expr(self: Box<DummyResult>) -> Option<P<Expr>>
[src]
Create an expression.
fn make_pat(self: Box<DummyResult>) -> Option<P<Pat>>
[src]
Create a pattern.
fn make_items(self: Box<DummyResult>) -> Option<SmallVector<P<Item>>>
[src]
Create zero or more items.
fn make_impl_items(self: Box<DummyResult>) -> Option<SmallVector<ImplItem>>
[src]
Create zero or more impl items.
fn make_trait_items(self: Box<DummyResult>) -> Option<SmallVector<TraitItem>>
[src]
Create zero or more trait items.
fn make_stmts(self: Box<DummyResult>) -> Option<SmallVector<Stmt>>
[src]
Create zero or more statements. Read more