Enum rustc_ast::ast::StmtKind[][src]

pub enum StmtKind {
    Local(P<Local>),
    Item(P<Item>),
    Expr(P<Expr>),
    Semi(P<Expr>),
    Empty,
    MacCall(P<MacCallStmt>),
}

Variants

Local(P<Local>)

A local (let) binding.

Tuple Fields of Local

0: P<Local>
Item(P<Item>)

An item definition.

Tuple Fields of Item

0: P<Item>
Expr(P<Expr>)

Expr without trailing semi-colon.

Tuple Fields of Expr

0: P<Expr>
Semi(P<Expr>)

Expr with a trailing semi-colon.

Tuple Fields of Semi

0: P<Expr>
Empty

Just a trailing semi-colon.

MacCall(P<MacCallStmt>)

Macro.

Tuple Fields of MacCall

0: P<MacCallStmt>

Trait Implementations

This is true if this AstLike might support ‘custom’ (proc-macro) inner attributes. Attributes like #![cfg] and #![cfg_attr] are not considered ‘custom’ attributes Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes

Size for each variant: