-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add "promise" doc alias to async keyword #79211
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Hm, it's a bit unfortunate there's not a page in the rustdoc that we can link to (maybe std::task or std::future should be it?) which tries to lay out the things you want to know about when working with Futures, e.g., that implementing the Future trait is unlikely to be the right approach. At least I wouldn't want people to land on the current docs for Future with JS promise context, because they're pretty unhelpful in that regard, if you're coming from JS you want I note that https://doc.rust-lang.org/nightly/std/keyword.async.html seems like maybe a better place for these aliases to point at. |
I think that's fair. I was thinking perhaps |
@yoshuawuyts I agree that linking to the keyword seems preferable. I would also suggest, if you're going to add an alias for |
@joshtriplett that's a good suggestion; will do! |
Considering it's doc changes, please ping the @rust-lang/docs (or the @rust-lang/rustdoc) teams in the future. Strongly like the idea though! |
(I actually don't think the rustdoc team should be pinged for doc aliases, that's libs team stuff. Once a rustdoc feature exists, it's up to the individual teams as to whete it gets used in their library) |
No you're right, with some steps back the rustdoc team doesn't have its word to say. However, at least pinging the doc team seems, even though if their approval isn't required seems like a valid point (and tagging as |
The doc team doesn't really exist anymore as a general doc team, the idea is that individual teams manage their own docs; so libs manages stdlib docs. |
Well, the std lib documentation is the public documentation so it's definitely part of whatever remains of the doc team. So please ping the doc team (or me?). |
This advice is outdated, i'll explain more on discord. The stdlib documentation is handled by the libs team. |
Considering how much I contributed to both the stdlib docs and the feature being used, it doesn't kill to at least ping me (or the docs team) so that I'm (we are) aware of it. And it can help help to simply have a second point of view sometimes. Also, it's nice to see that what I worked on is being used widely. :) |
I've updated the PR to point the |
Oh, having the async book linked already seems like a great way to me :) @bors r+ rollup |
📌 Commit 48d5874 has been approved by |
…k-Simulacrum Add the "async" and "promise" doc aliases to `core::future::Future` Adds the "async" and "promise" doc aliases to `core::future::Future`. This enables people who search for "async" or "promise" to find `Future`, which is Rust's core primitive for async programming. Thanks!
Rollup of 7 pull requests Successful merges: - rust-lang#78083 (Stabilize or_insert_with_key) - rust-lang#79211 (Add the "async" and "promise" doc aliases to `core::future::Future`) - rust-lang#79612 (Switch some links in compiler/ to intra-doc links) - rust-lang#80068 (Add `&mut` as an alias for 'reference' primitive) - rust-lang#80129 (docs: Edit rustc_ast::token::Token) - rust-lang#80133 (Suppress `CONST_ITEM_MUTATION` lint if a dereference occurs anywhere) - rust-lang#80155 (Fix typo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
core::future::Future
Adds the "async" and "promise" doc aliases to
core::future::Future
. This enables people who search for "async" or "promise" to findFuture
, which is Rust's core primitive for async programming. Thanks!