Skip to content

Commit

Permalink
tidy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurikholkar committed Apr 9, 2018
1 parent 2ad20e8 commit c792d1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1529,11 +1529,11 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {

fn get_primary_err_msg(&self, place:&Place<'tcx>) -> String{
if let Some(name) = self.describe_place(place) {
format!("`{}` is a `&` reference, so the data it refers to cannot be written", name)
format!("`{}` is a `&` reference, so the data it refers to cannot be written", name)
} else {
format!("cannot assign through `&`-reference")
}
}
}

/// Check the permissions for the given place and read or write kind
///
Expand Down Expand Up @@ -1592,7 +1592,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
self.get_secondary_err_msg(base)
} else {
self.get_default_err_msg(place)
};
};
err_info = Some((
self.mir.source_info(locations[0]).span,
"consider changing this to be a \
Expand Down

0 comments on commit c792d1e

Please sign in to comment.