Skip to content
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

Rollup of 8 pull requests #74422

Merged
merged 53 commits into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c4b0265
Enable some timeouts in SGX platform
mzohreva Jun 12, 2020
d7dc64b
Handle spurious wakeups in wait_timeout_sgx
mzohreva Jun 12, 2020
c5d1fcd
Allow more ui tests for SGX
mzohreva Jun 12, 2020
3442d23
Improve wait_timeout_sgx, simplify usercalls::wait
mzohreva Jun 18, 2020
c457b67
Remove unnecessary check in SGX wait usercall
mzohreva Jul 1, 2020
1466598
Address review comments
mzohreva Jul 11, 2020
f970632
Don't render unstable for rustc docs
tesuji Jul 15, 2020
47fea96
Remove unused CSS rules for internal rustc items
tesuji Jul 15, 2020
8c6c1dd
Automatically calculate std::env::consts::ARCH.
ehuss May 21, 2020
432b4c1
Use cfg_if in libtest.
ehuss May 22, 2020
9e58908
Use cfg_if in libpanic_abort.
ehuss May 22, 2020
ef6c026
Improve ayu rustdoc theme
Aloso Jul 15, 2020
6e9a1de
Introduce restricted-std feature.
ehuss Jun 1, 2020
cee9f05
Tweak formatting.
ehuss Jul 7, 2020
0eb293d
Use an allow-list of platforms that support std.
ehuss Jul 7, 2020
3d44d3c
Simplify os_str_bytes cfg expression.
ehuss Jul 7, 2020
d08bb40
Remove drop-shadow
Aloso Jul 15, 2020
85c25ae
Move usercall_wait_timeout to abi::usercalls::wait_timeout
mzohreva Jul 15, 2020
1813ae7
Add RISC-V GNU/Linux to src/tools/build-manifest as a host platform
msizanoen1 Jul 16, 2020
03bbe9d
Clean up E0723 explanation
GuillaumeGomez Jul 16, 2020
8e92f4f
Remove unused `cx` parameter from `pathvec_std` and `path_std`.
nnethercote Jul 14, 2020
bccff14
Simplify `LifetimeBounds`.
nnethercote Jul 14, 2020
5271e98
Use get_module instead of `module_map` for `resolve_str_path_error`
jyn514 Jun 6, 2020
848a766
Use the scope of the imported variable for resolution, not the curren…
jyn514 Jun 6, 2020
69bd13f
Use DefId for modules
jyn514 Jun 7, 2020
c3d9a73
Don't panic on fake IDs
jyn514 Jun 7, 2020
20106d5
unwrap() -> expect()
jyn514 Jun 7, 2020
24c3d85
Make sure that module_id is actually a module
jyn514 Jun 7, 2020
9542e23
Add tests for basic intra-doc links
jyn514 Jun 8, 2020
99f34d8
Remove warnings
jyn514 Jun 8, 2020
e78d499
Add test for re-exports
jyn514 Jun 8, 2020
9eb6394
Add test for documenting the re-export
jyn514 Jun 8, 2020
71fe8f7
Add test for submodules in inner crate
jyn514 Jun 10, 2020
432b043
Move import to top of function
jyn514 Jun 10, 2020
769acba
#![deny(intra_doc_resolution_failure)]
jyn514 Jun 10, 2020
5f49f55
rand -> my_rand
jyn514 Jun 10, 2020
e63e5cd
Support intra-doc links on macro re-exports
jyn514 Jun 12, 2020
82b3b07
Support intra-doc links on trait and module re-exports
jyn514 Jul 11, 2020
0ad1dcd
Add more debugging
jyn514 Jul 12, 2020
8387e38
Add (broken and ignored) test for #73829
jyn514 Jul 15, 2020
c46e038
Fix invalid lint
jyn514 Jul 16, 2020
9f00808
Remove `ExtCtxt::ident_of`.
nnethercote Jul 14, 2020
002af4d
Avoid storing `SymbolStr` in a struct.
nnethercote Jul 13, 2020
f03c7f8
Add `UnsafetyViolationDetails`.
nnethercote Jul 14, 2020
a4ba181
Remove some `Symbol:as_str()` calls.
nnethercote Jul 14, 2020
ec93d56
Rollup merge of #73101 - jyn514:rustdoc-absolute-module, r=Manishearth
Manishearth Jul 17, 2020
41d956b
Rollup merge of #73269 - mzohreva:mz/sgx-wait-timeout, r=jethrogb
Manishearth Jul 17, 2020
5751c7f
Rollup merge of #74033 - ehuss:std-compile-all-platforms, r=Mark-Simu…
Manishearth Jul 17, 2020
0e70884
Rollup merge of #74351 - lzutao:remove-rustc-internal-compiler-warns,…
Manishearth Jul 17, 2020
c60b051
Rollup merge of #74357 - nnethercote:symbol-related-improvements, r=o…
Manishearth Jul 17, 2020
874097c
Rollup merge of #74371 - Aloso:patch-1, r=GuilliameGomez
Manishearth Jul 17, 2020
b1ba961
Rollup merge of #74386 - msizanoen1:riscv-add-manifest-host, r=pietro…
Manishearth Jul 17, 2020
5bb9bef
Rollup merge of #74398 - GuillaumeGomez:cleanup-e0723, r=Dylan-DPC
Manishearth Jul 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't render unstable for rustc docs
As rustc is permanently unstable. So marking every items
with unstable is essential useless.
  • Loading branch information
