Uh oh!
There was an error while loading. Please reload this page.
Document doc(keyword) unstable attribute - #90398
Conversation
This comment has been minimized.
This comment has been minimized.
a2260c2 to
2ecc67bCompare
camelid
left a comment
There was a problem hiding this comment.
I don't think we should be documenting #[doc(keyword)] and #[doc(primitive)] beyond saying, "They're permanently unstable and only meant to be used by the standard library."
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
camelid
commented
Oct 29, 2021
cc @rust-lang/rustdoc for discussion about whether we should be documenting |
GuillaumeGomez
commented
Oct 29, 2021
Except that if you use macro and proc-macro, you might want to add new keywords. Wouldn't it make sense to document them then? I still think that this feature should get stabilized at some point. |
camelid
commented
Oct 29, 2021
The "keywords" in macros that you are describing are not really keywords; they are limited to the scope of the macro invocation. Outside of an invocation of that macro, they are not keywords. As @Manishearthsaid, custom macro keywords should be documented in the macro itself, not using |
camelid
commented
Oct 29, 2021
In some ways, I wonder if it would make sense for us to put |
Manishearth
commented
Oct 30, 2021
Right, macros can't actually add new keywords, they can in their own context parse identifiers in a way that may seem keywordlike. Which can be documented on the macro itself. |
GuillaumeGomez
commented
Oct 30, 2021
That makes sense. I'll reword the documentation then! @camelid Putting them behind the same feature would make sense. I'll send a PR for that. :) |
2ecc67b to
2813fc9Compare
camelid
left a comment
There was a problem hiding this comment.
Two nits, but also: wasn't the plan to change the docs here so they make it clear that these attributes are for internal use only? Or were you going to do that in the rustdoc_internals PR?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
GuillaumeGomez
commented
Oct 30, 2021
We don't know what the future will be made of. Maybe we will allow to create new keywords in the future? Who knows? At least now, we simply explain how we do it in the standard library and that's it. Fixing the two nits quickly. |
2813fc9 to
075e2f6Comparejyn514
commented
Oct 30, 2021
@GuillaumeGomez if we change our minds in the future, we can change the documentation at the same time. For now I think we should make it clear that these aren't intended to be stabilized. |
GuillaumeGomez
commented
Oct 30, 2021
We didn't say so anywhere else as far as I can see, so seems weird to start it now... |
jyn514
commented
Oct 30, 2021
@GuillaumeGomez the whole point of #90420 is that these are not intended to be used by anyone other than the standard library. |
GuillaumeGomez
commented
Oct 30, 2021
Fine, fine... |
075e2f6 to
c060896CompareGuillaumeGomez
commented
Oct 30, 2021
Done. |
doc(keyword) unstable attribute
camelid
left a comment
There was a problem hiding this comment.
r=me with the following three comments addressed
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c060896 to
7bea8eaCompareGuillaumeGomez
commented
Oct 31, 2021
@bors: r=camelid rollup |
bors
commented
Oct 31, 2021
📌 Commit 7bea8ea has been approved by |
…amelid Document `doc(keyword)` unstable attribute r? `@camelid`
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#89826 (Feature gate + make must_not_suspend allow-by-default) - rust-lang#89929 (Handling submodule update failures more gracefully from x.py) - rust-lang#90333 (rustdoc: remove flicker during page load) - rust-lang#90349 (Fix rare ICE during typeck in rustdoc scrape_examples) - rust-lang#90398 (Document `doc(keyword)` unstable attribute) - rust-lang#90441 (Test that promotion follows references when looking for drop) - rust-lang#90450 (Remove `rustc_hir::hir_id::HirIdVec`) - rust-lang#90452 (Remove unnecessary `Option` from `promote_candidate` return type) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…ature, r=camelid Create rustdoc_internals feature gate As suggested by `@camelid` [here](rust-lang#90398 (comment)), since `doc_keyword` and `doc_primitive` aren't meant to be stabilized, we could put them behind a same feature flag. This is pretty much what it would look like (needs to update the tests too). The tracking issue is rust-lang#90418. What do you think `@rust-lang/rustdoc` ?
…ature, r=camelid Create rustdoc_internals feature gate As suggested by ``@camelid`` [here](rust-lang#90398 (comment)), since `doc_keyword` and `doc_primitive` aren't meant to be stabilized, we could put them behind a same feature flag. This is pretty much what it would look like (needs to update the tests too). The tracking issue is rust-lang#90418. What do you think ``@rust-lang/rustdoc`` ?
r? @camelid