Struct syntax::ext::base::DummyResultUnstable [-] [+] [src]

pub struct DummyResult {
    // some fields omitted
}

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

Methods

impl DummyResult

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.

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_methods(self: Box<DummyResult>) -> Option<SmallVector<P<Method>>>

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

Derived Implementations

impl Copy for DummyResult