Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Clone)]
- struct Foo<T>(T);
- struct Unclonable;
- fn takes_clone<T: Clone>(_t: T) {}
- fn main() {
- takes_clone(Foo(()));
- let foo = Foo(Unclonable);
- takes_clone(foo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement