@@ -59,7 +59,7 @@ pub use self::Note::*;
59
59
use self :: Aliasability :: * ;
60
60
61
61
use crate :: middle:: region;
62
- use crate :: hir:: def_id:: { DefId , LocalDefId } ;
62
+ use crate :: hir:: def_id:: DefId ;
63
63
use crate :: hir:: Node ;
64
64
use crate :: infer:: InferCtxt ;
65
65
use crate :: hir:: def:: { CtorOf , Res , DefKind , CtorKind } ;
@@ -723,7 +723,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
723
723
724
724
let closure_expr_def_id = self . body_owner ;
725
725
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 ( ) ,
727
727
) ;
728
728
let ty = self . node_ty ( fn_hir_id) ?;
729
729
let kind = match ty. kind {
@@ -747,7 +747,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
747
747
748
748
let upvar_id = ty:: UpvarId {
749
749
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 ( ) ,
751
751
} ;
752
752
753
753
let var_ty = self . node_ty ( var_id) ?;
0 commit comments