{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiayf3ophvqntdlvi5edpqblr4hh6b6i7fv42z7x3woofrjlamaeqm",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mnpuboognuh2"
},
"path": "/t/make-derive-copy-enough-for-both-clone-and-copy/24371?page=2#post_24",
"publishedAt": "2026-06-07T17:31:50.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "HKalbasi:\n\n> It seems doesn't work in all cases though, e.g. with a generic parameter I see this:\n\nYour proposal won't be able to support this case anyway, it is impossible without specialization. Unless you constrain `Clone` to `T: Copy`, but this significantly changes behavior and not something you can do if you want your proposal to be drop-in.\n\nHKalbasi:\n\n> I meant dropping the original `#[rustc_ignore_this_impl_in_case_of_conflict]` proposal and doing this only over an edition. That is, `#[derive(Copy)]` in a new edition is equivalent of both `Clone` and `Copy`, and adding another `Clone` impl (either manually or via `derive`) is a hard error, and not touching the current editions at all.\n\nThat does not matter, since the only edition still need to be supported, and the code for it must still be inside the compiler.",
"title": "Make `#[derive(Copy)]` enough for both `Clone` and `Copy`"
}