Skip to content

Commit bf76ffe

Browse files
committed
Corrected error output with many labels.
1 parent ce8967a commit bf76ffe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustc_mir/borrow_check.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use rustc_data_structures::indexed_set::{self, IdxSetBuf};
2525
use rustc_data_structures::indexed_vec::{Idx};
2626

2727
use syntax::ast::{self};
28-
use syntax_pos::{DUMMY_SP, Span, MultiSpan};
28+
use syntax_pos::{DUMMY_SP, Span};
2929

3030
use dataflow::{do_dataflow};
3131
use dataflow::{MoveDataParamEnv};
@@ -1525,9 +1525,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
15251525
_ => span
15261526
};
15271527

1528-
let mut err = self.tcx.path_does_not_live_long_enough(proper_span,
1529-
"borrowed value", Origin::Mir);
1530-
err.span = MultiSpan::from_span(proper_span);
1528+
let mut err = self.tcx.path_does_not_live_long_enough(span, "borrowed value", Origin::Mir);
15311529
err.span_label(proper_span, "temporary value created here");
15321530
err.span_label(span, "temporary value dropped here while still borrowed");
15331531
err.note("consider using a `let` binding to increase its lifetime");

0 commit comments

Comments
 (0)