@@ -59,7 +59,7 @@ pub use self::Note::*;
5959use self :: Aliasability :: * ;
6060
6161use crate :: middle:: region;
62- use crate :: hir:: def_id:: { DefId , LocalDefId } ;
62+ use crate :: hir:: def_id:: DefId ;
6363use crate :: hir:: Node ;
6464use crate :: infer:: InferCtxt ;
6565use crate :: hir:: def:: { CtorOf , Res , DefKind , CtorKind } ;
@@ -723,7 +723,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
723723
724724 let closure_expr_def_id = self . body_owner ;
725725 let fn_hir_id = self . tcx . hir ( ) . local_def_id_to_hir_id (
726- LocalDefId :: from_def_id ( closure_expr_def_id) ,
726+ closure_expr_def_id. assert_local ( ) ,
727727 ) ;
728728 let ty = self . node_ty ( fn_hir_id) ?;
729729 let kind = match ty. kind {
@@ -747,7 +747,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
747747
748748 let upvar_id = ty:: UpvarId {
749749 var_path : ty:: UpvarPath { hir_id : var_id } ,
750- closure_expr_id : closure_expr_def_id. to_local ( ) ,
750+ closure_expr_id : closure_expr_def_id. assert_local ( ) ,
751751 } ;
752752
753753 let var_ty = self . node_ty ( var_id) ?;
0 commit comments