1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-01-31 09:12:08 +01:00

inclide fn token to err message

This commit is contained in:
Nikolay Kim 2019-11-26 10:01:46 +06:00
parent e76ea8e80c
commit 2cf140a869

View File

@ -68,9 +68,12 @@ pub fn test(_: TokenStream, item: TokenStream) -> TokenStream {
}
if input.sig.asyncness.is_none() {
return syn::Error::new_spanned(input.sig.fn_token, "only async fn is supported")
.to_compile_error()
.into();
return syn::Error::new_spanned(
input.sig.fn_token,
format!("only async fn is supported, {:?}", input.sig.fn_token),
)
.to_compile_error()
.into();
}
let result = if has_test_attr {