Skip to content

init FutureExt #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
4 commits merged into from
Oct 15, 2019
Merged

init FutureExt #308

4 commits merged into from
Oct 15, 2019

Conversation

yoshuawuyts
Copy link
Contributor

Initializes FutureExt which allows us to provide extension traits for the Future trait. I had to change some requirements inside our code to not use crate::future::Future in order to get this to compile during the doc stage.

I'm currently hitting a bug though where adding doc comments to type Output and fn poll breaks compilation with:

error: macro expansion ends with an incomplete expression: expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe`
   --> src/future/future.rs:101:12
    |
101 |         "#]
    |            ^ expected one of `async`, `const`, `extern`, `fn`, `type`, or `unsafe` here
error: aborting due to previous error
error: could not compile `async-std`.
To learn more, run the command again with --verbose.

If anyone has an idea what might be going on there I'd be interested in knowing!

The goal of this PR is to allow us to add more methods to Future. Thanks!

@yoshuawuyts yoshuawuyts added the enhancement New feature or request label Oct 13, 2019
@ghost
Copy link

ghost commented Oct 14, 2019

I have simplified the extension_trait macro and now everything works fine :)

@yoshuawuyts yoshuawuyts marked this pull request as ready for review October 15, 2019 14:11
yoshuawuyts and others added 3 commits October 15, 2019 16:14
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
@ghost ghost merged commit 49faea2 into master Oct 15, 2019
@ghost ghost deleted the future-ext branch October 15, 2019 14:27
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant