From 53c5166b6c46dfd8e765ef8dffda99242ec0dcdb Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Tue, 30 Jan 2024 20:35:21 -0800 Subject: [PATCH] Fix '#[async_bound]' for fns with no return type. --- core/codegen/src/attribute/async_bound/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/codegen/src/attribute/async_bound/mod.rs b/core/codegen/src/attribute/async_bound/mod.rs index d58f0afe..728f199a 100644 --- a/core/codegen/src/attribute/async_bound/mod.rs +++ b/core/codegen/src/attribute/async_bound/mod.rs @@ -37,7 +37,9 @@ fn _async_bound( ReturnType::Type(arrow, ty) => parse_quote_spanned!(ty.span() => #arrow impl ::core::future::Future + #bounds ), - default@ReturnType::Default => default + default@ReturnType::Default => parse_quote_spanned!(default.span() => + -> impl ::core::future::Future + #bounds + ), }; Ok(quote! {