@@ -500,7 +500,7 @@ impl MetadataBlob {
500500 }
501501}
502502
503- impl < ' tcx > EntryKind < ' tcx > {
503+ impl EntryKind {
504504 fn def_kind ( & self ) -> Option < DefKind > {
505505 Some ( match * self {
506506 EntryKind :: Const ( ..) => DefKind :: Const ,
@@ -614,11 +614,11 @@ impl<'a, 'tcx> CrateMetadata {
614614 self . root . proc_macro_data . and_then ( |data| data. decode ( self ) . find ( |x| * x == id) ) . is_some ( )
615615 }
616616
617- fn maybe_kind ( & self , item_id : DefIndex ) -> Option < EntryKind < ' tcx > > {
617+ fn maybe_kind ( & self , item_id : DefIndex ) -> Option < EntryKind > {
618618 self . root . per_def . kind . get ( self , item_id) . map ( |k| k. decode ( self ) )
619619 }
620620
621- fn kind ( & self , item_id : DefIndex ) -> EntryKind < ' tcx > {
621+ fn kind ( & self , item_id : DefIndex ) -> EntryKind {
622622 assert ! ( !self . is_proc_macro( item_id) ) ;
623623 self . maybe_kind ( item_id) . unwrap_or_else ( || {
624624 bug ! (
@@ -723,7 +723,7 @@ impl<'a, 'tcx> CrateMetadata {
723723 fn get_variant (
724724 & self ,
725725 tcx : TyCtxt < ' tcx > ,
726- kind : & EntryKind < ' _ > ,
726+ kind : & EntryKind ,
727727 index : DefIndex ,
728728 parent_did : DefId ,
729729 ) -> ty:: VariantDef {
@@ -1390,6 +1390,13 @@ impl<'a, 'tcx> CrateMetadata {
13901390 }
13911391 }
13921392
1393+ fn generator_kind ( & self , id : DefIndex ) -> Option < hir:: GeneratorKind > {
1394+ match self . kind ( id) {
1395+ EntryKind :: Generator ( data) => Some ( data. decode ( self ) ) ,
1396+ _ => None ,
1397+ }
1398+ }
1399+
13931400 fn fn_sig ( & self , id : DefIndex , tcx : TyCtxt < ' tcx > ) -> ty:: PolyFnSig < ' tcx > {
13941401 self . root . per_def . fn_sig . get ( self , id) . unwrap ( ) . decode ( ( self , tcx) )
13951402 }
@@ -1499,8 +1506,8 @@ impl<'a, 'tcx> CrateMetadata {
14991506 ) ;
15001507 debug ! (
15011508 "CrateMetaData::imported_source_files alloc \
1502- source_file {:?} original (start_pos {:?} end_pos {:?}) \
1503- translated (start_pos {:?} end_pos {:?})",
1509+ source_file {:?} original (start_pos {:?} end_pos {:?}) \
1510+ translated (start_pos {:?} end_pos {:?})",
15041511 local_version. name,
15051512 start_pos,
15061513 end_pos,
0 commit comments