From 970fb1a77f31e71e16871d22547243f1c98e6d66 Mon Sep 17 00:00:00 2001 From: David Wood Date: Sat, 27 Jan 2018 17:16:13 +0000 Subject: [PATCH] Added logging for error suppression. --- src/librustc_mir/borrow_check/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index 6b84abbe266f..95dd8dd48a0b 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -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, @@ -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)); }