File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -2379,18 +2379,18 @@ impl ToRustTy for TemplateInstantiation {
2379
2379
}
2380
2380
}
2381
2381
2382
- let decl_params = if let Some ( params ) =
2383
- decl . self_template_params ( ctx ) {
2384
- params
2385
- } else {
2386
- // This can happen if we generated an opaque type for a
2387
- // partial template specialization, in which case we just
2388
- // use the opaque type's layout. If we don't have a layout,
2389
- // we cross our fingers and hope for the best :-/
2390
- debug_assert ! ( ctx . resolve_type_through_type_refs ( decl )
2391
- . is_opaque ( ) ) ;
2392
- let layout = self_ty . layout ( ctx ) . unwrap_or ( Layout :: zero ( ) ) ;
2393
- return BlobTyBuilder :: new ( layout ) . build ( ) ;
2382
+ let decl_params = match decl . self_template_params ( ctx ) {
2383
+ Some ( params ) => params ,
2384
+ None => {
2385
+ // This can happen if we generated an opaque type for a
2386
+ // partial template specialization, in which case we just
2387
+ // use the opaque type's layout. If we don't have a layout,
2388
+ // we cross our fingers and hope for the best :-/
2389
+ debug_assert ! ( ctx . resolve_type_through_type_refs ( decl )
2390
+ . is_opaque ( ) ) ;
2391
+ let layout = self_ty . layout ( ctx ) . unwrap_or ( Layout :: zero ( ) ) ;
2392
+ return BlobTyBuilder :: new ( layout ) . build ( ) ;
2393
+ }
2394
2394
} ;
2395
2395
2396
2396
// TODO: If the decl type is a template class/struct
You can’t perform that action at this time.
0 commit comments