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

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

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>>>

fn make_ty(self: Box<Self>) -> Option<P<Ty>>

Derived Implementations

impl Clone for DummyResult

fn clone(&self) -> DummyResult

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

impl Copy for DummyResult