Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 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. let foo = Foo(Unclonable);
  10. takes_clone(foo);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement