Open
Description
In the following code:
#[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.:
#[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...