mirror of https://github.com/rwf2/Rocket.git
Emit an error when #[async_test] is applied to a function with parameters.
This commit is contained in:
parent
76ef92a2e1
commit
8718561bf8
|
@ -11,7 +11,9 @@ fn parse_input(input: TokenStream) -> Result<syn::ItemFn> {
|
|||
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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue