diff --git a/core/codegen/src/attribute/async_test.rs b/core/codegen/src/attribute/async_test.rs index 8935c94e..2a8caa1c 100644 --- a/core/codegen/src/attribute/async_test.rs +++ b/core/codegen/src/attribute/async_test.rs @@ -11,7 +11,9 @@ fn parse_input(input: TokenStream) -> Result { return Err(Span::call_site().error("`#[async_test]` can only be applied to async functions")) } - // TODO.async: verify of the form `async fn name(/* no args */) -> R` + if !function.sig.inputs.is_empty() { + return Err(Span::call_site().error("`#[async_test]` can only be applied to functions with no parameters")); + } Ok(function) }