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

pub struct DummyResult { /* fields omitted */ }

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

Methods

impl DummyResult[src]

pub fn any(span: Span) -> Box<dyn MacResult + 'static>[src]

Creates a default MacResult that can be anything.

Use this as a return value after hitting any errors and calling span_err.

pub fn any_valid(span: Span) -> Box<dyn MacResult + 'static>[src]

Same as any, but must be a valid fragment, not error.

pub fn expr(span: Span) -> Box<dyn MacResult + 'static>[src]

Creates 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, is_error: bool) -> 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, is_error: bool) -> P<Ty>[src]

A plain dummy type.

Trait Implementations

impl MacResult for DummyResult[src]

impl Copy for DummyResult[src]

impl Clone for DummyResult[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for DummyResult

impl !Sync for DummyResult

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]