]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/for_loop_unfixable.stderr
Rollup merge of #78769 - est31:remove_lifetimes, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / for_loop_unfixable.stderr
index 1da8e0f3588d79fd3defd9429ff4bcd91055b61d..1c9287b6acbb328d5b2335a797acb4a1c903a478 100644 (file)
@@ -1,9 +1,10 @@
-error[E0425]: cannot find function `f` in this scope
-  --> $DIR/for_loop_unfixable.rs:36:12
+error: you are iterating over `Iterator::next()` which is an Option; this will compile but is probably not what you want
+  --> $DIR/for_loop_unfixable.rs:21:15
    |
-LL |         if f(&vec[i], &vec[i]) {
-   |            ^ help: a local variable with a similar name exists: `i`
+LL |     for _v in vec.iter().next() {}
+   |               ^^^^^^^^^^^^^^^^^
+   |
+   = note: `-D clippy::iter-next-loop` implied by `-D warnings`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0425`.