Commit 79ce5bb
committed
Add a test for the size of important types.
We have size checks like these for many different parts of the compiler:
AST, HIR, MIR, etc. Those ones all use `static_assert_size!` from
`rustc_index`, but because rustdoc-json-types is distributed as its own
crate it can't depend on `rustc_index`. So I've just put the checks in a
unit test.
Note that `Item` is currently very large! Making the sizes of these
things explicit and tested is the first step towards making them
smaller.1 parent 55b9b4d commit 79ce5bb
1 file changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
0 commit comments