Struct syntax::ext::base::DummyResult [−] [src]

pub struct DummyResult {
    // some fields omitted
}
Unstable

Fill-in macro expansion result, to allow compilation to continue after hitting errors.

Methods

impl DummyResult

fn any(sp: Span) -> Box<MacResult + 'static>

Unstable

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>

Unstable

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>

Unstable

A plain dummy expression.

fn raw_pat(sp: Span) -> Pat

Unstable

A plain dummy pattern.

Trait Implementations

impl MacResult for DummyResult

fn make_expr(self: Box<DummyResult>) -> Option<P<Expr>>

fn make_pat(self: Box<DummyResult>) -> Option<P<Pat>>

fn make_items(self: Box<DummyResult>) -> Option<SmallVector<P<Item>>>

fn make_impl_items(self: Box<DummyResult>) -> Option<SmallVector<P<ImplItem>>>

fn make_stmts(self: Box<DummyResult>) -> Option<SmallVector<P<Stmt>>>

Derived Implementations

impl Clone for DummyResult

fn clone(&self) -> DummyResult

fn clone_from(&mut self, source: &Self)

impl Copy for DummyResult