about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2018-09-29 11:47:47 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2018-10-03 20:32:38 +0100
commitbc4f9b848d745022ededdfaa3099158a766e8faa (patch)
tree09130b6605ea1381a5ae0755323f5d7be6f6e120 /src/test/ui/error-codes
parentcc09cb5e5ad8c072441f2156aa9bcd1484e55b1c (diff)
downloadrust-bc4f9b848d745022ededdfaa3099158a766e8faa.tar.gz
rust-bc4f9b848d745022ededdfaa3099158a766e8faa.zip
Clearer later use messages for calls
Give a special message when the later use is from a call. Use the span
of the callee instead of the whole expression. For conflicting borrow
messages say that the later use is of the first borrow.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0499.nll.stderr2
-rw-r--r--src/test/ui/error-codes/E0502.nll.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0499.nll.stderr b/src/test/ui/error-codes/E0499.nll.stderr
index 89801693b76..39815ac6f17 100644
--- a/src/test/ui/error-codes/E0499.nll.stderr
+++ b/src/test/ui/error-codes/E0499.nll.stderr
@@ -7,7 +7,7 @@ LL |     let mut a = &mut i; //~ ERROR E0499
    |                 ^^^^^^ second mutable borrow occurs here
 LL |     a.use_mut();
 LL |     x.use_mut();
-   |     - borrow later used here
+   |     - first borrow later used here
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0502.nll.stderr b/src/test/ui/error-codes/E0502.nll.stderr
index 565f73616b9..ce082710246 100644
--- a/src/test/ui/error-codes/E0502.nll.stderr
+++ b/src/test/ui/error-codes/E0502.nll.stderr
@@ -6,7 +6,7 @@ LL |     let ref y = a;
 LL |     bar(a); //~ ERROR E0502
    |     ^^^^^^ mutable borrow occurs here
 LL |     y.use_ref();
-   |     - borrow later used here
+   |     - immutable borrow later used here
 
 error: aborting due to previous error