Skip to content

Commit 81e321b

Browse files
Nadrierilmark-i-m
authored andcommitted
fixup! Factor out the condition for hiding fields
1 parent 75e732d commit 81e321b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir_build/hair/pattern/_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ use rustc_hir::{HirId, RangeEnd};
242242
use rustc_middle::mir::interpret::{truncate, AllocId, ConstValue, Pointer, Scalar};
243243
use rustc_middle::mir::Field;
244244
use rustc_middle::ty::layout::IntegerExt;
245-
use rustc_middle::ty::{self, Const, Ty, TyCtxt, TypeFoldable, VariantDef};
245+
use rustc_middle::ty::{self, Const, FieldDef, Ty, TyCtxt, TypeFoldable, VariantDef};
246246
use rustc_session::lint;
247247
use rustc_span::{Span, DUMMY_SP};
248248
use rustc_target::abi::{Integer, Size, VariantIdx};
@@ -630,7 +630,7 @@ impl<'a, 'tcx> MatchCheckCtxt<'a, 'tcx> {
630630
field: &FieldDef,
631631
) -> bool {
632632
match adt_ty.kind {
633-
ty::Adt(def, substs) => {
633+
ty::Adt(adt, substs) => {
634634
let is_non_exhaustive = self.is_foreign_non_exhaustive_variant(adt_ty, variant);
635635
let field_ty = field.ty(self.tcx, substs);
636636
let is_visible =

0 commit comments

Comments
 (0)