Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. struct MyFun(Box<Fn(&usize)>);
  2.  
  3. impl MyFun {
  4. fn new() -> Self {
  5. Self(Box::new(&a_fun))
  6. }
  7. }
  8.  
  9. trait MyTrait<'a> {
  10. fn foo(arg: &'a str) -> usize;
  11. }
  12.  
  13. fn a_fun<'a, A>(arg: &'a usize) -> A where A: MyTrait<'a> {
  14. unimplemented!()
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement