Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/non_canonical_clone_impl.fixed
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macros.rs
#![expect(clippy::clone_on_copy)]
#![allow(clippy::assigning_clones)]
#![no_main]
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/tests/ui/non_canonical_clone_impl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macros.rs
#![expect(clippy::clone_on_copy)]
#![allow(clippy::assigning_clones)]
#![no_main]
Expand Down
14 changes: 7 additions & 7 deletions src/tools/clippy/tests/ui/non_canonical_clone_impl.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: non-canonical implementation of `clone` on a `Copy` type
--> tests/ui/non_canonical_clone_impl.rs:12:29
--> tests/ui/non_canonical_clone_impl.rs:13:29
|
LL | fn clone(&self) -> Self {
| _____________________________^
Expand All @@ -12,7 +12,7 @@ LL | | }
= 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
--> tests/ui/non_canonical_clone_impl.rs:18:5
|
LL | / fn clone_from(&mut self, source: &Self) {
LL | |
Expand All @@ -22,7 +22,7 @@ LL | | }
| |_____^ help: remove it

error: non-canonical implementation of `clone` on a `Copy` type
--> tests/ui/non_canonical_clone_impl.rs:82:29
--> tests/ui/non_canonical_clone_impl.rs:83:29
|
LL | fn clone(&self) -> Self {
| _____________________________^
Expand All @@ -32,7 +32,7 @@ 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
--> tests/ui/non_canonical_clone_impl.rs:88:5
|
LL | / fn clone_from(&mut self, source: &Self) {
LL | |
Expand All @@ -42,7 +42,7 @@ LL | | }
| |_____^ help: remove it

error: non-canonical implementation of `clone` on a `Copy` type
--> tests/ui/non_canonical_clone_impl.rs:121:37
--> tests/ui/non_canonical_clone_impl.rs:122:37
|
LL | fn clone(&self) -> Self {
| _____________________________________^
Expand All @@ -54,7 +54,7 @@ LL | | }
= 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
--> tests/ui/non_canonical_clone_impl.rs:161:29
|
LL | fn clone(&self) -> Self {
| _____________________________^
Expand All @@ -64,7 +64,7 @@ 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
--> tests/ui/non_canonical_clone_impl.rs:188:33
|
LL | fn clone(&self) -> Self {
| _________________________________^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macros.rs
#![no_main]

extern crate proc_macros;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macros.rs
#![no_main]

extern crate proc_macros;
Expand Down
10 changes: 5 additions & 5 deletions src/tools/clippy/tests/ui/non_canonical_partial_ord_impl.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> tests/ui/non_canonical_partial_ord_impl.rs:20:1
--> tests/ui/non_canonical_partial_ord_impl.rs:21:1
|
LL | / impl PartialOrd for A {
LL | |
Expand All @@ -20,7 +20,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp
|

error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> tests/ui/non_canonical_partial_ord_impl.rs:55:1
--> tests/ui/non_canonical_partial_ord_impl.rs:56:1
|
LL | / impl PartialOrd for C {
LL | |
Expand All @@ -39,7 +39,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp
|

error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> tests/ui/non_canonical_partial_ord_impl.rs:191:9
--> tests/ui/non_canonical_partial_ord_impl.rs:192:9
|
LL | / impl PartialOrd for A {
LL | |
Expand All @@ -59,7 +59,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(
|

error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> tests/ui/non_canonical_partial_ord_impl.rs:271:1
--> tests/ui/non_canonical_partial_ord_impl.rs:272:1
|
LL | / impl PartialOrd for K {
LL | |
Expand All @@ -78,7 +78,7 @@ LL + fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp
|

error: non-canonical implementation of `partial_cmp` on an `Ord` type
--> tests/ui/non_canonical_partial_ord_impl.rs:289:1
--> tests/ui/non_canonical_partial_ord_impl.rs:290:1
|
LL | / impl PartialOrd for L {
LL | |
Expand Down
Loading