Problems with the new Async/Await guide #1771
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, looks like we've got some issues with the async/await guide after that update. I took a look at https://pyo3.rs/v0.14.2/ecosystem/async-await.html this morning to check the links. The link to the testing module appears to be busted and this PR fixes that.
Aside from that, it looks like someone's been trying to integrate it into the rustdoc tests since I see some main functions that shouldn't be visible, and the syntax highlighting is missing on some code sections. Also the README.md still points to 0.14.1 (but that might be by design). Idk if that's a WIP or not, but those changes don't seem to be on the
main
branch, so I wasn't sure where to find them. My README contains most of this guide, and its integrated into rustdoc as well if you want to take a look at how I did it.My advice for integrating them into the rustdoc tests is to mark the problematic code sections with
rust compile_fail
even though it may seem like a bit of a cop-out.rust no_run
is also a good idea for tests that require external deps likeuvloop
, but it will still fail to compile some sections without a hidden main (or not-so-hidden in markdown code sections).rust ignore
will still try to build a test for it, it just won't run it by default.