diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-28 15:18:48 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-30 02:23:20 +1000 |
| commit | 459280c978b6b4ee7132f628ca480c77fb8cd532 (patch) | |
| tree | 27497e934f73d4a37739a4f98f26b8f0fe33cb54 /clippy_lints/src/trailing_empty_array.rs | |
| parent | 660aede53066ca0ab4354160d982d19b7962739b (diff) | |
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.
Diffstat (limited to 'clippy_lints/src/trailing_empty_array.rs')
| -rw-r--r-- | clippy_lints/src/trailing_empty_array.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/trailing_empty_array.rs b/clippy_lints/src/trailing_empty_array.rs index 20bf3a0bff1..75a82770af0 100644 --- a/clippy_lints/src/trailing_empty_array.rs +++ b/clippy_lints/src/trailing_empty_array.rs @@ -57,7 +57,7 @@ impl<'tcx> LateLintPass<'tcx> for TrailingEmptyArray { } fn is_struct_with_trailing_zero_sized_array<'tcx>(cx: &LateContext<'tcx>, item: &Item<'tcx>) -> bool { - if let ItemKind::Struct(_, data, _) = &item.kind + if let ItemKind::Struct(_, _, data) = &item.kind && let Some(last_field) = data.fields().last() && let field_ty = cx.tcx.normalize_erasing_regions( cx.typing_env(), |
