File tree 1 file changed +14
-9
lines changed 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -3464,18 +3464,23 @@ impl TryToRustTy for Type {
3464
3464
3465
3465
let inner =
3466
3466
inner. into_resolver ( ) . through_type_refs ( ) . resolve ( ctx) ;
3467
+ let is_objc_pointer = if let Some ( ty) = inner. kind ( ) . as_type ( ) {
3468
+ match ty. kind ( ) {
3469
+ TypeKind :: ObjCInterface ( ..) => true ,
3470
+ _ => false ,
3471
+ }
3472
+ } else {
3473
+ false
3474
+ } ;
3467
3475
let inner_ty = inner. expect_type ( ) ;
3468
3476
3469
- let is_objc_pointer = inner. kind ( ) . as_type ( ) . map_or ( false , |ty| {
3470
- match ty. kind ( ) {
3471
- TypeKind :: ObjCInterface ( ..) => {
3472
- true
3473
- } ,
3474
- _ => {
3475
- false
3477
+ let is_objc_pointer =
3478
+ inner. kind ( ) . as_type ( ) . map_or ( false , |ty| {
3479
+ match ty. kind ( ) {
3480
+ TypeKind :: ObjCInterface ( ..) => true ,
3481
+ _ => false ,
3476
3482
}
3477
- }
3478
- } ) ;
3483
+ } ) ;
3479
3484
3480
3485
// Regardless if we can properly represent the inner type, we
3481
3486
// should always generate a proper pointer here, so use
You can’t perform that action at this time.
0 commit comments