{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiegs3cqahjubr7w5egilvumsks52pkq7eah6s6ibbcmzqt74adrni",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mnjvnkrrbr22"
},
"path": "/t/make-derive-copy-enough-for-both-clone-and-copy/24371#post_8",
"publishedAt": "2026-06-05T08:52:00.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "quinedot:\n\n> I think making macros be conditional on trait solving is a big ask. Especially since which traits are dependent on macro output.\n\nI meant a pure syntactic solution, based on syntax heuristics. False positives would result in this feature not working in some rare cases.\n\nchrefr:\n\n> this will be a big change, hurt performance and incrementality\n\nMakes sense. So the syntax based solution is probably not a good idea.\n\nWhat about doing this in the trait solver, but not with completely solving and relying on specialization? Trait solver needs to collect all trait impls from the crate. If it sees a `#[ignorable] impl Clone for Foo<Something>` and another `impl Clone for Foo<Another>` or `impl Clone for T`, it ignores the `#[ignorable]` one.",
"title": "Make `#[derive(Copy)]` enough for both `Clone` and `Copy`"
}