`#[derive]` sometimes uses incorrect bounds (aka lack of "perfect derive")
<!-- homu-ignore:start --> *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/issues/26925)* <!-- homu-ignore:end --> In the following code: ```rs #[derive(Copy, Clone)] struct Y<T>(&'static fn(T)); ``` both derives expand to impls that require the corresponding trait to be implemented on the type parameter, e.g.: ```rs #[automatically_derived] impl<T: ::std::marker::Copy> ::std::marker::Copy for Y<T> where T: ::std::marker::Copy {} ``` However, this isn't actually necessary, as `Y<T>` will still be eligible for `Copy` regardless of whether `T` is. This may be hard to fix, given the compilation phase at which `#[derive]` works...
Posted by comex on Jul 9, 2015, 9:58 PM
Tags
Related issues
- [Codex Desktop][Windows] Weekly quota jumped 67 points in 38 seconds (Oct 16, 2026; 18:10 UTC)
- I loathe how difficult Matrix is for normal people though.
- Fragile against upgrades, tons of unmaintained plugins, admin panel UX is a mess where you struggle to find the stuff your are looking fo...
- Unfortunately there doesn’t seem to be any decent alternative.
- I'm wondering how much of that is bad developer UX and defaults, and how much of that is inherent complexity in the problem space.
- Pulumi support
Raise real-world problems, find people facing the same issue, and discuss solutions.5,500 issues0 comments
ux (Sysadmin)
[Codex Desktop][Windows] Weekly quota jumped 67 points in 38 seconds (Oct 16, 2026; 18:10 UTC)
I loathe how difficult Matrix is for normal people though.
Fragile against upgrades, tons of unmaintained plugins, admin panel UX is a mess where you struggle to find the stuff your are looking fo...
Unfortunately there doesn’t seem to be any decent alternative.
I'm wondering how much of that is bad developer UX and defaults, and how much of that is inherent complexity in the problem space.
Pulumi support
[Feature]: managing cnpg in GitOps workflows (FluxCD, ArgoCD ...)
Merge the platform and UI threads
`#[derive]` sometimes uses incorrect bounds (aka lack of "perfect derive")
<!-- homu-ignore:start --> *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/issues/26925)* <!-- homu-ignore:end --> In the following code: ```rs #[derive(Copy, Clone)] struct Y<T>(&'static fn(T)); ``` both derives expand to impls that require the corresponding trait to be implemented on the type parameter, e.g.: ```rs #[automatically_derived] impl<T: ::std::marker::Copy> ::std::marker::Copy for Y<T> where T: ::std::marker::Copy {} ``` However, this isn't actually necessary, as `Y<T>` will still be eligible for `Copy` regardless of whether `T` is. This may be hard to fix, given the compilation phase at which `#[derive]` works...
Comments (0)
No comments yet. Start the discussion.