Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. #[derive(Clone)]
  2. struct Foo<T>(T);
  3. struct Unclonable;
  4.  
  5. fn takes_clone<T: Clone>(t: T) {}
  6.  
  7. fn main() {
  8. takes_clone(Foo(()));
  9. takes_clone(Foo(Unclonable));
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement