fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: using `.clone()` on a ref-counted pointer 2 --> $DIR/unnecessary_clone.rs:23:5 3 | 4LL | rc.clone(); 5 | ^^^^^^^^^^ help: try: `Rc::<bool>::clone(&rc)` 6 | 7 = note: `-D clippy::clone-on-ref-ptr` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::clone_on_ref_ptr)]` 9 10error: using `.clone()` on a ref-counted pointer 11 --> $DIR/unnecessary_clone.rs:28:5 12 | 13LL | arc.clone(); 14 | ^^^^^^^^^^^ help: try: `Arc::<bool>::clone(&arc)` 15 16error: using `.clone()` on a ref-counted pointer 17 --> $DIR/unnecessary_clone.rs:32:5 18 | 19LL | rcweak.clone(); 20 | ^^^^^^^^^^^^^^ help: try: `Weak::<bool>::clone(&rcweak)` 21 22error: using `.clone()` on a ref-counted pointer 23 --> $DIR/unnecessary_clone.rs:36:5 24 | 25LL | arc_weak.clone(); 26 | ^^^^^^^^^^^^^^^^ help: try: `Weak::<bool>::clone(&arc_weak)` 27 28error: using `.clone()` on a ref-counted pointer 29 --> $DIR/unnecessary_clone.rs:41:33 30 | 31LL | let _: Arc<dyn SomeTrait> = x.clone(); 32 | ^^^^^^^^^ help: try: `Arc::<SomeImpl>::clone(&x)` 33 34error: using `clone` on type `T` which implements the `Copy` trait 35 --> $DIR/unnecessary_clone.rs:46:5 36 | 37LL | t.clone(); 38 | ^^^^^^^^^ help: try removing the `clone` call: `t` 39 | 40 = note: `-D clippy::clone-on-copy` implied by `-D warnings` 41 = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]` 42 43error: using `clone` on type `Option<T>` which implements the `Copy` trait 44 --> $DIR/unnecessary_clone.rs:50:5 45 | 46LL | Some(t).clone(); 47 | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `Some(t)` 48 49error: using `clone` on type `E` which implements the `Copy` trait 50 --> $DIR/unnecessary_clone.rs:85:20 51 | 52LL | let _: E = a.clone(); 53 | ^^^^^^^^^ help: try dereferencing it: `*****a` 54 55error: using `.clone()` on a ref-counted pointer 56 --> $DIR/unnecessary_clone.rs:105:14 57 | 58LL | Some(try_opt!(Some(rc)).clone()) 59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Rc::<u8>::clone(&try_opt!(Some(rc)))` 60 61error: aborting due to 9 previous errors 62