Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. use std::any::Any;
  2. use std::fmt::Debug;
  3.  
  4. fn funny<T>(t: T) where T: Any + Sized + Debug {
  5. println!("{:?}", t);
  6. }
  7.  
  8. fn main() {
  9. let value = true;
  10. let result:bool = suck(value);
  11. funny(true)
  12.  
  13. }
  14.  
  15. fn suck<T: Any + Sized>(t:T) -> (Fn(bool) -> T) {
  16. unimplemented!();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement