Trait rustc_ap_rustc_ast::ast_like::AstLike[][src]

pub trait AstLike: Sized {
    fn attrs(&self) -> &[Attribute];
fn visit_attrs(&mut self, f: impl FnOnce(&mut Vec<Attribute>)); fn finalize_tokens(&mut self, _tokens: LazyTokenStream) { ... } }

An AstLike represents an AST node (or some wrapper around and AST node) which stores some combination of attributes and tokens.

Required methods

fn attrs(&self) -> &[Attribute][src]

fn visit_attrs(&mut self, f: impl FnOnce(&mut Vec<Attribute>))[src]

Loading content...

Provided methods

fn finalize_tokens(&mut self, _tokens: LazyTokenStream)[src]

Called by Parser::collect_tokens to store the collected tokens inside an AST node

Loading content...

Implementations on Foreign Types

impl<T: AstLike> AstLike for Option<T>[src]

Loading content...

Implementors

impl AstLike for StmtKind[src]

impl AstLike for Arm[src]

impl AstLike for AttrItem[src]

impl AstLike for Attribute[src]

impl AstLike for Block[src]

impl AstLike for Expr[src]

impl AstLike for Field[src]

impl AstLike for FieldPat[src]

impl AstLike for GenericParam[src]

impl AstLike for Item[src]

impl AstLike for Local[src]

impl AstLike for Param[src]

impl AstLike for Pat[src]

impl AstLike for Path[src]

impl AstLike for Stmt[src]

impl AstLike for StructField[src]

impl AstLike for Ty[src]

impl AstLike for Variant[src]

impl AstLike for Visibility[src]

impl AstLike for AssocItem[src]

impl AstLike for ForeignItem[src]

impl<T: AstLike + 'static> AstLike for P<T>[src]

Loading content...