From bc4f9b848d745022ededdfaa3099158a766e8faa Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sat, 29 Sep 2018 11:47:47 +0100 Subject: 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. --- src/test/ui/methods/method-self-arg-2.nll.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/ui/methods') 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 -- cgit 1.4.1-3-g733a5