Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. trait Clone2 {}
  2. trait Copy2: Clone2 {}
  3. impl<T: Copy2> Clone2 for T {}
  4.  
  5.  
  6. impl Clone2 for i32 {}
  7. impl Copy2 for u32 {}
  8.  
  9. fn is_copy<T: Copy2>(x: T) {}
  10. fn is_clone<T: Clone2>(x: T) {}
  11.  
  12. fn main() {
  13. is_clone(1u32);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement