summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/borrowck/borrowck-reborrow-from-mut.stderr (renamed from src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr)7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr b/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
index 284cab296..d9590e446 100644
--- a/src/test/ui/borrowck/borrowck-reborrow-from-mut.stderr
+++ b/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
@@ -105,10 +105,13 @@ LL | use_imm(_bar1);
error[E0596]: cannot borrow `foo.bar1` as mutable, as it is behind a `&` reference
--> $DIR/borrowck-reborrow-from-mut.rs:88:17
|
-LL | fn borrow_mut_from_imm(foo: &Foo) {
- | ---- help: consider changing this to be a mutable reference: `&mut Foo`
LL | let _bar1 = &mut foo.bar1;
| ^^^^^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be borrowed as mutable
+ |
+help: consider changing this to be a mutable reference
+ |
+LL | fn borrow_mut_from_imm(foo: &mut Foo) {
+ | ~~~~~~~~
error: aborting due to 11 previous errors