fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: using `clone` on type `i32` which implements the `Copy` trait 2 --> $DIR/clone_on_copy.rs:23:5 3 | 4LL | 42.clone(); 5 | ^^^^^^^^^^ help: try removing the `clone` call: `42` 6 | 7 = note: `-D clippy::clone-on-copy` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]` 9 10error: using `clone` on type `i32` which implements the `Copy` trait 11 --> $DIR/clone_on_copy.rs:27:5 12 | 13LL | (&42).clone(); 14 | ^^^^^^^^^^^^^ help: try dereferencing it: `*(&42)` 15 16error: using `clone` on type `i32` which implements the `Copy` trait 17 --> $DIR/clone_on_copy.rs:30:5 18 | 19LL | rc.borrow().clone(); 20 | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rc.borrow()` 21 22error: using `clone` on type `u32` which implements the `Copy` trait 23 --> $DIR/clone_on_copy.rs:33:5 24 | 25LL | x.clone().rotate_left(1); 26 | ^^^^^^^^^ help: try removing the `clone` call: `x` 27 28error: using `clone` on type `i32` which implements the `Copy` trait 29 --> $DIR/clone_on_copy.rs:47:5 30 | 31LL | m!(42).clone(); 32 | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `m!(42)` 33 34error: using `clone` on type `[u32; 2]` which implements the `Copy` trait 35 --> $DIR/clone_on_copy.rs:57:5 36 | 37LL | x.clone()[0]; 38 | ^^^^^^^^^ help: try dereferencing it: `(*x)` 39 40error: using `clone` on type `char` which implements the `Copy` trait 41 --> $DIR/clone_on_copy.rs:67:14 42 | 43LL | is_ascii('z'.clone()); 44 | ^^^^^^^^^^^ help: try removing the `clone` call: `'z'` 45 46error: using `clone` on type `i32` which implements the `Copy` trait 47 --> $DIR/clone_on_copy.rs:71:14 48 | 49LL | vec.push(42.clone()); 50 | ^^^^^^^^^^ help: try removing the `clone` call: `42` 51 52error: using `clone` on type `Option<i32>` which implements the `Copy` trait 53 --> $DIR/clone_on_copy.rs:75:17 54 | 55LL | let value = opt.clone()?; // operator precedence needed (*opt)? 56 | ^^^^^^^^^^^ help: try dereferencing it: `(*opt)` 57 58error: aborting due to 9 previous errors 59