summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-102972.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/suggestions/issue-102972.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 '')
-rw-r--r--tests/ui/suggestions/issue-102972.stderr9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/ui/suggestions/issue-102972.stderr b/tests/ui/suggestions/issue-102972.stderr
index 03f9dbb6c..3303d6bbc 100644
--- a/tests/ui/suggestions/issue-102972.stderr
+++ b/tests/ui/suggestions/issue-102972.stderr
@@ -7,10 +7,7 @@ LL | for _c in chars.by_ref() {
| first mutable borrow occurs here
| first borrow later used here
LL | chars.next();
- | ^^^^^^^^^^^^ second mutable borrow occurs here
- |
- = note: a for loop advances the iterator for you, the result is stored in `_c`.
- = help: if you want to call `next` on a iterator within the loop, consider using `while let`.
+ | ^^^^^ second mutable borrow occurs here
error[E0382]: borrow of moved value: `iter`
--> $DIR/issue-102972.rs:12:9
@@ -20,10 +17,8 @@ LL | let mut iter = v.iter();
LL | for _i in iter {
| ---- `iter` moved due to this implicit call to `.into_iter()`
LL | iter.next();
- | ^^^^^^^^^^^ value borrowed here after move
+ | ^^^^ value borrowed here after move
|
- = note: a for loop advances the iterator for you, the result is stored in `_i`.
- = help: if you want to call `next` on a iterator within the loop, consider using `while let`.
note: `into_iter` takes ownership of the receiver `self`, which moves `iter`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL