-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b8cedb
commit eb67ab7
Showing
4 changed files
with
29 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[derive(Copy, Clone)] | ||
#[derive(Copy, Clone)] | ||
//~^ ERROR conflicting implementations of trait `Copy` | ||
enum E {} | ||
|
||
fn main() {} |
23 changes: 23 additions & 0 deletions
23
tests/ui/derives/duplicate-derive-copy-clone-diagnostics.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0119]: conflicting implementations of trait `Copy` for type `E` | ||
--> $DIR/duplicate-derive-copy-clone-diagnostics.rs:2:10 | ||
| | ||
LL | #[derive(Copy, Clone)] | ||
| ---- first implementation here | ||
LL | #[derive(Copy, Clone)] | ||
| ^^^^ conflicting implementation for `E` | ||
| | ||
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0119]: conflicting implementations of trait `Clone` for type `E` | ||
--> $DIR/duplicate-derive-copy-clone-diagnostics.rs:2:16 | ||
| | ||
LL | #[derive(Copy, Clone)] | ||
| ----- first implementation here | ||
LL | #[derive(Copy, Clone)] | ||
| ^^^^^ conflicting implementation for `E` | ||
| | ||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0119`. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.