@@ -99,14 +99,14 @@ fn uncached_gcc_type<'gcc, 'tcx>(
9999 if !cx. sess ( ) . fewer_names ( ) =>
100100 {
101101 let mut name = with_no_trimmed_paths ! ( layout. ty. to_string( ) ) ;
102- if let ( & ty:: Adt ( def, _) , & Variants :: Single { index } ) =
102+ if let ( & ty:: Adt ( def, _) , & Variants :: Single { index : Some ( index ) } ) =
103103 ( layout. ty . kind ( ) , & layout. variants )
104104 {
105105 if def. is_enum ( ) && !def. variants ( ) . is_empty ( ) {
106106 write ! ( & mut name, "::{}" , def. variant( index) . name) . unwrap ( ) ;
107107 }
108108 }
109- if let ( & ty:: Coroutine ( _, _) , & Variants :: Single { index } ) =
109+ if let ( & ty:: Coroutine ( _, _) , & Variants :: Single { index : Some ( index ) } ) =
110110 ( layout. ty . kind ( ) , & layout. variants )
111111 {
112112 write ! ( & mut name, "::{}" , ty:: CoroutineArgs :: variant_name( index) ) . unwrap ( ) ;
@@ -230,7 +230,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
230230
231231 // Check the cache.
232232 let variant_index = match self . variants {
233- Variants :: Single { index } => Some ( index) ,
233+ Variants :: Single { index } => index,
234234 _ => None ,
235235 } ;
236236 let cached_type = cx. types . borrow ( ) . get ( & ( self . ty , variant_index) ) . cloned ( ) ;
0 commit comments