@@ -109,7 +109,7 @@ macro_rules! ignore_err {
109109
110110impl < ' a , ' tcx > FnCtxt < ' a , ' tcx > {
111111 pub fn regionck_expr ( & self , body : & ' tcx hir:: Body < ' tcx > ) {
112- let subject = self . tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
112+ let subject = self . tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) . to_def_id ( ) ;
113113 let id = body. value . hir_id ;
114114 let mut rcx =
115115 RegionCtxt :: new ( self , RepeatingScope ( id) , id, Subject ( subject) , self . param_env ) ;
@@ -154,7 +154,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
154154 /// constraints to add.
155155 pub fn regionck_fn ( & self , fn_id : hir:: HirId , body : & ' tcx hir:: Body < ' tcx > ) {
156156 debug ! ( "regionck_fn(id={})" , fn_id) ;
157- let subject = self . tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
157+ let subject = self . tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) . to_def_id ( ) ;
158158 let hir_id = body. value . hir_id ;
159159 let mut rcx =
160160 RegionCtxt :: new ( self , RepeatingScope ( hir_id) , hir_id, Subject ( subject) , self . param_env ) ;
@@ -290,7 +290,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
290290
291291 let body_id = body. id ( ) ;
292292 self . body_id = body_id. hir_id ;
293- self . body_owner = self . tcx . hir ( ) . body_owner_def_id ( body_id) ;
293+ self . body_owner = self . tcx . hir ( ) . body_owner_def_id ( body_id) . to_def_id ( ) ;
294294
295295 let call_site =
296296 region:: Scope { id : body. value . hir_id . local_id , data : region:: ScopeData :: CallSite } ;
0 commit comments