Do not render unstable items for rustc doc#74351
Conversation
|
r? @ollie27 (rust_highfive has picked a reviewer for you, use r? to override) |
78861c7 to
e182b74
Compare
ollie27
left a comment
There was a problem hiding this comment.
This PR will fix #54682.
The now unused CSS should be removed:
rust/src/librustdoc/html/static/themes/light.css
Lines 176 to 178 in c714eae
src/test/rustdoc/internal.rs
Outdated
There was a problem hiding this comment.
This test should be modified to check that the unstable marker is not added for rustc_private.
|
Also: can you remove the changes coming from #74359 please? It makes the changes more noisy than necessary. |
As rustc is permanently unstable. So marking every items with unstable is essential useless.
e182b74 to
47fea96
Compare
|
Resolved comment reviews. |
| // Render unstable items. But don't render "rustc_private" crates (internal compiler crates). | ||
| // Those crates are permanently unstable so it makes no sense to render "unstable" everywhere. | ||
| if let Some(stab) = item.stability.as_ref().filter(|stab| { | ||
| stab.level == stability::Unstable && stab.feature.as_deref() != Some("rustc_private") |
There was a problem hiding this comment.
nit: we should be comparing against rustc_span::sym::rustc_private to avoid hitting the string interner lock here.
There was a problem hiding this comment.
I would love to. But stab.feature is Option<String>. I have a discussion for merging Stability and more between rustdoc and rustc APIs https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Merge.20Stability.20in.20rustc_attr.20and.20rustdoc .
There was a problem hiding this comment.
Oh right this is rustdoc-cleaned stability. Fine as is then.
|
r=me with nit resolved (where I left the comment and elsewhere in modified code) |
|
@bors r+ |
|
📌 Commit 47fea96 has been approved by |
…er-warns, r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before:  After:  Nothing changes in unstable items of std: Before:  After:  Closes rust-lang#54682
…er-warns, r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before:  After:  Nothing changes in unstable items of std: Before:  After:  Closes rust-lang#54682
…er-warns, r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before:  After:  Nothing changes in unstable items of std: Before:  After:  Closes rust-lang#54682
…er-warns, r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before:  After:  Nothing changes in unstable items of std: Before:  After:  Closes rust-lang#54682
…er-warns, r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before:  After:  Nothing changes in unstable items of std: Before:  After:  Closes rust-lang#54682
…er-warns, r=Mark-Simulacrum Do not render unstable items for rustc doc See the zulip conversion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782 Before:  After:  Nothing changes in unstable items of std: Before:  After:  Closes rust-lang#54682
…arth Rollup of 8 pull requests Successful merges: - rust-lang#73101 (Resolve items for cross-crate imports relative to the original module) - rust-lang#73269 (Enable some timeouts in SGX platform) - rust-lang#74033 (Add build support for Cargo's build-std feature.) - rust-lang#74351 (Do not render unstable items for rustc doc) - rust-lang#74357 (Some `Symbol` related improvements) - rust-lang#74371 (Improve ayu rustdoc theme) - rust-lang#74386 (Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform) - rust-lang#74398 (Clean up E0723 explanation) Failed merges: r? @ghost
See the zulip conversation at https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rustc.20doc.3A.20.22internal.20compiler.20API.22.20warns.20are.20everywhere!/near/203850782
Before:


After:
Nothing changes in unstable items of std:


Before:
After:
Closes #54682