You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[derive(Clone)] should not require generic arguments to be Clone if it's not necessary.
use std::rc::Rc;
struct S;
#[derive(Clone)]
struct Works(Rc<S>);
#[derive(Clone)]
struct Fails<T>(Rc<T>);
fn main() {
let w = Works(Rc::new(S));
w.clone(); // ok
let f = Fails(Rc::new(S));
f.clone(); // fails
}
The text was updated successfully, but these errors were encountered:
[derive(Clone)] should not require generic arguments to be Clone if it's not necessary.
The text was updated successfully, but these errors were encountered: