Skip to content
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

Some improvements to the async docs #91192

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

wooster0
Copy link
Contributor

The goal here is to make the docs overall a little bit more comprehensive and add more links between the things.

One thing that's not working yet is the links to the keywords. Somehow I couldn't get them to work.

r? @GuillaumeGomez do you know how I could get the keyword links to work?

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2021
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@GuillaumeGomez GuillaumeGomez left a comment

Choose a reason for hiding this comment

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

Try with these links and we'll see if the checker is happy. :)

@camelid camelid added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Nov 25, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@wooster0
Copy link
Contributor Author

wooster0 commented Nov 25, 2021

Oh, on std the links work (I've tested them locally) but they are broken on core, any way to fix this?

On a note, optimally it'd be nice if one could link to keywords simply by writing

/// hello to [`if`], [`match`] and [`async`]

etc.
Should I open an issue for that on here?

@GuillaumeGomez
Copy link
Member

doc(keyword) will remain unstable because it's only supposed to be used in the std, so I don't think they'll ever be supported in the intra doc links (but you can open an issue if you think it's worth discussing).

To solve on core, I suppose adding ../std/ in all your links will solve it.

@wooster0
Copy link
Contributor Author

@GuillaumeGomez oh ok I just thought allowing that only within the std might be nice because then this PR would have a few commits less.

@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 12, 2021
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2022
@wooster0
Copy link
Contributor Author

@rustbot ready

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Feb 20, 2022

📌 Commit 297364e has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 20, 2022
Some improvements to the async docs

The goal here is to make the docs overall a little bit more comprehensive and add more links between the things.

One thing that's not working yet is the links to the keywords. Somehow I couldn't get them to work.

r? `@GuillaumeGomez` do you know how I could get the keyword links to work?
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 20, 2022
Some improvements to the async docs

The goal here is to make the docs overall a little bit more comprehensive and add more links between the things.

One thing that's not working yet is the links to the keywords. Somehow I couldn't get them to work.

r? ``@GuillaumeGomez`` do you know how I could get the keyword links to work?
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 21, 2022
Some improvements to the async docs

The goal here is to make the docs overall a little bit more comprehensive and add more links between the things.

One thing that's not working yet is the links to the keywords. Somehow I couldn't get them to work.

r? ```@GuillaumeGomez``` do you know how I could get the keyword links to work?
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2022
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#91192 (Some improvements to the async docs)
 - rust-lang#94143 (rustc_const_eval: adopt let else in more places)
 - rust-lang#94156 (Gracefully handle non-UTF-8 string slices when pretty printing)
 - rust-lang#94186 (Update pin_static_ref stabilization version.)
 - rust-lang#94189 (Implement LowerHex on Scalar to clean up their display in rustdoc)
 - rust-lang#94190 (Use Metadata::modified instead of FileTime::from_last_modification_ti…)
 - rust-lang#94203 (CTFE engine: Scalar: expose size-generic to_(u)int methods)
 - rust-lang#94211 (Better error if the user tries to do assignment ... else)
 - rust-lang#94215 (trait system: comments and small nonfunctional changes)
 - rust-lang#94220 (Correctly handle miniz_oxide extern crate declaration)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 12705b4 into rust-lang:master Feb 22, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 22, 2022
@@ -5,7 +5,7 @@ use crate::ops;
use crate::pin::Pin;
use crate::task::{Context, Poll};

/// A future represents an asynchronous computation.
/// A future represents an asynchronous computation obtained by use of [`async`].
Copy link
Member

Choose a reason for hiding this comment

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

This might be confusing; it isn't only obtained via async since Future is implemented manually for e.g. system resources. Most await chains bottom out in one of these manual implementations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to follow up with another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants