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:
@@ -95,8 +95,8 @@ impl<'tcx> LateLintPass<'tcx> for DefaultCouldBeDerived {
|
||||
kind:
|
||||
hir::ItemKind::Struct(
|
||||
_,
|
||||
hir::VariantData::Struct { fields, recovered: _ },
|
||||
_generics,
|
||||
hir::VariantData::Struct { fields, recovered: _ },
|
||||
),
|
||||
..
|
||||
})) => fields.iter().map(|f| (f.ident.name, f)).collect::<FxHashMap<_, _>>(),
|
||||
|
||||
Reference in New Issue
Block a user