summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/cloned_instead_of_copied.stderr
blob: e0361acd956072d53a704a40f10dd3de1b998f20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
error: used `cloned` where `copied` could be used instead
  --> $DIR/cloned_instead_of_copied.rs:8: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:9: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:10:22
   |
LL |     let _ = Some(&1).cloned();
   |                      ^^^^^^ help: try: `copied`

error: used `cloned` where `copied` could be used instead
  --> $DIR/cloned_instead_of_copied.rs:11: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:12:32
   |
LL |     let _ = Box::new(Some(&1)).cloned();
   |                                ^^^^^^ help: try: `copied`

error: used `cloned` where `copied` could be used instead
  --> $DIR/cloned_instead_of_copied.rs:28:22
   |
LL |     let _ = Some(&1).cloned(); // Option::copied needs 1.35
   |                      ^^^^^^ help: try: `copied`

error: used `cloned` where `copied` could be used instead
  --> $DIR/cloned_instead_of_copied.rs:33:24
   |
LL |     let _ = [1].iter().cloned(); // Iterator::copied needs 1.36
   |                        ^^^^^^ help: try: `copied`

error: used `cloned` where `copied` could be used instead
  --> $DIR/cloned_instead_of_copied.rs:34:22
   |
LL |     let _ = Some(&1).cloned();
   |                      ^^^^^^ help: try: `copied`

error: aborting due to 8 previous errors