3 use std::collections::HashMap;
4 use std::future::Future;
8 fn do_something<'async_trait>(byte: u8)
10 Pin<Box<dyn Future<Output = ()> +
11 Send + 'async_trait>>;
16 impl Trait for Struct {
17 fn do_something<'async_trait>(byte: u8)
19 Pin<Box<dyn Future<Output = ()> +
20 Send + 'async_trait>> {
23 async move { let byte = byte; let _: () = {}; })
28 map: HashMap<u16, fn(u8) -> Pin<Box<dyn Future<Output = ()> + Send>>>,
32 pub fn new() -> Self {
33 let mut map = HashMap::new();
34 map.insert(1, Struct::do_something);
36 //~^ ERROR mismatched types