]> git.lizzy.rs Git - rust.git/blob - tests/ui/cloned_instead_of_copied.stderr
Auto merge of #9690 - royrustdev:boxed_void, r=flip1995
[rust.git] / tests / ui / cloned_instead_of_copied.stderr
1 error: used `cloned` where `copied` could be used instead
2   --> $DIR/cloned_instead_of_copied.rs:9:24
3    |
4 LL |     let _ = [1].iter().cloned();
5    |                        ^^^^^^ help: try: `copied`
6    |
7    = note: `-D clippy::cloned-instead-of-copied` implied by `-D warnings`
8
9 error: used `cloned` where `copied` could be used instead
10   --> $DIR/cloned_instead_of_copied.rs:10:31
11    |
12 LL |     let _ = vec!["hi"].iter().cloned();
13    |                               ^^^^^^ help: try: `copied`
14
15 error: used `cloned` where `copied` could be used instead
16   --> $DIR/cloned_instead_of_copied.rs:11:22
17    |
18 LL |     let _ = Some(&1).cloned();
19    |                      ^^^^^^ help: try: `copied`
20
21 error: used `cloned` where `copied` could be used instead
22   --> $DIR/cloned_instead_of_copied.rs:12:34
23    |
24 LL |     let _ = Box::new([1].iter()).cloned();
25    |                                  ^^^^^^ help: try: `copied`
26
27 error: used `cloned` where `copied` could be used instead
28   --> $DIR/cloned_instead_of_copied.rs:13:32
29    |
30 LL |     let _ = Box::new(Some(&1)).cloned();
31    |                                ^^^^^^ help: try: `copied`
32
33 error: used `cloned` where `copied` could be used instead
34   --> $DIR/cloned_instead_of_copied.rs:31:22
35    |
36 LL |     let _ = Some(&1).cloned(); // Option::copied needs 1.35
37    |                      ^^^^^^ help: try: `copied`
38
39 error: used `cloned` where `copied` could be used instead
40   --> $DIR/cloned_instead_of_copied.rs:37:24
41    |
42 LL |     let _ = [1].iter().cloned(); // Iterator::copied needs 1.36
43    |                        ^^^^^^ help: try: `copied`
44
45 error: used `cloned` where `copied` could be used instead
46   --> $DIR/cloned_instead_of_copied.rs:38:22
47    |
48 LL |     let _ = Some(&1).cloned();
49    |                      ^^^^^^ help: try: `copied`
50
51 error: aborting due to 8 previous errors
52