@@ -1045,7 +1045,7 @@ fn should_encode_mir(
10451045        | DefKind :: Static ( ..) 
10461046        | DefKind :: Const  => ( true ,  false ) , 
10471047        // Coroutines require optimized MIR to compute layout. 
1048-         DefKind :: Closure  if  tcx. is_coroutine ( def_id. to_def_id ( ) )  => ( false ,  true ) , 
1048+         DefKind :: Closure  if  tcx. is_coroutine ( def_id)  => ( false ,  true ) , 
10491049        // Full-fledged functions + closures 
10501050        DefKind :: AssocFn  | DefKind :: Fn  | DefKind :: Closure  => { 
10511051            let  generics = tcx. generics_of ( def_id) ; 
@@ -1345,7 +1345,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
13451345        for  local_id in  tcx. iter_local_def_id ( )  { 
13461346            let  def_id = local_id. to_def_id ( ) ; 
13471347            let  def_kind = tcx. def_kind ( local_id) ; 
1348-             let  is_coroutine = def_kind == DefKind :: Closure  && tcx. is_coroutine ( def_id ) ; 
1348+             let  is_coroutine = def_kind == DefKind :: Closure  && tcx. is_coroutine ( local_id ) ; 
13491349            self . tables . def_kind . set_some ( def_id. index ,  def_kind) ; 
13501350            if  should_encode_span ( def_kind)  { 
13511351                let  def_span = tcx. def_span ( local_id) ; 
@@ -1627,7 +1627,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16271627                record ! ( self . tables. closure_saved_names_of_captured_variables[ def_id. to_def_id( ) ] 
16281628                    <- tcx. closure_saved_names_of_captured_variables( def_id) ) ; 
16291629
1630-                 if  self . tcx . is_coroutine ( def_id. to_def_id ( ) ) 
1630+                 if  self . tcx . is_coroutine ( def_id) 
16311631                    && let  Some ( witnesses)  = tcx. mir_coroutine_witnesses ( def_id) 
16321632                { 
16331633                    record ! ( self . tables. mir_coroutine_witnesses[ def_id. to_def_id( ) ]  <- witnesses) ; 
@@ -1654,7 +1654,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
16541654            } 
16551655            record ! ( self . tables. promoted_mir[ def_id. to_def_id( ) ]  <- tcx. promoted_mir( def_id) ) ; 
16561656
1657-             if  self . tcx . is_coroutine ( def_id. to_def_id ( ) ) 
1657+             if  self . tcx . is_coroutine ( def_id) 
16581658                && let  Some ( witnesses)  = tcx. mir_coroutine_witnesses ( def_id) 
16591659            { 
16601660                record ! ( self . tables. mir_coroutine_witnesses[ def_id. to_def_id( ) ]  <- witnesses) ; 
0 commit comments