@@ -641,9 +641,7 @@ fn encode_ty<'tcx>(
641641 }
642642
643643 // 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) => {
647645 // u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
648646 // as vendor extended type.
649647 let mut s = String :: new ( ) ;
@@ -653,6 +651,17 @@ fn encode_ty<'tcx>(
653651 compress ( dict, DictKey :: Ty ( ty, TyQ :: None ) , & mut s) ;
654652 typeid. push_str ( & s) ;
655653 }
654+ ty:: CoroutineClosure ( def_id, args) => {
655+ // u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
656+ // as vendor extended type.
657+ let mut s = String :: new ( ) ;
658+ let name = encode_ty_name ( tcx, * def_id) ;
659+ let _ = write ! ( s, "u{}{}" , name. len( ) , & name) ;
660+ let parent_args = tcx. mk_args ( args. as_coroutine_closure ( ) . parent_args ( ) ) ;
661+ s. push_str ( & encode_args ( tcx, parent_args, dict, options) ) ;
662+ compress ( dict, DictKey :: Ty ( ty, TyQ :: None ) , & mut s) ;
663+ typeid. push_str ( & s) ;
664+ }
656665
657666 ty:: Coroutine ( def_id, args, ..) => {
658667 // u<length><name>[I<element-type1..element-typeN>E], where <element-type> is <subst>,
0 commit comments