summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/cloned_instead_of_copied.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/cloned_instead_of_copied.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/cloned_instead_of_copied.stderr')
-rw-r--r--src/tools/clippy/tests/ui/cloned_instead_of_copied.stderr34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/cloned_instead_of_copied.stderr b/src/tools/clippy/tests/ui/cloned_instead_of_copied.stderr
new file mode 100644
index 000000000..e0707d321
--- /dev/null
+++ b/src/tools/clippy/tests/ui/cloned_instead_of_copied.stderr
@@ -0,0 +1,34 @@
+error: used `cloned` where `copied` could be used instead
+ --> $DIR/cloned_instead_of_copied.rs:6:24
+ |
+LL | let _ = [1].iter().cloned();
+ | ^^^^^^ help: try: `copied`
+ |
+ = note: `-D clippy::cloned-instead-of-copied` implied by `-D warnings`
+
+error: used `cloned` where `copied` could be used instead
+ --> $DIR/cloned_instead_of_copied.rs:7:31
+ |
+LL | let _ = vec!["hi"].iter().cloned();
+ | ^^^^^^ help: try: `copied`
+
+error: used `cloned` where `copied` could be used instead
+ --> $DIR/cloned_instead_of_copied.rs:8:22
+ |
+LL | let _ = Some(&1).cloned();
+ | ^^^^^^ help: try: `copied`
+
+error: used `cloned` where `copied` could be used instead
+ --> $DIR/cloned_instead_of_copied.rs:9:34
+ |
+LL | let _ = Box::new([1].iter()).cloned();
+ | ^^^^^^ help: try: `copied`
+
+error: used `cloned` where `copied` could be used instead
+ --> $DIR/cloned_instead_of_copied.rs:10:32
+ |
+LL | let _ = Box::new(Some(&1)).cloned();
+ | ^^^^^^ help: try: `copied`
+
+error: aborting due to 5 previous errors
+