@@ -109,7 +109,7 @@ macro_rules! ignore_err {
109
109
110
110
impl < ' a , ' tcx > FnCtxt < ' a , ' tcx > {
111
111
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 ( ) ;
113
113
let id = body. value . hir_id ;
114
114
let mut rcx =
115
115
RegionCtxt :: new ( self , RepeatingScope ( id) , id, Subject ( subject) , self . param_env ) ;
@@ -154,7 +154,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
154
154
/// constraints to add.
155
155
pub fn regionck_fn ( & self , fn_id : hir:: HirId , body : & ' tcx hir:: Body < ' tcx > ) {
156
156
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 ( ) ;
158
158
let hir_id = body. value . hir_id ;
159
159
let mut rcx =
160
160
RegionCtxt :: new ( self , RepeatingScope ( hir_id) , hir_id, Subject ( subject) , self . param_env ) ;
@@ -290,7 +290,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
290
290
291
291
let body_id = body. id ( ) ;
292
292
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 ( ) ;
294
294
295
295
let call_site =
296
296
region:: Scope { id : body. value . hir_id . local_id , data : region:: ScopeData :: CallSite } ;
0 commit comments