summaryrefslogtreecommitdiffstats
path: root/src/librustc_mir/borrow_check/mod.rs
diff options
context:
space:
mode:
authorgaurikholkar <f2013002@goa.bits-pilani.ac.in>2018-04-07 14:36:29 +0530
committergaurikholkar <f2013002@goa.bits-pilani.ac.in>2018-04-07 14:36:29 +0530
commitcbde62c2cc5cfcbbb39bfc1e3ef61016a1693298 (patch)
tree8c51a83bcaa54bdb79db45311d4cadfd4a574a38 /src/librustc_mir/borrow_check/mod.rs
parentmodify the error message- CR Comments (diff)
downloadgrust-cbde62c2cc5cfcbbb39bfc1e3ef61016a1693298.tar.gz
grust-cbde62c2cc5cfcbbb39bfc1e3ef61016a1693298.tar.bz2
grust-cbde62c2cc5cfcbbb39bfc1e3ef61016a1693298.tar.xz
fix tidy errors
Diffstat (limited to 'src/librustc_mir/borrow_check/mod.rs')
-rw-r--r--src/librustc_mir/borrow_check/mod.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index db7427ddae..e3714802e2 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -1578,14 +1578,10 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1578 Reservation(WriteKind::Mutate) | Write(WriteKind::Mutate) => { 1578 Reservation(WriteKind::Mutate) | Write(WriteKind::Mutate) => {
1579 if let Err(place_err) = self.is_mutable(place, is_local_mutation_allowed) { 1579 if let Err(place_err) = self.is_mutable(place, is_local_mutation_allowed) {
1580 error_reported = true; 1580 error_reported = true;
1581
1582 let mut err_info = None; 1581 let mut err_info = None;
1583
1584 match *place_err { 1582 match *place_err {
1585
1586 Place::Projection(box Projection { 1583 Place::Projection(box Projection {
1587 ref base, elem:ProjectionElem::Deref}) => { 1584 ref base, elem:ProjectionElem::Deref}) => {
1588
1589 match *base { 1585 match *base {
1590 Place::Local(local) => { 1586 Place::Local(local) => {
1591 let locations = self.mir.find_assignments(local); 1587 let locations = self.mir.find_assignments(local);
@@ -1594,8 +1590,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1594 self.get_secondary_err_msg(base) 1590 self.get_secondary_err_msg(base)
1595 } else { 1591 } else {
1596 self.get_default_err_msg(place) 1592 self.get_default_err_msg(place)
1597 }; 1593 };
1598
1599 err_info = Some(( 1594 err_info = Some((
1600 self.mir.source_info(locations[0]).span, 1595 self.mir.source_info(locations[0]).span,
1601 "consider changing this to be a \ 1596 "consider changing this to be a \