Make `#[derive(Copy)]` enough for both `Clone` and `Copy`
I had some discussion before:
Discussion: better derive for trait Eq language design
TL;DR adding a new type Derive (as a switch) on Ord, Eq, (and possibly Copy), to indicate whether derive PartialOrd, PartialEq, and Clone for them. By default it is False for compatiability issues, it will become True with some next edition. Since there are not too much things to do, maybe we could just enable it in edition 2024. Considering the following code: use core::cmp::Ordering; #[derive(Ord, PartialEq, Eq)] struct Reversed<T:Ord>(T); impl<T:Ord> PartialOrd for Reversed { fn p…
Maybe adding a new type DeriveDefault could be better.
If you use derive by accident, the duplicated implementation will directly throw an error, and if you just implement traits by hand, you could easily disable the derive flag.
Discussion in the ATmosphere