From cd6862283ee603432f509510c53f35bda12e3a5a Mon Sep 17 00:00:00 2001 From: Nathaniel Hamovitz <18648574+nhamovitz@users.noreply.github.com> Date: Mon, 18 Oct 2021 03:04:50 -0700 Subject: [PATCH] Tidy imports --- .../src/trailing_zero_sized_array_without_repr_c.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/trailing_zero_sized_array_without_repr_c.rs b/clippy_lints/src/trailing_zero_sized_array_without_repr_c.rs index 9373551db159..a759fff9cfcb 100644 --- a/clippy_lints/src/trailing_zero_sized_array_without_repr_c.rs +++ b/clippy_lints/src/trailing_zero_sized_array_without_repr_c.rs @@ -1,7 +1,7 @@ -use clippy_utils::consts::{constant, miri_to_const, ConstEvalLateContext, Constant}; use clippy_utils::diagnostics::span_lint_and_help; use rustc_ast::Attribute; -use rustc_hir::{Item, ItemKind, VariantData}; +use rustc_hir::VariantData; +use rustc_hir::{Item, ItemKind}; use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::dep_graph::DepContext; use rustc_middle::ty::Const; @@ -65,8 +65,8 @@ impl<'tcx> LateLintPass<'tcx> for TrailingZeroSizedArrayWithoutReprC { } fn is_struct_with_trailing_zero_sized_array(cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) -> bool { - // TODO: when finalized, replace with an `if_chain`. I have it like this because my rust-analyzer doesn't work when it's an `if_chain` - // First check if last field is an array + // TODO: when finalized, replace with an `if_chain`. I have it like this because my rust-analyzer + // doesn't work when it's an `if_chain` First check if last field is an array if let ItemKind::Struct(data, _) = &item.kind { let field_defs = data.fields(); if let Some(last_field) = field_defs.last() {