-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustdoc: incorporate stability index throughout #15263
Conversation
annotator.index | ||
} | ||
/// Construct the stability index for a crate being compiled. | ||
pub fn build_index(krate: &Crate) -> Index { |
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.
Why this change?
@huonw Thanks for catching that -- leftovers from a larger refactor that I ended up backing out. I've reverted the function back to a constructor method. |
}); | ||
let traits = traits.collect::<Vec<&(clean::Impl, Option<String>)>>(); | ||
|
||
let (non_trait, traits) = v.partitioned(|i| i.impl_.trait_.is_none()); |
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.
how clever!
This is amazing, I can't wait to see this evolve over time! |
This commit hooks rustdoc into the stability index infrastructure in two ways: 1. It looks up stability levels via the index, rather than by manual attributes. 2. It adds stability level information throughout rustdoc output, rather than just at the top header. In particular, a stability color (with mouseover text) appears next to essentially every item that appears in rustdoc's HTML output. Along the way, the stability index code has been lightly refactored.
@alexcrichton Updated:
I didn't bother trying to stretch out the stability blaze to go alongside the method documentation. Let's start with this look, and we can iterate later. |
Random thought I just had inspired by this, rustdoc could emit a crate-summary page coloured by stability, e.g. then it'll be easy to tell at a glance what's stable and what's not (and so how much work we have left to do). (Sorry for the really basic sketch: it could be on a per-crate basis, or by-default collapse items with inherited stability etc.) |
@huonw Awesome sketch :) I'm hoping to work on some kind of stability dashboard infrastructure, which will include a json dump. I'd like to do http://huonw.github.io/isrustfastyet/ graphs for number of stable/unstable/experimental items for at least libstd as well. I'll catch you on IRC to discuss at some point soon. |
…chton This commit hooks rustdoc into the stability index infrastructure in two ways: 1. It looks up stability levels via the index, rather than by manual attributes. 2. It adds stability level information throughout rustdoc output, rather than just at the top header. In particular, a stability color (with mouseover text) appears next to essentially every item that appears in rustdoc's HTML output. Along the way, the stability index code has been lightly refactored.
…ykril Enable derive feature for serde in lsp-server Publishing failed due to this
This commit hooks rustdoc into the stability index infrastructure in two
ways:
attributes.
than just at the top header. In particular, a stability color (with
mouseover text) appears next to essentially every item that appears
in rustdoc's HTML output.
Along the way, the stability index code has been lightly refactored.