2020-12-11 18:23:28 -06:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:25:5
|
2020-06-23 18:01:23 -05:00
|
|
|
|
|
|
|
|
LL | 42.clone();
|
|
|
|
| ^^^^^^^^^^ help: try removing the `clone` call: `42`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
|
|
|
|
|
2020-12-11 18:23:28 -06:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:29:5
|
2020-06-23 18:01:23 -05:00
|
|
|
|
|
|
|
|
LL | (&42).clone();
|
|
|
|
| ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)`
|
|
|
|
|
2020-12-11 18:23:28 -06:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:32:5
|
2020-06-23 18:01:23 -05:00
|
|
|
|
|
|
|
|
LL | rc.borrow().clone();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()`
|
|
|
|
|
2021-03-29 12:29:58 -05:00
|
|
|
error: using `clone` on type `u32` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:35:5
|
2021-03-29 12:29:58 -05:00
|
|
|
|
|
|
|
|
LL | x.clone().rotate_left(1);
|
|
|
|
| ^^^^^^^^^ help: try removing the `clone` call: `x`
|
|
|
|
|
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:49:5
|
2021-03-29 12:29:58 -05:00
|
|
|
|
|
|
|
|
LL | m!(42).clone();
|
|
|
|
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)`
|
|
|
|
|
|
|
|
error: using `clone` on type `[u32; 2]` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:59:5
|
2021-03-29 12:29:58 -05:00
|
|
|
|
|
|
|
|
LL | x.clone()[0];
|
|
|
|
| ^^^^^^^^^ help: try dereferencing it: `(*x)`
|
|
|
|
|
2020-12-11 18:23:28 -06:00
|
|
|
error: using `clone` on type `char` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:69:14
|
2020-06-23 18:01:23 -05:00
|
|
|
|
|
|
|
|
LL | is_ascii('z'.clone());
|
|
|
|
| ^^^^^^^^^^^ help: try removing the `clone` call: `'z'`
|
|
|
|
|
2020-12-11 18:23:28 -06:00
|
|
|
error: using `clone` on type `i32` which implements the `Copy` trait
|
2022-01-11 13:31:35 -06:00
|
|
|
--> $DIR/clone_on_copy.rs:73:14
|
2020-06-23 18:01:23 -05:00
|
|
|
|
|
|
|
|
LL | vec.push(42.clone());
|
|
|
|
| ^^^^^^^^^^ help: try removing the `clone` call: `42`
|
|
|
|
|
2022-08-02 10:39:35 -05:00
|
|
|
error: using `clone` on type `std::option::Option<i32>` which implements the `Copy` trait
|
2022-08-02 12:06:22 -05:00
|
|
|
--> $DIR/clone_on_copy.rs:77:17
|
2022-08-02 10:39:35 -05:00
|
|
|
|
|
2022-08-02 12:06:22 -05:00
|
|
|
LL | let value = opt.clone()?; // operator precedence needed (*opt)?
|
2022-08-02 10:39:35 -05:00
|
|
|
| ^^^^^^^^^^^ help: try dereferencing it: `(*opt)`
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2020-06-23 18:01:23 -05:00
|
|
|
|