]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/clone_on_copy.stderr
Auto merge of #100315 - compiler-errors:norm-ct-in-proj, r=lcnr
[rust.git] / src / tools / clippy / tests / ui / clone_on_copy.stderr
1 error: using `clone` on type `i32` which implements the `Copy` trait
2   --> $DIR/clone_on_copy.rs:25:5
3    |
4 LL |     42.clone();
5    |     ^^^^^^^^^^ help: try removing the `clone` call: `42`
6    |
7    = note: `-D clippy::clone-on-copy` implied by `-D warnings`
8
9 error: using `clone` on type `i32` which implements the `Copy` trait
10   --> $DIR/clone_on_copy.rs:29:5
11    |
12 LL |     (&42).clone();
13    |     ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
14
15 error: using `clone` on type `i32` which implements the `Copy` trait
16   --> $DIR/clone_on_copy.rs:32:5
17    |
18 LL |     rc.borrow().clone();
19    |     ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
20
21 error: using `clone` on type `u32` which implements the `Copy` trait
22   --> $DIR/clone_on_copy.rs:35:5
23    |
24 LL |     x.clone().rotate_left(1);
25    |     ^^^^^^^^^ help: try removing the `clone` call: `x`
26
27 error: using `clone` on type `i32` which implements the `Copy` trait
28   --> $DIR/clone_on_copy.rs:49:5
29    |
30 LL |     m!(42).clone();
31    |     ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)`
32
33 error: using `clone` on type `[u32; 2]` which implements the `Copy` trait
34   --> $DIR/clone_on_copy.rs:59:5
35    |
36 LL |     x.clone()[0];
37    |     ^^^^^^^^^ help: try dereferencing it: `(*x)`
38
39 error: using `clone` on type `char` which implements the `Copy` trait
40   --> $DIR/clone_on_copy.rs:69:14
41    |
42 LL |     is_ascii('z'.clone());
43    |              ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
44
45 error: using `clone` on type `i32` which implements the `Copy` trait
46   --> $DIR/clone_on_copy.rs:73:14
47    |
48 LL |     vec.push(42.clone());
49    |              ^^^^^^^^^^ help: try removing the `clone` call: `42`
50
51 error: aborting due to 8 previous errors
52