Skip to content

Commit 1c3fd02

Browse files
committed
Improve instrumentation for the bug reported during fn report_borrowed_value_does_not_live_long_enough.
1 parent f67c683 commit 1c3fd02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc_mir/borrow_check/error_reporting.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
471471
| (RegionKind::ReClosureBound(_), _)
472472
| (RegionKind::ReCanonical(_), _)
473473
| (RegionKind::ReErased, _) => {
474-
span_bug!(drop_span, "region does not make sense in this context");
474+
span_bug!(drop_span, "region {:?} does not make sense in this context",
475+
borrow.region);
475476
}
476477
}
477478
}

0 commit comments

Comments
 (0)