diff --git a/misc/core-derive/src/lib.rs b/misc/core-derive/src/lib.rs index 4c36f73e..452cc094 100644 --- a/misc/core-derive/src/lib.rs +++ b/misc/core-derive/src/lib.rs @@ -389,7 +389,7 @@ fn build_struct(ast: &DeriveInput, data_struct: &DataStruct) -> TokenStream { syn::NestedMeta::Meta(syn::Meta::NameValue(ref m)) if m.path.is_ident("poll_method") => { if let syn::Lit::Str(ref s) = m.lit { let ident: Ident = syn::parse_str(&s.value()).unwrap(); - poll_method = quote!{#name::#ident(self)}; + poll_method = quote!{#name::#ident(self, cx)}; } } _ => () diff --git a/misc/core-derive/tests/test.rs b/misc/core-derive/tests/test.rs index 31752b1c..2f4ff803 100644 --- a/misc/core-derive/tests/test.rs +++ b/misc/core-derive/tests/test.rs @@ -134,7 +134,7 @@ fn custom_polling() { } #[allow(dead_code)] - fn foo() { + fn foo(_: &mut std::task::Context) { require_net_behaviour::>(); } } @@ -190,7 +190,7 @@ fn custom_event_and_polling() { } #[allow(dead_code)] - fn foo() { + fn foo(_: &mut std::task::Context) { require_net_behaviour::>(); } }