-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Standard library rustdoc: show since when a function is const #76998
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
Strawman proposal: something like |
This was referenced Oct 11, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Oct 13, 2020
Switch rustdoc from `clean::Stability` to `rustc_attr::Stability` This gives greater type safety and is less work to maintain on the rustdoc end. It also makes rustdoc more consistent with rustc. Noticed this while working on rust-lang#76998. - Remove `clean::Stability` in favor of `rustc_attr::Stability` - Remove `impl Clean for Stability`; it's no longer necessary r? @GuillaumeGomez cc @petrochenkov
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Oct 14, 2020
Switch rustdoc from `clean::Stability` to `rustc_attr::Stability` This gives greater type safety and is less work to maintain on the rustdoc end. It also makes rustdoc more consistent with rustc. Noticed this while working on rust-lang#76998. - Remove `clean::Stability` in favor of `rustc_attr::Stability` - Remove `impl Clean for Stability`; it's no longer necessary r? @GuillaumeGomez cc @petrochenkov
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Nov 18, 2020
Add `Item::from_def_id_and_kind` to reduce duplication in rustdoc This makes it harder to make typos, and also makes it much more clear what's intentionally different rather than a typo (look for `what_rustc_thinks`). Found this while working on rust-lang#76998, I really didn't want to add `const_visibility` in 20 different places. r? `@GuillaumeGomez`
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Nov 24, 2020
…meGomez Make `fold_item_recur` non-nullable This gets rid of a bunch of `unwrap()`s and makes it a little more clear what's going on. Originally I wanted to make `fold_item` non-nullable too, which would have been a lot nicer to work with, but unfortunately `stripper` does actually return `None` in some places. I might make a follow-up moving stripper to be special and not a pass so that passes can be non-nullable. Found while working on rust-lang#76998.
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Nov 27, 2020
Cleanup more of rustdoc - Use `Item::from_def_id` for StructField - Use `from_def_id_and_parts` for primitives and keywords - Take `String` instead of `Symbol` in `from_def_id` - this avoids having to intern then immediately stringify the existing string. - Remove unused `get_stability` and `get_deprecation` - Remove unused `attrs` field from `primitives` - Remove unused `attrs` field from `keywords` This will probably conflict with rust-lang#79335 and I would prefer for that PR to land first - I'm anxious for rust-lang#77467 to land :) Makes rust-lang#76998 easier to add. r? `@GuillaumeGomez`
Mentoring instructions: This should be a lot easier after all the cleanups.
|
@rustbot claim |
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Dec 1, 2020
Show since when a function is const in stdlib Fixes rust-lang#76998 This makes it so that functions with the `#[rustc_const_stable()]` attribute now show from what version they were stably declared const, alongside what version they were declared stable. Example from `Result`:  r? `@jyn514`
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-const-eval
Area: Constant evaluation, covers all const contexts (static, const fn, ...)
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
The standard library has
#[rustc_const_stable]
attributes for all stableconst fn
. These containsince
information. It would be great if rustdoc could render that, indicating since when this function is const-stable.The text was updated successfully, but these errors were encountered: