External Publication
Visit Post

Make `#[derive(Copy)]` enough for both `Clone` and `Copy`

Rust Internals [Unofficial] June 7, 2026
Source

HKalbasi:

That is, if we were going to design a Rust-like language today, I think having #[derive(Eq)] is clearly a better choice than #[derive(PartialEq, Eq)].

I disagree: I might have valid reasons to have custom code in eq() but Eq is still the same. In fact I did that in the past and also saw it in other places.

But even if this is true, As you yourself said that making this change now is a whole different matter. And saving typing 7 letters does not justify a serious language and compiler complexity, even not considering all negative effects others have cited, IMO.

Discussion in the ATmosphere

Loading comments...