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..8fae16ca 100644 --- a/misc/core-derive/tests/test.rs +++ b/misc/core-derive/tests/test.rs @@ -130,7 +130,7 @@ fn custom_polling() { } impl Foo { - fn foo(&mut self) -> std::task::Poll> { std::task::Poll::Pending } + fn foo(&mut self, _: &mut std::task::Context) -> std::task::Poll> { std::task::Poll::Pending } } #[allow(dead_code)] @@ -186,7 +186,7 @@ fn custom_event_and_polling() { } impl Foo { - fn foo(&mut self) -> std::task::Poll> { std::task::Poll::Pending } + fn foo(&mut self, _: &mut std::task::Context) -> std::task::Poll> { std::task::Poll::Pending } } #[allow(dead_code)]