diff --git a/ouroboros_macro/src/info_structures.rs b/ouroboros_macro/src/info_structures.rs index 883d30c..db9c288 100644 --- a/ouroboros_macro/src/info_structures.rs +++ b/ouroboros_macro/src/info_structures.rs @@ -245,7 +245,7 @@ impl StructFieldInfo { let field_type = &self.typ; let return_ty_constructor = || { if make_async { - quote! { impl ::core::future::Future + 'this } + quote! { ::std::pin::Pin<::std::boxed::Box + Send + 'this>> } } else { quote! { #field_type } } @@ -262,7 +262,7 @@ impl StructFieldInfo { let field_type = &self.typ; let return_ty_constructor = || { if make_async { - quote! { impl ::core::future::Future> + 'this } + quote! { ::std::pin::Pin<::std::boxed::Box> + Send + 'this>> } } else { quote! { ::core::result::Result<#field_type, Error_> } }