[−][src]Trait rustc_expand::base::MacResult

pub trait MacResult {
    pub fn make_expr(self: Box<Self>) -> Option<P<Expr>> { ... }
pub fn make_items(self: Box<Self>) -> Option<SmallVec<[P<Item>; 1]>> { ... }
pub fn make_impl_items(
        self: Box<Self>
    ) -> Option<SmallVec<[P<AssocItem>; 1]>> { ... }
pub fn make_trait_items(
        self: Box<Self>
    ) -> Option<SmallVec<[P<AssocItem>; 1]>> { ... }
pub fn make_foreign_items(
        self: Box<Self>
    ) -> Option<SmallVec<[P<ForeignItem>; 1]>> { ... }
pub fn make_pat(self: Box<Self>) -> Option<P<Pat>> { ... }
pub fn make_stmts(self: Box<Self>) -> Option<SmallVec<[Stmt; 1]>> { ... }
pub fn make_ty(self: Box<Self>) -> Option<P<Ty>> { ... }
pub fn make_arms(self: Box<Self>) -> Option<SmallVec<[Arm; 1]>> { ... }
pub fn make_fields(self: Box<Self>) -> Option<SmallVec<[Field; 1]>> { ... }
pub fn make_field_patterns(
        self: Box<Self>
    ) -> Option<SmallVec<[FieldPat; 1]>> { ... }
pub fn make_generic_params(
        self: Box<Self>
    ) -> Option<SmallVec<[GenericParam; 1]>> { ... }
pub fn make_params(self: Box<Self>) -> Option<SmallVec<[Param; 1]>> { ... }
pub fn make_struct_fields(
        self: Box<Self>
    ) -> Option<SmallVec<[StructField; 1]>> { ... }
pub fn make_variants(self: Box<Self>) -> Option<SmallVec<[Variant; 1]>> { ... } }

The result of a macro expansion. The return values of the various methods are spliced into the AST at the callsite of the macro.

Provided methods

pub fn make_expr(self: Box<Self>) -> Option<P<Expr>>[src]

Creates an expression.

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

Creates zero or more items.

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

Creates zero or more impl items.

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

Creates zero or more trait items.

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

Creates zero or more items in an extern {} block

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

Creates a pattern.

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

Creates zero or more statements.

By default this attempts to create an expression statement, returning None if that fails.

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

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

pub fn make_fields(self: Box<Self>) -> Option<SmallVec<[Field; 1]>>[src]

pub fn make_field_patterns(self: Box<Self>) -> Option<SmallVec<[FieldPat; 1]>>[src]

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

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

pub fn make_struct_fields(self: Box<Self>) -> Option<SmallVec<[StructField; 1]>>[src]

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

Loading content...

Implementors

impl MacResult for DummyResult[src]

impl MacResult for MacEager[src]

impl<'a> MacResult for ParserAnyMacro<'a>[src]

Loading content...