-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 an "unstable features" chapter to the rustdoc book #49028
add an "unstable features" chapter to the rustdoc book #49028
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
While investigating |
I'm not sure whether to document Otherwise, short of a decision on @rust-lang/docs Can y'all take a look at this and make sure i'm not being misleading or specifying too much? |
I've gone ahead and added sections about |
|
||
This is used by the error index to ensure that the samples that correspond to a given error number | ||
properly emit that error code. However, these error codes aren't guaranteed to be the only thing | ||
that a piece of code emits from version to version, so this in unlikely to be stabilized in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*is unlikely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is soo great, awesome work @QuietMisdreavus 🎉
special marker attribute on them: `#[doc(spotlight)]`. This means that you could apply this | ||
attribute to your own trait to include it in the "Important Traits" dialog in documentation. | ||
|
||
The `#[doc(spotlight)]` attribute is controlled by a feature gate. For more information, see [its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is controlled by a feature gate
would it be good to mention the name of the feature gate directly in this document?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my original idea was that by linking to the Unstable Book, people could easily find the name of the feature gate that way, but it's not that much more to write it out here as well. I'll add it.
|
||
[RFC 1990]: https://github.com/rust-lang/rfcs/pull/1990 | ||
|
||
`#[doc(include = "...")]` is currently controlled by a feature gate. For more information, see [its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is currently controlled by a feature gate
would it be good to mention the name of the feature gate directly in this document?
@frewsxcv What do you think of it now? |
r=me if you don't have any other additions |
@bors r=frewsxcv Nope, that's all i had! Thanks so much! |
📌 Commit b996f9d has been approved by |
@bors rollup |
…corners-of-rustdoc, r=frewsxcv add an "unstable features" chapter to the rustdoc book There are several rustdoc features that currently are undocumented, but also don't fit with the rest of the Rustdoc Book since they're also unstable. Some of these have corresponding feature gates and chapters in the Unstable Book, but many don't, and i wanted a place to talk about them officially. Goal: talk about everything rustdoc can do that needs nightly - [x] Feature gates (extensions to the doc attribute that can be caught by the compiler) - [x] doc(cfg) - [x] doc(masked) - [x] doc(spotlight) - [x] doc(include) - [x] Command-line flags (features that require a CLI flag to use, where the flag itself is a `-Z` command or otherwise requires `-Z unstable-options` before rustdoc will accept it) - [x] markdown-before-content/markdown-after-content - [x] playground-url - [x] display-warnings - [x] crate-version - [x] linker - [x] sort-modules-by-appearance - [x] themes/theme-checker - [x] resource-suffix - [x] `-Z force-unstable-if-unmarked` - [x] Nightly-gated functionality (features that are gated by requiring a nightly build without needing a CLI flag or a feature gate to unlock) - [x] intra-links - [x] error numbers for `compile_fail` doctests
…corners-of-rustdoc, r=frewsxcv add an "unstable features" chapter to the rustdoc book There are several rustdoc features that currently are undocumented, but also don't fit with the rest of the Rustdoc Book since they're also unstable. Some of these have corresponding feature gates and chapters in the Unstable Book, but many don't, and i wanted a place to talk about them officially. Goal: talk about everything rustdoc can do that needs nightly - [x] Feature gates (extensions to the doc attribute that can be caught by the compiler) - [x] doc(cfg) - [x] doc(masked) - [x] doc(spotlight) - [x] doc(include) - [x] Command-line flags (features that require a CLI flag to use, where the flag itself is a `-Z` command or otherwise requires `-Z unstable-options` before rustdoc will accept it) - [x] markdown-before-content/markdown-after-content - [x] playground-url - [x] display-warnings - [x] crate-version - [x] linker - [x] sort-modules-by-appearance - [x] themes/theme-checker - [x] resource-suffix - [x] `-Z force-unstable-if-unmarked` - [x] Nightly-gated functionality (features that are gated by requiring a nightly build without needing a CLI flag or a feature gate to unlock) - [x] intra-links - [x] error numbers for `compile_fail` doctests
There are several rustdoc features that currently are undocumented, but also don't fit with the rest of the Rustdoc Book since they're also unstable. Some of these have corresponding feature gates and chapters in the Unstable Book, but many don't, and i wanted a place to talk about them officially.
Goal: talk about everything rustdoc can do that needs nightly
-Z
command or otherwise requires-Z unstable-options
before rustdoc will accept it)-Z force-unstable-if-unmarked
compile_fail
doctests