summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-loan-rcvr.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/borrowck-loan-rcvr.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/borrowck-loan-rcvr.stderr')
-rw-r--r--tests/ui/borrowck/borrowck-loan-rcvr.stderr18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/ui/borrowck/borrowck-loan-rcvr.stderr b/tests/ui/borrowck/borrowck-loan-rcvr.stderr
index 1d6bd4e2e..317423ecf 100644
--- a/tests/ui/borrowck/borrowck-loan-rcvr.stderr
+++ b/tests/ui/borrowck/borrowck-loan-rcvr.stderr
@@ -1,15 +1,13 @@
error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-loan-rcvr.rs:23:14
|
-LL | p.blockm(|| {
- | - ------ ^^ mutable borrow occurs here
- | | |
- | _____| immutable borrow later used by call
- | |
-LL | | p.x = 10;
- | | --- second borrow occurs due to use of `p` in closure
-LL | | })
- | |______- immutable borrow occurs here
+LL | p.blockm(|| {
+ | - ------ ^^ mutable borrow occurs here
+ | | |
+ | | immutable borrow later used by call
+ | immutable borrow occurs here
+LL | p.x = 10;
+ | --- second borrow occurs due to use of `p` in closure
error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-loan-rcvr.rs:34:5
@@ -17,7 +15,7 @@ error[E0502]: cannot borrow `p` as immutable because it is also borrowed as muta
LL | let l = &mut p;
| ------ mutable borrow occurs here
LL | p.impurem();
- | ^^^^^^^^^^^ immutable borrow occurs here
+ | ^ immutable borrow occurs here
LL |
LL | l.x += 1;
| -------- mutable borrow later used here