summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/manual_find_fixable.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /src/tools/clippy/tests/ui/manual_find_fixable.stderr
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/manual_find_fixable.stderr')
-rw-r--r--src/tools/clippy/tests/ui/manual_find_fixable.stderr25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/tools/clippy/tests/ui/manual_find_fixable.stderr b/src/tools/clippy/tests/ui/manual_find_fixable.stderr
index dbc4ff69a..387d1509c 100644
--- a/src/tools/clippy/tests/ui/manual_find_fixable.stderr
+++ b/src/tools/clippy/tests/ui/manual_find_fixable.stderr
@@ -1,5 +1,5 @@
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:11:5
+ --> $DIR/manual_find_fixable.rs:10:5
|
LL | / for &v in ARRAY {
LL | | if v == n {
@@ -10,9 +10,10 @@ LL | | None
| |________^ help: replace with an iterator: `ARRAY.iter().find(|&&v| v == n).copied()`
|
= note: `-D clippy::manual-find` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::manual_find)]`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:20:5
+ --> $DIR/manual_find_fixable.rs:19:5
|
LL | / for (a, _) in arr {
LL | | if a % 2 == 0 {
@@ -23,7 +24,7 @@ LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().map(|(a, _)| a).find(|&a| a % 2 == 0)`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:33:5
+ --> $DIR/manual_find_fixable.rs:32:5
|
LL | / for el in arr {
LL | | if el.name.len() == 10 {
@@ -36,7 +37,7 @@ LL | | None
= note: you may need to dereference some variables
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:43:5
+ --> $DIR/manual_find_fixable.rs:42:5
|
LL | / for Tuple(a, _) in arr {
LL | | if a >= 3 {
@@ -47,7 +48,7 @@ LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().map(|Tuple(a, _)| a).find(|&a| a >= 3)`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:58:5
+ --> $DIR/manual_find_fixable.rs:57:5
|
LL | / for el in arr {
LL | | if el.should_keep() {
@@ -60,7 +61,7 @@ LL | | None
= note: you may need to dereference some variables
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:68:5
+ --> $DIR/manual_find_fixable.rs:67:5
|
LL | / for el in arr {
LL | | if f(el) == 20 {
@@ -71,7 +72,7 @@ LL | | None
| |________^ help: replace with an iterator: `arr.into_iter().find(|&el| f(el) == 20)`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:78:5
+ --> $DIR/manual_find_fixable.rs:77:5
|
LL | / for &el in arr.values() {
LL | | if f(el) {
@@ -82,7 +83,7 @@ LL | | None
| |________^ help: replace with an iterator: `arr.values().find(|&&el| f(el)).copied()`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:87:5
+ --> $DIR/manual_find_fixable.rs:86:5
|
LL | / for el in arr {
LL | | if el.is_true {
@@ -95,7 +96,7 @@ LL | | None
= note: you may need to dereference some variables
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:117:5
+ --> $DIR/manual_find_fixable.rs:116:5
|
LL | / for (_, &x) in v {
LL | | if x > 10 {
@@ -106,7 +107,7 @@ LL | | None
| |________^ help: replace with an iterator: `v.into_iter().map(|(_, &x)| x).find(|&x| x > 10)`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:126:5
+ --> $DIR/manual_find_fixable.rs:125:5
|
LL | / for &(_, &x) in v {
LL | | if x > 10 {
@@ -117,7 +118,7 @@ LL | | None
| |________^ help: replace with an iterator: `v.iter().map(|&(_, &x)| x).find(|&x| x > 10)`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:135:5
+ --> $DIR/manual_find_fixable.rs:134:5
|
LL | / for x in arr {
LL | | if x >= 5 {
@@ -128,7 +129,7 @@ LL | | return None;
| |________________^ help: replace with an iterator: `arr.into_iter().find(|&x| x >= 5)`
error: manual implementation of `Iterator::find`
- --> $DIR/manual_find_fixable.rs:190:9
+ --> $DIR/manual_find_fixable.rs:189:9
|
LL | / for x in arr {
LL | | if x < 1 {