@@ -34,7 +34,7 @@ use rustc::middle::mem_categorization::Categorization;
34
34
use rustc:: middle:: mem_categorization:: ImmutabilityBlame ;
35
35
use rustc:: middle:: region:: { self , RegionMaps } ;
36
36
use rustc:: middle:: free_region:: RegionRelations ;
37
- use rustc:: ty:: { self , TyCtxt } ;
37
+ use rustc:: ty:: { self , BorrowCheckResult , TyCtxt } ;
38
38
use rustc:: ty:: maps:: Providers ;
39
39
40
40
use rustc_mir:: util:: borrowck_errors:: { BorrowckErrors , Origin } ;
@@ -80,7 +80,7 @@ pub struct AnalysisData<'a, 'tcx: 'a> {
80
80
pub move_data : move_data:: FlowedMoveData < ' a , ' tcx > ,
81
81
}
82
82
83
- fn borrowck < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , owner_def_id : DefId ) {
83
+ fn borrowck < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , owner_def_id : DefId ) -> BorrowCheckResult {
84
84
debug ! ( "borrowck(body_owner_def_id={:?})" , owner_def_id) ;
85
85
86
86
let owner_id = tcx. hir . as_local_node_id ( owner_def_id) . unwrap ( ) ;
@@ -128,6 +128,8 @@ fn borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, owner_def_id: DefId) {
128
128
{
129
129
check_loans:: check_loans ( bccx, & loan_dfcx, & flowed_moves, & all_loans, body) ;
130
130
}
131
+
132
+ check_loans:: check_loans ( bccx, & loan_dfcx, & flowed_moves, & all_loans, body)
131
133
}
132
134
133
135
fn build_borrowck_dataflow_data < ' a , ' c , ' tcx , F > ( this : & mut BorrowckCtxt < ' a , ' tcx > ,
@@ -217,6 +219,8 @@ pub struct BorrowckCtxt<'a, 'tcx: 'a> {
217
219
218
220
region_maps : Rc < RegionMaps > ,
219
221
222
+ borrowck_result : Rc < BorrowCheckResult > ,
223
+
220
224
owner_def_id : DefId ,
221
225
}
222
226
0 commit comments