Uh oh!
There was an error while loading. Please reload this page.
Revamp rustdoc docs about documentation using cfg - #76855
Conversation
|
jyn514
commented
Sep 18, 2020
Hmm, you're right that |
steveklabnik
commented
Sep 18, 2020
Traditionally, we keep a very clean separation here; we only talk about stable things in stable docs, and unstable things in unstable docs. However, I think the rustdoc team should document its tool the way it wants to, and this is an odd case. I'm fine with this either way. |
jyn514
commented
Sep 18, 2020
Ok, I moved |
2787f9d to
bc12abeComparejyn514
commented
Sep 27, 2020
ping @ollie27 - does the new documentation look good to you? |
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
I'm not super happy with this wording, but I'm not sure how better to say it.
There was a problem hiding this comment.
No, the documentation is usually unconditional, e.g. cfg(any(doc, unix)), but the code is only present when the cfg is set.
jyn514
commented
Oct 3, 2020
r? @ollie27 |
Uh oh!
There was an error while loading. Please reload this page.
ollie27
left a comment
There was a problem hiding this comment.
Looks good to me. r=me with that one typo fixed and the commits squashed.
Uh oh!
There was an error while loading. Please reload this page.
- Move `cfg(doc)` out of `unstable-features`. It's not unstable. - Remove outdated reference to `everybody_loops`. - Improve wording in various places - Give an example of code this allows (and does not allow) - Link to `cfg(doc)` in `doc(cfg)` documentation. Since one is stable and the other is not, don't combine them. - Cleanup wording for `doc(cfg)` - Incorporate changes from rust-lang#76849 - Mention that `doc(cfg)` is also for features
jyn514
commented
Oct 5, 2020
@bors r=ollie27 rollup |
bors
commented
Oct 5, 2020
📌 Commit dc5a000 has been approved by |
Rollup of 13 pull requests Successful merges: - rust-lang#76388 (Add a note about the panic behavior of math operations on time objects) - rust-lang#76855 (Revamp rustdoc docs about documentation using `cfg`) - rust-lang#76995 (Reduce boilerplate with the matches! macro) - rust-lang#77228 (Add missing examples for MaybeUninit) - rust-lang#77528 (Avoid unchecked casts in net parser) - rust-lang#77534 (Disallow overriding forbid in same scope) - rust-lang#77555 (Allow anyone to set regression labels) - rust-lang#77558 (Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml}) - rust-lang#77559 (Fix rustdoc warnings about invalid Rust syntax) - rust-lang#77560 (Fix LitKind's byte buffer to use refcounted slice) - rust-lang#77573 (Hint doc use convert::identity relative link) - rust-lang#77587 (Fix span for unicode escape suggestion.) - rust-lang#77591 (Record `expansion_that_defined` into crate metadata) Failed merges: r? `@ghost`
cfg(doc)out ofunstable-features. It's not unstable.everybody_loops.cfg(doc)indoc(cfg)documentation. Since one is stableand the other is not, don't combine them.
doc(cfg)doc(cfg)is also for featuresAddresses #76849 (comment).
Obsoletes #76849 (I made sure to fix the weird dashes too).
r? @steveklabnik