File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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>> {
774774 ( present_variants. next ( ) , present_variants. next ( ) )
775775 } ;
776776 let present_first = match present_first {
777- present_first @ Some ( _ ) => present_first,
777+ Some ( present_first ) => present_first,
778778 // Uninhabited because it has no variants, or only absent ones.
779779 None if def. is_enum ( ) => return tcx. layout_raw ( param_env. and ( tcx. types . never ) ) ,
780780 // If it's a struct, still compute a layout so that we can still compute the
781781 // field offsets.
782- None => Some ( VariantIdx :: new ( 0 ) ) ,
782+ None => VariantIdx :: new ( 0 ) ,
783783 } ;
784784
785785 let is_struct = !def. is_enum ( ) ||
@@ -791,7 +791,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
791791 // Struct, or univariant enum equivalent to a struct.
792792 // (Typechecking will reject discriminant-sizing attrs.)
793793
794- let v = present_first. unwrap ( ) ;
794+ let v = present_first;
795795 let kind = if def. is_enum ( ) || variants[ v] . is_empty ( ) {
796796 StructKind :: AlwaysSized
797797 } else {
You can’t perform that action at this time.
0 commit comments