Stmt in rustc_ast::ast - Rust (original) (raw)
pub struct Stmt {
pub id: NodeId,
pub kind: StmtKind,
pub span: Span,
}Expand description
A statement. No attrs or tokens fields because each StmtKind variant contains an AST node with those fields. (Except for StmtKind::Empty, which never has attrs or tokens)
Converts a parsed Stmt to a Stmt with a trailing semicolon.
This only modifies the parsed AST struct, not the attachedLazyAttrTokenStream. The parser is responsible for callingToAttrTokenStream::add_trailing_semi when there is actually a semicolon in the tokenstream.
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: 32 bytes