@@ -591,13 +591,23 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
591
591
fn intrinsic_name ( & self , def : InstanceDef ) -> Option < Symbol > {
592
592
let tables = self . 0 . borrow_mut ( ) ;
593
593
let instance = tables. instances [ def] ;
594
- if !( matches ! ( instance. def, ty:: InstanceDef :: Intrinsic ( ..) )
595
- || matches ! ( instance. def, ty:: InstanceDef :: Item ( ..) ) )
596
- {
597
- return None ;
594
+ match instance. def {
595
+ ty:: InstanceDef :: Intrinsic ( ..) | ty:: InstanceDef :: Item ( ..) => {
596
+ let intrinsic = tables. tcx . intrinsic ( instance. def_id ( ) ) ?;
597
+ Some ( intrinsic. name . to_string ( ) )
598
+ }
599
+ ty:: InstanceDef :: VTableShim ( ..)
600
+ | ty:: InstanceDef :: ReifyShim ( ..)
601
+ | ty:: InstanceDef :: Virtual ( ..)
602
+ | ty:: InstanceDef :: ThreadLocalShim ( ..)
603
+ | ty:: InstanceDef :: ClosureOnceShim { .. }
604
+ | ty:: InstanceDef :: ConstructCoroutineInClosureShim { .. }
605
+ | ty:: InstanceDef :: CoroutineKindShim { .. }
606
+ | ty:: InstanceDef :: DropGlue ( ..)
607
+ | ty:: InstanceDef :: FnPtrShim ( ..)
608
+ | ty:: InstanceDef :: CloneShim ( ..)
609
+ | ty:: InstanceDef :: FnPtrAddrShim ( ..) => None ,
598
610
}
599
- let intrinsic = tables. tcx . intrinsic ( instance. def_id ( ) ) ?;
600
- Some ( intrinsic. name . to_string ( ) )
601
611
}
602
612
603
613
fn ty_layout ( & self , ty : Ty ) -> Result < Layout , Error > {
0 commit comments