Consider the following code:
use std::rc::Rc;
#[derive(Clone)]
struct Foo<T>(Rc<T>);
fn main() {}
I expect #[derive(Clone)] to generate an impl that looks like this:
impl<T> Clone for Foo<T> { /* ... */ }
Manually writing the impl this way works. However, #[derive(Clone)] appears to instead generate an impl that places overly restrictive bounds on T:
impl<T: Clone> Clone for Foo<T> { /* ... */ }
The Clone bound on T is not necessary because Rc<T>: Clone regardless of T.
Is this intended behavior or a bug?