Skip to content

Commit

Permalink
Added logging for error suppression.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtwco committed Jan 27, 2018
1 parent f92d679 commit 970fb1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
}

if self.access_place_error_reported.contains(&(place_span.0.clone(), place_span.1)) {
debug!("suppressing access_place error for {:?}", place_span);
debug!("access_place: suppressing error place_span=`{:?}` kind=`{:?}`",
place_span, kind);
return AccessErrorsReported {
mutability_error: false,
conflict_error: true,
Expand All @@ -748,6 +749,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
self.check_access_for_conflict(context, place_span, sd, rw, flow_state);

if conflict_error || mutability_error {
debug!("access_place: logging error place_span=`{:?}` kind=`{:?}`",
place_span, kind);
self.access_place_error_reported.insert((place_span.0.clone(), place_span.1));
}

Expand Down

0 comments on commit 970fb1a

Please # to comment.