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

Trait impl settings #52151

Merged
merged 2 commits into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/libcore/num/flt2dec/strategy/dragon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
// except according to those terms.

/*!
Almost direct (but slightly optimized) Rust translation of Figure 3 of [1].
Almost direct (but slightly optimized) Rust translation of Figure 3 of \[1\].

[1] Burger, R. G. and Dybvig, R. K. 1996. Printing floating-point numbers
\[1\] Burger, R. G. and Dybvig, R. K. 1996. Printing floating-point numbers
quickly and accurately. SIGPLAN Not. 31, 5 (May. 1996), 108-116.
*/

Expand Down
4 changes: 2 additions & 2 deletions src/libcore/num/flt2dec/strategy/grisu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
// except according to those terms.

/*!
Rust adaptation of Grisu3 algorithm described in [1]. It uses about
Rust adaptation of Grisu3 algorithm described in \[1\]. It uses about
1KB of precomputed table, and in turn, it's very quick for most inputs.

[1] Florian Loitsch. 2010. Printing floating-point numbers quickly and
\[1\] Florian Loitsch. 2010. Printing floating-point numbers quickly and
accurately with integers. SIGPLAN Not. 45, 6 (June 2010), 233-243.
*/

Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,8 @@ impl<'a> Settings<'a> {
settings: vec![
("item-declarations", "Auto-hide item declarations.", true),
("item-attributes", "Auto-hide item attributes.", true),
("trait-implementations", "Auto-hide trait implementations documentation",
true),
("go-to-only-result", "Directly go to item in search if there is only one result",
false),
],
Expand Down
22 changes: 12 additions & 10 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1938,17 +1938,19 @@
if (collapse) {
toggleAllDocs(pageId, true);
}
onEach(document.getElementsByClassName("collapse-toggle"), function(e) {
// inherent impl ids are like 'impl' or impl-<number>'.
// they will never be hidden by default.
var n = e.parentNode;
if (n.id.match(/^impl(?:-\d+)?$/) === null) {
// Automatically minimize all non-inherent impls
if (collapse || hasClass(n, 'impl')) {
collapseDocs(e, "hide", pageId);
if (getCurrentValue('rustdoc-trait-implementations') !== "false") {
onEach(document.getElementsByClassName("collapse-toggle"), function(e) {
// inherent impl ids are like 'impl' or impl-<number>'.
// they will never be hidden by default.
var n = e.parentNode;
if (n.id.match(/^impl(?:-\d+)?$/) === null) {
// Automatically minimize all non-inherent impls
if (collapse || hasClass(n, 'impl')) {
collapseDocs(e, "hide", pageId);
}
}
}
});
});
}
}

var x = document.getElementById('toggle-all-docs');
Expand Down