Skip to content

async-await: fix examples#1050

Merged
davidbarsky merged 1 commit intotokio-rs:masterfrom
taiki-e:async-await-examples
Apr 16, 2019
Merged

async-await: fix examples#1050
davidbarsky merged 1 commit intotokio-rs:masterfrom
taiki-e:async-await-examples

Conversation

@taiki-e
Copy link
Copy Markdown
Member

@taiki-e taiki-e commented Apr 13, 2019

Motivation

Some examples in async-await fail to compile (even if updated to the new API by #1049).

Solution

  • Fix crate path in Cargo.toml of examples
  • Add edition2018 to examples in the documentation to make it compiled on Rust 2018
  • Fix an example in the documentation

* Fix crate path in `Cargo.toml` of examples
* Add `edition2018` to examples in the documentation to make it compiled
  on Rust 2018
* Fix an example in the documentation
@taiki-e
Copy link
Copy Markdown
Member Author

taiki-e commented Apr 13, 2019

This is blocked on #1049.

@taiki-e
Copy link
Copy Markdown
Member Author

taiki-e commented Apr 13, 2019

To actually test the document, it needs to do one of the following in Cargo.toml of tokio-async-await:

  1. Make async-await-preview feature dependent on "tokio/async-await-preview".
    This is not a problem when compiling on the root of the repository and tokio-async-await directory, but moving to directories of other subcrates and then compiling causes "failed to select a version for tokio-async-await" error.
  2. Add features = ["async-await-preview"] to tokio dev-dependency.
    This will cause non-nightly tests to fail.

Both ways have problems, so they are not included in the first commit. (Probably, replacing that only in the build for async / await, it can testing on CI.)

Copy link
Copy Markdown
Member

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! merging this. I think @carllerche should be able to get a release out now that this and #1049 are in master.

@davidbarsky davidbarsky merged commit 88b9426 into tokio-rs:master Apr 16, 2019
@taiki-e taiki-e deleted the async-await-examples branch April 17, 2019 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants