[−][src]Enum rustc_ap_rustc_expand::expand::AstFragment
A fragment of AST that can be produced by a single macro expansion. Can also serve as an input and intermediate result for macro expansion operations.
Variants
ForeignItems(SmallVec<[P<ForeignItem>; 1]>)
GenericParams(SmallVec<[GenericParam; 1]>)
StructFields(SmallVec<[StructField; 1]>)
Methods
impl AstFragment
[src]
pub fn add_placeholders(&mut self, placeholders: &[NodeId])
[src]
pub fn make_opt_expr(self) -> Option<P<Expr>>
[src]
pub fn make_expr(self) -> P<Expr>
[src]
pub fn make_pat(self) -> P<Pat>
[src]
pub fn make_ty(self) -> P<Ty>
[src]
pub fn make_stmts(self) -> SmallVec<[Stmt; 1]>
[src]
pub fn make_items(self) -> SmallVec<[P<Item>; 1]>
[src]
pub fn make_trait_items(self) -> SmallVec<[P<AssocItem>; 1]>
[src]
pub fn make_impl_items(self) -> SmallVec<[P<AssocItem>; 1]>
[src]
pub fn make_foreign_items(self) -> SmallVec<[P<ForeignItem>; 1]>
[src]
pub fn make_arms(self) -> SmallVec<[Arm; 1]>
[src]
pub fn make_fields(self) -> SmallVec<[Field; 1]>
[src]
pub fn make_field_patterns(self) -> SmallVec<[FieldPat; 1]>
[src]
pub fn make_generic_params(self) -> SmallVec<[GenericParam; 1]>
[src]
pub fn make_params(self) -> SmallVec<[Param; 1]>
[src]
pub fn make_struct_fields(self) -> SmallVec<[StructField; 1]>
[src]
pub fn make_variants(self) -> SmallVec<[Variant; 1]>
[src]
pub fn mut_visit_with<F: MutVisitor>(&mut self, vis: &mut F)
[src]
pub fn visit_with<'a, V: Visitor<'a>>(&'a self, visitor: &mut V)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AstFragment
impl !Send for AstFragment
impl !Sync for AstFragment
impl Unpin for AstFragment
impl !UnwindSafe for AstFragment
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MaybeResult<T> for T
[src]
type Error = !
fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T
[src]
fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,