{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiaijnsmncgw3ktqh6xque75sduzxdqa47wspdnr5s6swqabif7hhi",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mnkqhw5ofqk2"
  },
  "path": "/t/make-derive-copy-enough-for-both-clone-and-copy/24371#post_14",
  "publishedAt": "2026-06-05T17:47:31.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "SkiFire13:\n\n> adding `impl Clone for Foo<NonClone>` would be a breaking change because it silently disables the existing `Clone` impl.\n\nIt wouldn't be silent. You will immediately get a compile error \"the trait `Clone` is not implemented for `Foo<T>`\", because `Clone` is super trait of `Copy`. Now you have two choices:\n\n  1. Add a `derive(Clone)`: No breaking change at all.\n  2. Do something else, like `impl<T: Copy> Clone for Foo<T>`, which would be breaking change, but you explicitly opted-in.\n\n\n\nSo, at least in your current example, I don't think there is any increased semver risk added by this feature.\n\nSkiFire13:\n\n> This is not an implied bound, it is a logical implication. `T: Copy` and `Copy: Clone`, hence `T: Clone`.\n\nYou are right. `implied_bounds` are implicit in another dimension, but my point that `T: Copy` has an implicit `Clone` bound is unchanged, other than wording.\n\nSkiFire13:\n\n> you'll get by changing `Clone` itself\n\nWhat do you mean by changing `Clone`?",
  "title": "Make `#[derive(Copy)]` enough for both `Clone` and `Copy`"
}