@@ -99,14 +99,14 @@ fn uncached_gcc_type<'gcc, 'tcx>(
99
99
if !cx. sess ( ) . fewer_names ( ) =>
100
100
{
101
101
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 ) } ) =
103
103
( layout. ty . kind ( ) , & layout. variants )
104
104
{
105
105
if def. is_enum ( ) && !def. variants ( ) . is_empty ( ) {
106
106
write ! ( & mut name, "::{}" , def. variant( index) . name) . unwrap ( ) ;
107
107
}
108
108
}
109
- if let ( & ty:: Coroutine ( _, _) , & Variants :: Single { index } ) =
109
+ if let ( & ty:: Coroutine ( _, _) , & Variants :: Single { index : Some ( index ) } ) =
110
110
( layout. ty . kind ( ) , & layout. variants )
111
111
{
112
112
write ! ( & mut name, "::{}" , ty:: CoroutineArgs :: variant_name( index) ) . unwrap ( ) ;
@@ -230,7 +230,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
230
230
231
231
// Check the cache.
232
232
let variant_index = match self . variants {
233
- Variants :: Single { index } => Some ( index) ,
233
+ Variants :: Single { index } => index,
234
234
_ => None ,
235
235
} ;
236
236
let cached_type = cx. types . borrow ( ) . get ( & ( self . ty , variant_index) ) . cloned ( ) ;
0 commit comments