Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update documentation for doc_cfg feature #92818

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

GuillaumeGomez
Copy link
Member

Fixes #92484.

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 12, 2022
@rust-highfive
Copy link
Collaborator

r? @steveklabnik

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 12, 2022
@GuillaumeGomez GuillaumeGomez changed the title Update documentation for doc_cfg Update documentation for doc_cfg feature Jan 12, 2022
@GuillaumeGomez
Copy link
Member Author

r? @camelid

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

Updated!

Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

Just a couple more comments.

@@ -84,6 +84,37 @@ in documentation.
`#![feature(doc_cfg)]` feature gate. For more information, see [its chapter in the Unstable
Book][unstable-doc-cfg] and [its tracking issue][issue-doc-cfg].

Copy link
Member

Choose a reason for hiding this comment

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

I think we should maybe put doc_auto_cfg in its own section (perhaps called #![feature(doc_auto_cfg)] or something like that). It's kind of a freestanding feature—i.e., you can use it without using doc_cfg.

Make sure to change "An extension to this feature" to "An extension to doc_cfg".

Comment on lines +108 to +111
It'll render almost the same, the difference being that `doc` will also be displayed. To fix this,
you can use `doc_cfg_hide`:
Copy link
Member

Choose a reason for hiding this comment

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

Not a comment about the docs, but shouldn't hiding doc be the default behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

Once #92856 is merged, it'll be pretty easy to ignore it as well.

@camelid camelid added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2022
@GuillaumeGomez
Copy link
Member Author

@camelid Done!

Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

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

One last change, and then r=me

src/doc/rustdoc/src/unstable-features.md Outdated Show resolved Hide resolved
@GuillaumeGomez
Copy link
Member Author

@bors: r=camelid rollup

@bors
Copy link
Contributor

bors commented Jan 13, 2022

📌 Commit 241d977 has been approved by camelid

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 13, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 14, 2022
…r=camelid

Update documentation for doc_cfg feature

Fixes  rust-lang#92484.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 14, 2022
…r=camelid

Update documentation for doc_cfg feature

Fixes  rust-lang#92484.
This was referenced Jan 14, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#92045 (Don't fall back to crate-level opaque type definitions.)
 - rust-lang#92381 (Suggest `return`ing tail expressions in async functions)
 - rust-lang#92768 (Partially stabilize `maybe_uninit_extra`)
 - rust-lang#92810 (Deduplicate box deref and regular deref suggestions)
 - rust-lang#92818 (Update documentation for doc_cfg feature)
 - rust-lang#92840 (Fix some lints documentation)
 - rust-lang#92849 (Clippyup)
 - rust-lang#92854 (Use the updated Rust logo in rustdoc)
 - rust-lang#92864 (Fix a missing dot in the main item heading)

Failed merges:

 - rust-lang#92838 (Clean up some links in RELEASES)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3cbc448 into rust-lang:master Jan 14, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 14, 2022
@GuillaumeGomez GuillaumeGomez deleted the update-doc-cfg-doc branch January 14, 2022 20:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing documentation for rustdoc features doc_cfg_hide and doc_auto_cfg
8 participants