Advertisement
Guest User

Untitled

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