Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #![feature(unboxed_closures)]
  2. use std::{convert::Infallible, future::Future};
  3.  
  4. trait Trait {}
  5.  
  6. impl<'a, F> Trait for F
  7. where
  8. F: Fn<(&'a u8, &'a u16)>,
  9. F::Output: Future<Output = Result<(), Infallible>>,
  10. {
  11. }
  12.  
  13. async fn lol(_: &u8, _: &u16) -> Result<(), Infallible> {Ok(())}
  14.  
  15. fn check<T: Trait>(_: T) {}
  16.  
  17. pub fn check2() {
  18. check(lol)
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement