summary refs log tree commit diff
path: root/src/test/ui/methods
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/methods
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/methods')
-rw-r--r--src/test/ui/methods/method-self-arg-2.nll.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/methods/method-self-arg-2.nll.stderr b/src/test/ui/methods/method-self-arg-2.nll.stderr
index f876aa281d1..df2902c0674 100644
--- a/src/test/ui/methods/method-self-arg-2.nll.stderr
+++ b/src/test/ui/methods/method-self-arg-2.nll.stderr
@@ -6,7 +6,7 @@ LL |     let y = &mut x;
 LL |     Foo::bar(&x); //~ERROR cannot borrow `x`
    |              ^^ immutable borrow occurs here
 LL |     y.use_mut();
-   |     - borrow later used here
+   |     - mutable borrow later used here
 
 error[E0499]: cannot borrow `x` as mutable more than once at a time
   --> $DIR/method-self-arg-2.rs:30:14
@@ -16,7 +16,7 @@ LL |     let y = &mut x;
 LL |     Foo::baz(&mut x); //~ERROR cannot borrow `x`
    |              ^^^^^^ second mutable borrow occurs here
 LL |     y.use_mut();
-   |     - borrow later used here
+   |     - first borrow later used here
 
 error: aborting due to 2 previous errors