summaryrefslogtreecommitdiffstats
path: root/src/librustc_mir/borrow_check/mod.rs
diff options
context:
space:
mode:
authorgaurikholkar <f2013002@goa.bits-pilani.ac.in>2018-04-08 22:57:48 +0530
committergaurikholkar <f2013002@goa.bits-pilani.ac.in>2018-04-08 22:57:48 +0530
commit2ad20e8127094bb22d88e2e98012ad4ea20e2d3f (patch)
tree42b374ca54fcae7c53f5216c8c1e0dd0435a63c5 /src/librustc_mir/borrow_check/mod.rs
parentfix tidy errors (diff)
downloadgrust-2ad20e8127094bb22d88e2e98012ad4ea20e2d3f.tar.gz
grust-2ad20e8127094bb22d88e2e98012ad4ea20e2d3f.tar.bz2
grust-2ad20e8127094bb22d88e2e98012ad4ea20e2d3f.tar.xz
tidy fixes
Diffstat (limited to 'src/librustc_mir/borrow_check/mod.rs')
-rw-r--r--src/librustc_mir/borrow_check/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index e3714802e2..3d1d64bb71 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -1576,10 +1576,12 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1576 err.emit(); 1576 err.emit();
1577 }, 1577 },
1578 Reservation(WriteKind::Mutate) | Write(WriteKind::Mutate) => { 1578 Reservation(WriteKind::Mutate) | Write(WriteKind::Mutate) => {
1579
1579 if let Err(place_err) = self.is_mutable(place, is_local_mutation_allowed) { 1580 if let Err(place_err) = self.is_mutable(place, is_local_mutation_allowed) {
1580 error_reported = true; 1581 error_reported = true;
1581 let mut err_info = None; 1582 let mut err_info = None;
1582 match *place_err { 1583 match *place_err {
1584
1583 Place::Projection(box Projection { 1585 Place::Projection(box Projection {
1584 ref base, elem:ProjectionElem::Deref}) => { 1586 ref base, elem:ProjectionElem::Deref}) => {
1585 match *base { 1587 match *base {
@@ -1641,9 +1643,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1641 ); 1643 );
1642 } 1644 }
1643 } 1645 }
1644
1645 Activation(..) => {} // permission checks are done at Reservation point. 1646 Activation(..) => {} // permission checks are done at Reservation point.
1646
1647 Read(ReadKind::Borrow(BorrowKind::Unique)) 1647 Read(ReadKind::Borrow(BorrowKind::Unique))
1648 | Read(ReadKind::Borrow(BorrowKind::Mut { .. })) 1648 | Read(ReadKind::Borrow(BorrowKind::Mut { .. }))
1649 | Read(ReadKind::Borrow(BorrowKind::Shared)) 1649 | Read(ReadKind::Borrow(BorrowKind::Shared))