X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_borrowck%2Fborrowck%2Fgather_loans%2Fmod.rs;h=4ff603b7eae01441e9f26a0e646b92a72c6aa12a;hb=6f4ab9458a7ad06c8ce630604f533c8c0c0acef4;hp=35af83c8ae23a2e46bae33a8e090692aca7a5344;hpb=a3a59a1711f596b5912e90f1f49487d80a0b5775;p=rust.git diff --git a/src/librustc_borrowck/borrowck/gather_loans/mod.rs b/src/librustc_borrowck/borrowck/gather_loans/mod.rs index 35af83c8ae2..4ff603b7eae 100644 --- a/src/librustc_borrowck/borrowck/gather_loans/mod.rs +++ b/src/librustc_borrowck/borrowck/gather_loans/mod.rs @@ -41,7 +41,7 @@ pub fn gather_loans_in_fn<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>, let def_id = bccx.tcx.hir.body_owner_def_id(body); let param_env = bccx.tcx.param_env(def_id); let mut glcx = GatherLoanCtxt { - bccx: bccx, + bccx, all_loans: Vec::new(), item_ub: region::CodeExtent::Misc(body.node_id), move_data: MoveData::new(), @@ -230,8 +230,8 @@ fn check_mutability<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>, // Only mutable data can be lent as mutable. if !cmt.mutbl.is_mutable() { Err(bccx.report(BckError { span: borrow_span, - cause: cause, - cmt: cmt, + cause, + cmt, code: err_mutbl })) } else { Ok(()) @@ -389,13 +389,13 @@ fn guarantee_valid(&mut self, Loan { index: self.all_loans.len(), - loan_path: loan_path, + loan_path, kind: req_kind, - gen_scope: gen_scope, - kill_scope: kill_scope, + gen_scope, + kill_scope, span: borrow_span, - restricted_paths: restricted_paths, - cause: cause, + restricted_paths, + cause, } } }; @@ -423,13 +423,13 @@ fn guarantee_valid(&mut self, // let all_loans = &mut *self.all_loans; // FIXME(#5074) // Loan { // index: all_loans.len(), - // loan_path: loan_path, - // cmt: cmt, + // loan_path, + // cmt, // mutbl: ConstMutability, // gen_scope: borrow_id, - // kill_scope: kill_scope, + // kill_scope, // span: borrow_span, - // restrictions: restrictions + // restrictions, // } // } }