diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-03-05 16:55:27 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-05-03 14:03:16 +0200 |
| commit | 1c3fd02a4cf1769988ea3f91da54e3c1cacdd9ef (patch) | |
| tree | 1e70de2382402092ec03739dabf7ec3dcfe8a6d3 | |
| parent | f67c683950001615805638e2d2b4d1a82347d3c0 (diff) | |
| download | rust-1c3fd02a4cf1769988ea3f91da54e3c1cacdd9ef.tar.gz rust-1c3fd02a4cf1769988ea3f91da54e3c1cacdd9ef.zip | |
Improve instrumentation for the bug reported during `fn report_borrowed_value_does_not_live_long_enough`.
| -rw-r--r-- | src/librustc_mir/borrow_check/error_reporting.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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); } } } |
