about summary refs log tree commit diff
path: root/src/librustc_borrowck
diff options
context:
space:
mode:
authortrixnz <mtatrix@gmail.com>2016-08-05 19:53:14 +0200
committertrixnz <mtatrix@gmail.com>2016-08-05 19:53:14 +0200
commit7eca647e5ae5bef69999c41216e7a8508758d67a (patch)
tree038c0e397afa77204379cd539d805775db22ad6b /src/librustc_borrowck
parent4c02363852e6ce41cf2da1b43a32cb7780a9b067 (diff)
downloadrust-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.rs5
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), \