summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/for_kv_map.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/for_kv_map.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/for_kv_map.stderr')
-rw-r--r--src/tools/clippy/tests/ui/for_kv_map.stderr58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/for_kv_map.stderr b/src/tools/clippy/tests/ui/for_kv_map.stderr
new file mode 100644
index 000000000..e5cc7c146
--- /dev/null
+++ b/src/tools/clippy/tests/ui/for_kv_map.stderr
@@ -0,0 +1,58 @@
+error: you seem to want to iterate on a map's values
+ --> $DIR/for_kv_map.rs:9:19
+ |
+LL | for (_, v) in &m {
+ | ^^
+ |
+ = note: `-D clippy::for-kv-map` implied by `-D warnings`
+help: use the corresponding method
+ |
+LL | for v in m.values() {
+ | ~ ~~~~~~~~~~
+
+error: you seem to want to iterate on a map's values
+ --> $DIR/for_kv_map.rs:14:19
+ |
+LL | for (_, v) in &*m {
+ | ^^^
+ |
+help: use the corresponding method
+ |
+LL | for v in (*m).values() {
+ | ~ ~~~~~~~~~~~~~
+
+error: you seem to want to iterate on a map's values
+ --> $DIR/for_kv_map.rs:22:19
+ |
+LL | for (_, v) in &mut m {
+ | ^^^^^^
+ |
+help: use the corresponding method
+ |
+LL | for v in m.values_mut() {
+ | ~ ~~~~~~~~~~~~~~
+
+error: you seem to want to iterate on a map's values
+ --> $DIR/for_kv_map.rs:27:19
+ |
+LL | for (_, v) in &mut *m {
+ | ^^^^^^^
+ |
+help: use the corresponding method
+ |
+LL | for v in (*m).values_mut() {
+ | ~ ~~~~~~~~~~~~~~~~~
+
+error: you seem to want to iterate on a map's keys
+ --> $DIR/for_kv_map.rs:33:24
+ |
+LL | for (k, _value) in rm {
+ | ^^
+ |
+help: use the corresponding method
+ |
+LL | for k in rm.keys() {
+ | ~ ~~~~~~~~~
+
+error: aborting due to 5 previous errors
+