Reorder fields in hir::ItemKind variants.

Specifically `TyAlias`, `Enum`, `Struct`, `Union`. So the fields match
the textual order in the source code.

The interesting part of the change is in
`compiler/rustc_hir/src/hir.rs`. The rest is extremely mechanical
refactoring.
This commit is contained in:
Nicholas Nethercote
2025-05-28 15:18:48 +10:00
parent 13718eb788
commit f8887aa5af
45 changed files with 184 additions and 186 deletions

View File

@@ -241,7 +241,7 @@ impl DocVisitor<'_> for CoverageCalculator<'_, '_> {
data: hir::VariantData::Tuple(_, _, _),
..
}) | hir::Node::Item(hir::Item {
kind: hir::ItemKind::Struct(_, hir::VariantData::Tuple(_, _, _), _),
kind: hir::ItemKind::Struct(_, _, hir::VariantData::Tuple(_, _, _)),
..
})
)