File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -774,12 +774,12 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
774
774
( present_variants. next ( ) , present_variants. next ( ) )
775
775
} ;
776
776
let present_first = match present_first {
777
- present_first @ Some ( _ ) => present_first,
777
+ Some ( present_first ) => present_first,
778
778
// Uninhabited because it has no variants, or only absent ones.
779
779
None if def. is_enum ( ) => return tcx. layout_raw ( param_env. and ( tcx. types . never ) ) ,
780
780
// If it's a struct, still compute a layout so that we can still compute the
781
781
// field offsets.
782
- None => Some ( VariantIdx :: new ( 0 ) ) ,
782
+ None => VariantIdx :: new ( 0 ) ,
783
783
} ;
784
784
785
785
let is_struct = !def. is_enum ( ) ||
@@ -791,7 +791,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
791
791
// Struct, or univariant enum equivalent to a struct.
792
792
// (Typechecking will reject discriminant-sizing attrs.)
793
793
794
- let v = present_first. unwrap ( ) ;
794
+ let v = present_first;
795
795
let kind = if def. is_enum ( ) || variants[ v] . is_empty ( ) {
796
796
StructKind :: AlwaysSized
797
797
} else {
You can’t perform that action at this time.
0 commit comments