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

Commit 3308627

Browse files
committed
Add some more AST node size assertions.
There is some redundancy here, but the extra assertions make it easier to keep track of relative things, e.g. `ExprKind` is the biggest part of `Expr`.
1 parent 9619a2e commit 3308627

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,6 +3035,7 @@ mod size_asserts {
30353035
static_assert_size!(Attribute, 152);
30363036
static_assert_size!(Block, 48);
30373037
static_assert_size!(Expr, 104);
3038+
static_assert_size!(ExprKind, 72);
30383039
static_assert_size!(Fn, 192);
30393040
static_assert_size!(ForeignItem, 160);
30403041
static_assert_size!(ForeignItemKind, 72);
@@ -3044,9 +3045,13 @@ mod size_asserts {
30443045
static_assert_size!(Item, 200);
30453046
static_assert_size!(ItemKind, 112);
30463047
static_assert_size!(Lit, 48);
3048+
static_assert_size!(LitKind, 24);
30473049
static_assert_size!(Pat, 120);
3050+
static_assert_size!(PatKind, 96);
30483051
static_assert_size!(Path, 40);
30493052
static_assert_size!(PathSegment, 24);
30503053
static_assert_size!(Stmt, 32);
3054+
static_assert_size!(StmtKind, 16);
30513055
static_assert_size!(Ty, 96);
3056+
static_assert_size!(TyKind, 72);
30523057
}

0 commit comments

Comments
 (0)