diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2018-11-20 17:48:16 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2019-02-20 12:15:08 -0300 |
| commit | 801c3f060fc3bf25a730d89aa0b80da4493f3584 (patch) | |
| tree | 09db3c92d34781698651bbf968f89c4e4af5bfcc /src/test/ui/issues | |
| parent | cbc865defd0b897ec9befafd4a1895bce58e3cf4 (diff) | |
| download | rust-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/issues')
| -rw-r--r-- | src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr b/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr index 8332cf1b3a3..d231f621e59 100644 --- a/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr +++ b/src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr @@ -5,7 +5,7 @@ LL | let v: Vec<&str> = line.split_whitespace().collect(); | ^^^^ borrowed value does not live long enough ... LL | acc += cnt2; - | --- borrow used here, in later iteration of loop + | --- borrow later used here ... LL | } | - `line` dropped here while still borrowed |
