2021-04-22 04:31:13 -05:00
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:7:24
|
2021-04-22 04:31:13 -05:00
|
|
|
|
|
|
|
|
LL | let _ = [1].iter().cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::cloned-instead-of-copied` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::cloned_instead_of_copied)]`
|
2021-04-22 04:31:13 -05:00
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:8:31
|
2021-04-22 04:31:13 -05:00
|
|
|
|
|
|
|
|
LL | let _ = vec!["hi"].iter().cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:9:22
|
2021-04-22 04:31:13 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some(&1).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:10:34
|
2021-04-22 04:31:13 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Box::new([1].iter()).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:11:32
|
2021-04-22 04:31:13 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Box::new(Some(&1)).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
2022-10-23 08:18:45 -05:00
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:27:22
|
2022-10-23 08:18:45 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some(&1).cloned(); // Option::copied needs 1.35
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:32:24
|
2022-10-23 08:18:45 -05:00
|
|
|
|
|
|
|
|
LL | let _ = [1].iter().cloned(); // Iterator::copied needs 1.36
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/cloned_instead_of_copied.rs:33:22
|
2022-10-23 08:18:45 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some(&1).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2021-04-22 04:31:13 -05:00
|
|
|
|