From 1c3fd02a4cf1769988ea3f91da54e3c1cacdd9ef Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Mon, 5 Mar 2018 16:55:27 +0100 Subject: [PATCH] Improve instrumentation for the bug reported during `fn report_borrowed_value_does_not_live_long_enough`. --- src/librustc_mir/borrow_check/error_reporting.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librustc_mir/borrow_check/error_reporting.rs b/src/librustc_mir/borrow_check/error_reporting.rs index 3dc5a7a8490..db2e078586e 100644 --- a/src/librustc_mir/borrow_check/error_reporting.rs +++ b/src/librustc_mir/borrow_check/error_reporting.rs @@ -471,7 +471,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> { | (RegionKind::ReClosureBound(_), _) | (RegionKind::ReCanonical(_), _) | (RegionKind::ReErased, _) => { - span_bug!(drop_span, "region does not make sense in this context"); + span_bug!(drop_span, "region {:?} does not make sense in this context", + borrow.region); } } }