Struct rustc_expand::base::DummyResult[−][src]

pub struct DummyResult {
    is_error: bool,
    span: Span,
}
Expand description

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

Fields

is_error: boolspan: Span

Implementations

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

Creates an expression.

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

Creates a pattern.

fn make_items(self: Box<DummyResult>) -> Option<SmallVec<[P<Item>; 1]>>[src]

Creates zero or more items.

fn make_impl_items(
    self: Box<DummyResult>
) -> Option<SmallVec<[P<AssocItem>; 1]>>
[src]

Creates zero or more impl items.

fn make_trait_items(
    self: Box<DummyResult>
) -> Option<SmallVec<[P<AssocItem>; 1]>>
[src]

Creates zero or more trait items.

fn make_foreign_items(self: Box<Self>) -> Option<SmallVec<[P<ForeignItem>; 1]>>[src]

Creates zero or more items in an extern {} block

fn make_stmts(self: Box<DummyResult>) -> Option<SmallVec<[Stmt; 1]>>[src]

Creates zero or more statements. Read more

fn make_ty(self: Box<DummyResult>) -> Option<P<Ty>>[src]

fn make_arms(self: Box<DummyResult>) -> Option<SmallVec<[Arm; 1]>>[src]

fn make_expr_fields(self: Box<DummyResult>) -> Option<SmallVec<[ExprField; 1]>>[src]

fn make_pat_fields(self: Box<DummyResult>) -> Option<SmallVec<[PatField; 1]>>[src]

fn make_generic_params(
    self: Box<DummyResult>
) -> Option<SmallVec<[GenericParam; 1]>>
[src]

fn make_params(self: Box<DummyResult>) -> Option<SmallVec<[Param; 1]>>[src]

fn make_field_defs(self: Box<DummyResult>) -> Option<SmallVec<[FieldDef; 1]>>[src]

fn make_variants(self: Box<DummyResult>) -> Option<SmallVec<[Variant; 1]>>[src]

impl Copy for DummyResult[src]

Auto Trait Implementations

impl RefUnwindSafe for DummyResult

impl !Send for DummyResult

impl !Sync for DummyResult

impl Unpin for DummyResult

impl UnwindSafe for DummyResult

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.