diff options
| author | trixnz <mtatrix@gmail.com> | 2016-08-05 19:53:14 +0200 |
|---|---|---|
| committer | trixnz <mtatrix@gmail.com> | 2016-08-05 19:53:14 +0200 |
| commit | 7eca647e5ae5bef69999c41216e7a8508758d67a (patch) | |
| tree | 038c0e397afa77204379cd539d805775db22ad6b /src/librustc_borrowck | |
| parent | 4c02363852e6ce41cf2da1b43a32cb7780a9b067 (diff) | |
| download | rust-7eca647e5ae5bef69999c41216e7a8508758d67a.tar.gz rust-7eca647e5ae5bef69999c41216e7a8508758d67a.zip | |
Update error format for E0373
Diffstat (limited to 'src/librustc_borrowck')
| -rw-r--r-- | src/librustc_borrowck/borrowck/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs index 1fe47cd4853..9115fd42be8 100644 --- a/src/librustc_borrowck/borrowck/mod.rs +++ b/src/librustc_borrowck/borrowck/mod.rs @@ -942,9 +942,12 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> { but it borrows {}, \ which is owned by the current function", cmt_path_or_string) - .span_note(capture_span, + .span_label(capture_span, &format!("{} is borrowed here", cmt_path_or_string)) + .span_label(err.span, + &format!("may outlive borrowed value {}", + cmt_path_or_string)) .span_suggestion(err.span, &format!("to force the closure to take ownership of {} \ (and any other referenced variables), \ |