tesuji committed Jul 15, 2020
commit f97063259ede6ca4249b3a805820b474a61ed4d6
45 changes: 17 additions & 28 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2229,12 +2229,15 @@ fn stability_tags(item: &clean::Item) -> String {
tags += &tag_html("deprecated", message);
}

if let Some(stab) = item.stability.as_ref().filter(|s| s.level == stability::Unstable) {
if stab.feature.as_deref() == Some("rustc_private") {
tags += &tag_html("internal", "Internal");
} else {
tags += &tag_html("unstable", "Experimental");
}
// The "rustc_private" crates are permanently unstable so it makes no sense
// to render "unstable" everywhere.
if item
.stability
.as_ref()
.map(|s| s.level == stability::Unstable && s.feature.as_deref() != Some("rustc_private"))
== Some(true)
{
tags += &tag_html("unstable", "Experimental");
}

if let Some(ref cfg) = item.attrs.cfg {
Expand Down Expand Up @@ -2285,15 +2288,13 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
));
}

if let Some(stab) = item.stability.as_ref().filter(|stab| stab.level == stability::Unstable) {
let is_rustc_private = stab.feature.as_deref() == Some("rustc_private");

let mut message = if is_rustc_private {
"<span class='emoji'>⚙️</span> This is an internal compiler API."
} else {
"<span class='emoji'>🔬</span> This is a nightly-only experimental API."
}
.to_owned();
// 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")
}) {
let mut message =
"<span class='emoji'>🔬</span> This is a nightly-only experimental API.".to_owned();

if let Some(feature) = stab.feature.as_deref() {
let mut feature = format!("<code>{}</code>", Escape(&feature));
Expand All @@ -2309,17 +2310,6 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
}

if let Some(unstable_reason) = &stab.unstable_reason {
// Provide a more informative message than the compiler help.
let unstable_reason = if is_rustc_private {
"This crate is being loaded from the sysroot, a permanently unstable location \
for private compiler dependencies. It is not intended for general use. Prefer \
using a public version of this crate from \
[crates.io](https://crates.io) via [`Cargo.toml`]\
(https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html)."
} else {
unstable_reason
};

let mut ids = cx.id_map.borrow_mut();
message = format!(
"<details><summary>{}</summary>{}</details>",
Expand All @@ -2335,8 +2325,7 @@ fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
);
}

let class = if is_rustc_private { "internal" } else { "unstable" };
stability.push(format!("<div class='stab {}'>{}</div>", class, message));
stability.push(format!("<div class='stab unstable'>{}</div>", message));
}

if let Some(ref cfg) = item.attrs.cfg {
Expand Down
10 changes: 6 additions & 4 deletions src/test/rustdoc/internal.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// compile-flags: -Z force-unstable-if-unmarked

// @matches internal/index.html '//*[@class="docblock-short"]/span[@class="stab internal"]' \
// 'Internal'
// Check that the unstable marker is not added for "rustc_private".

// @!matches internal/index.html '//*[@class="docblock-short"]/span[@class="stab unstable"]'
// @!matches internal/index.html '//*[@class="docblock-short"]/span[@class="stab internal"]'
// @matches - '//*[@class="docblock-short"]' 'Docs'

// @has internal/struct.S.html '//*[@class="stab internal"]' \
// 'This is an internal compiler API. (rustc_private)'
// @!has internal/struct.S.html '//*[@class="stab unstable"]'
// @!has internal/struct.S.html '//*[@class="stab internal"]'
/// Docs
pub struct S;

Expand Down