Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(unboxed_closures)]
- use std::{convert::Infallible, future::Future};
- trait Trait {}
- impl<'a, F> Trait for F
- where
- F: Fn<(&'a u8, &'a u16)>,
- F::Output: Future<Output = Result<(), Infallible>>,
- {
- }
- async fn lol(_: &u8, _: &u16) -> Result<(), Infallible> {Ok(())}
- fn check<T: Trait>(_: T) {}
- pub fn check2() {
- check(lol)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement