Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2193893

Browse files
committed
Add a comment.
Something that was non-obvious to me.
1 parent 55cac26 commit 2193893

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,9 @@ impl UnOp {
972972
}
973973
}
974974

975-
/// A statement
975+
/// A statement. No `attrs` or `tokens` fields because each `StmtKind` variant
976+
/// contains an AST node with those fields. (Except for `StmtKind::Empty`,
977+
/// which never has attrs or tokens)
976978
#[derive(Clone, Encodable, Decodable, Debug)]
977979
pub struct Stmt {
978980
pub id: NodeId,

0 commit comments

Comments
 (0)