Improve instrumentation for the bug reported during fn report_borrowed_value_does_not_live_long_enough.

This commit is contained in:
Felix S. Klock II 2018-03-05 16:55:27 +01:00
parent f67c683950
commit 1c3fd02a4c

View File

@ -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);
}
}
}