| error: non-canonical implementation of `clone` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:12:29 |
| | |
| LL | fn clone(&self) -> Self { |
| | _____________________________^ |
| LL | | |
| LL | | Self(self.0) |
| LL | | } |
| | |_____^ help: change this to: `{ *self }` |
| | |
| = note: `-D clippy::non-canonical-clone-impl` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::non_canonical_clone_impl)]` |
| |
| error: unnecessary implementation of `clone_from` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:17:5 |
| | |
| LL | / fn clone_from(&mut self, source: &Self) { |
| LL | | |
| LL | | source.clone(); |
| LL | | *self = source.clone(); |
| LL | | } |
| | |_____^ help: remove it |
| |
| error: non-canonical implementation of `clone` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:82:29 |
| | |
| LL | fn clone(&self) -> Self { |
| | _____________________________^ |
| LL | | |
| LL | | Self(self.0) |
| LL | | } |
| | |_____^ help: change this to: `{ *self }` |
| |
| error: unnecessary implementation of `clone_from` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:87:5 |
| | |
| LL | / fn clone_from(&mut self, source: &Self) { |
| LL | | |
| LL | | source.clone(); |
| LL | | *self = source.clone(); |
| LL | | } |
| | |_____^ help: remove it |
| |
| error: non-canonical implementation of `clone` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:121:37 |
| | |
| LL | fn clone(&self) -> Self { |
| | _____________________________________^ |
| LL | | |
| LL | | todo!() |
| LL | | } |
| | |_____________^ help: change this to: `{ *self }` |
| | |
| = note: this error originates in the macro `__inline_mac_mod_issue12788` (in Nightly builds, run with -Z macro-backtrace for more info) |
| |
| error: non-canonical implementation of `clone` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:160:29 |
| | |
| LL | fn clone(&self) -> Self { |
| | _____________________________^ |
| LL | | |
| LL | | { *self } |
| LL | | } |
| | |_____^ help: change this to: `{ *self }` |
| |
| error: non-canonical implementation of `clone` on a `Copy` type |
| --> tests/ui/non_canonical_clone_impl.rs:187:33 |
| | |
| LL | fn clone(&self) -> Self { |
| | _________________________________^ |
| LL | | |
| LL | | { |
| LL | | return *self; |
| LL | | } |
| LL | | } |
| | |_________^ help: change this to: `{ return *self; }` |
| |
| error: aborting due to 7 previous errors |
| |