2021-04-16 11:00:08 -05:00
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:8:24
|
2021-04-16 11:00:08 -05:00
|
|
|
|
|
|
|
|
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
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:9:31
|
2021-04-16 11:00:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = vec!["hi"].iter().cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:10:22
|
2021-04-16 11:00:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some(&1).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:11:34
|
2021-04-16 11:00:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Box::new([1].iter()).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:12:32
|
2021-04-16 11:00:08 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Box::new(Some(&1)).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
2022-10-21 16:35:39 -05:00
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:28:22
|
2022-10-21 16:35:39 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some(&1).cloned(); // Option::copied needs 1.35
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:33:24
|
2022-10-21 16:35:39 -05:00
|
|
|
|
|
|
|
|
LL | let _ = [1].iter().cloned(); // Iterator::copied needs 1.36
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: used `cloned` where `copied` could be used instead
|
2022-11-19 06:50:02 -06:00
|
|
|
--> $DIR/cloned_instead_of_copied.rs:34:22
|
2022-10-21 16:35:39 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some(&1).cloned();
|
|
|
|
| ^^^^^^ help: try: `copied`
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2021-04-16 11:00:08 -05:00
|
|
|
|