@@ -641,9 +641,7 @@ fn encode_ty<'tcx>(
641
641
}
642
642
643
643
// Function types
644
- ty:: FnDef ( def_id, args)
645
- | ty:: Closure ( def_id, args)
646
- | ty:: CoroutineClosure ( def_id, args) => {
644
+ ty:: FnDef ( def_id, args) | ty:: Closure ( def_id, args) => {
647
645
// u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
648
646
// as vendor extended type.
649
647
let mut s = String :: new ( ) ;
@@ -654,6 +652,18 @@ fn encode_ty<'tcx>(
654
652
typeid. push_str ( & s) ;
655
653
}
656
654
655
+ ty:: CoroutineClosure ( def_id, args) => {
656
+ // u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
657
+ // as vendor extended type.
658
+ let mut s = String :: new ( ) ;
659
+ let name = encode_ty_name ( tcx, * def_id) ;
660
+ let _ = write ! ( s, "u{}{}" , name. len( ) , & name) ;
661
+ let parent_args = tcx. mk_args ( args. as_coroutine_closure ( ) . parent_args ( ) ) ;
662
+ s. push_str ( & encode_args ( tcx, parent_args, dict, options) ) ;
663
+ compress ( dict, DictKey :: Ty ( ty, TyQ :: None ) , & mut s) ;
664
+ typeid. push_str ( & s) ;
665
+ }
666
+
657
667
ty:: Coroutine ( def_id, args, ..) => {
658
668
// u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
659
669
// as vendor extended type.
0 commit comments