summary refs log tree commit diff
path: root/src/test/ui/vec
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2018-11-20 17:48:16 -0300
committerSantiago Pastorino <spastorino@gmail.com>2019-02-20 12:15:08 -0300
commit801c3f060fc3bf25a730d89aa0b80da4493f3584 (patch)
tree09db3c92d34781698651bbf968f89c4e4af5bfcc /src/test/ui/vec
parentcbc865defd0b897ec9befafd4a1895bce58e3cf4 (diff)
downloadrust-801c3f060fc3bf25a730d89aa0b80da4493f3584.tar.gz
rust-801c3f060fc3bf25a730d89aa0b80da4493f3584.zip
Fix erroneous loop diagnostic in nll
This commit fixes the logic of detecting when a use happen in a later
iteration of where a borrow was defined

Fixes #53773
Diffstat (limited to 'src/test/ui/vec')
-rw-r--r--src/test/ui/vec/vec-mut-iter-borrow.nll.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr
index 73cddd8d680..c77be26f019 100644
--- a/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr
+++ b/src/test/ui/vec/vec-mut-iter-borrow.nll.stderr
@@ -5,7 +5,7 @@ LL |     for x in &mut xs {
    |              -------
    |              |
    |              first mutable borrow occurs here
-   |              first borrow used here, in later iteration of loop
+   |              first borrow later used here
 LL |         xs.push(1) //~ ERROR cannot borrow `xs`
    |         ^^ second mutable borrow occurs here