summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/suggest-local-var-for-vector.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/borrowck/suggest-local-var-for-vector.stderr
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/borrowck/suggest-local-var-for-vector.stderr')
-rw-r--r--tests/ui/borrowck/suggest-local-var-for-vector.stderr12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/borrowck/suggest-local-var-for-vector.stderr b/tests/ui/borrowck/suggest-local-var-for-vector.stderr
index 615fffcd5..c8d00f7b2 100644
--- a/tests/ui/borrowck/suggest-local-var-for-vector.stderr
+++ b/tests/ui/borrowck/suggest-local-var-for-vector.stderr
@@ -2,11 +2,11 @@ error[E0502]: cannot borrow `vec` as immutable because it is also borrowed as mu
--> $DIR/suggest-local-var-for-vector.rs:3:9
|
LL | vec[vec.len() - 1] = 123;
- | ----^^^^^^^^^-----
- | | |
- | | immutable borrow occurs here
+ | ----^^^-----------
+ | | ||
+ | | |immutable borrow occurs here
+ | | mutable borrow later used here
| mutable borrow occurs here
- | mutable borrow later used here
|
help: try adding a local storing this...
--> $DIR/suggest-local-var-for-vector.rs:3:9
@@ -14,10 +14,10 @@ help: try adding a local storing this...
LL | vec[vec.len() - 1] = 123;
| ^^^^^^^^^
help: ...and then using that local here
- --> $DIR/suggest-local-var-for-vector.rs:3:5
+ --> $DIR/suggest-local-var-for-vector.rs:3:8
|
LL | vec[vec.len() - 1] = 123;
- | ^^^^^^^^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^
error: aborting due to previous error