| Age | Commit message (Collapse) | Author | Lines |
|
Hide type declarations by default
I'm not very happy for the moment about the rendering but the bases are here:
<img width="610" alt="screen shot 2018-03-27 at 11 56 27" src="https://user-images.githubusercontent.com/3050060/37960492-0e045954-31b6-11e8-9cea-1ef8a3f980c4.png">
r? @QuietMisdreavus
|
|
Fix trait implementation not collapsing docs
r? @QuietMisdreavus
|
|
r=QuietMisdreavus
Fix collapse toggle insertions on impl with docs
Just went through this one randomly... When an impl has docs, the collapse toggle isn't generated. This fixes it.
r? @QuietMisdreavus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remember state of top-level collapse toggle widget
This change allows the big top-right expand/collapse toggle to remember its setting across navigation or page reloads. Prior to this change, there was this annoyance:
- browse to some docs
- Click the minus button to collapse them
- browse to other docs (or reload the page)
- Everything is expanded again
The solution is based on storing a simple boolean flag in localStorage. I think it's a good improvement, but it does introduce the following potentially surprising behavior:
- browse to some docs
- click the minus button to collapse them
- click to expand a particular item (not the main top-right big one)
- reload the page, everything is collapsed
Paired with @debugsteven on this.
|
|
|
|
|
|
|
|
|
|
|
|
r=QuietMisdreavus
Rustdoc theme securities
Fixes #48375.
Fixes #48376.
r? @steveklabnik
cc @QuietMisdreavus
|
|
r=GuillaumeGomez,QuietMisdreavus
rustdoc: Foldable impl blocks
Addresses #40363, #45720, #24483, #23986 and so on
* Expands and refactors collapseDocs and toggleAllDocs
* Adds [-] toggle to all impls (including inherent impl)
* Makes it hiding though main css file, not though element inline style
May need to be addressed:
* "[-]" and anchor link copier are overlaid a bit
* Inherent methods are also hidden by the global [-] toggle.
* Auto-collapsing "Iterator" and so on by default is not implemented yet
* Tested only shallowly and only in Chromiuim
* No tests. Are there tests for css/js part here?
* The new implementation may be a bit slower.
What next steps are need to be done before the integration?
|
|
|
|
|
|
|
|
A new section is added to both both struct and trait doc pages.
On struct/enum pages, a new 'Auto Trait Implementations' section displays any
synthetic implementations for auto traits. Currently, this is only done
for Send and Sync.
On trait pages, a new 'Auto Implementors' section displays all types
which automatically implement the trait. Effectively, this is a list of
all public types in the standard library.
Synthesized impls for a particular auto trait ('synthetic impls') take
into account generic bounds. For example, a type 'struct Foo<T>(T)' will
have 'impl<T> Send for Foo<T> where T: Send' generated for it.
Manual implementations of auto traits are also taken into account. If we have
the following types:
'struct Foo<T>(T)'
'struct Wrapper<T>(Foo<T>)'
'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes
this sound somehow
Then Wrapper will have the following impl generated:
'impl<T> Send for Wrapper<T>'
reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send'
to hold
Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are
taken into account by synthetic impls
However, if a type can *never* implement a particular auto trait
(e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be
generated (in this case, 'impl<T> !Send for MyStruct<T>')
All of this means that a user should be able to copy-paste a synthetic
impl into their code, without any observable changes in behavior
(assuming the rest of the program remains unchanged).
|
|
mobile too)
|
|
|
|
|
|
|
|
|
|
|
|
Addresses #40363, #45720, #24483, #23986 and so on
* Expands and refactors collapseDocs and toggleAllDocs
* Adds [-] toggle to all impls (including inherent impl)
* Makes it hiding though main css file, not though element style
May need to be addressed:
* "[-]" and anchor link copier are overlaid a bit
* Inherent methods are also hidden by the global [-] toggle.
* Auto-collapsing "Iterator" and so on by default is not implemented yet
* Tested only shallowly and only in Chromiuim
* No tests. Are there tests for css/js part here?
* The new implementation may be a bit slower.
|
|
Rollup of 14 pull requests
- Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672
- Failed merges:
|
|
|
|
|
|
|
|
|
|
Fixed intentaion (tabs -> spaces)
Added trailing newline
|
|
Escape now removes focus from the search bar
|
|
|
|
Fix dynamic crates listing in doc sidebar
Fixes #46687.
r? @QuietMisdreavus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Speedup search loading when search url is received
Fixes #45971.
r? @nrc
cc @rust-lang/docs
|
|
Change "Types/modules" title of search tab to be more accurate
From issue #45787. Used "In name" as per suggestion from @Seeker14491.
|
|
Tabs are "In Names", "In Parameters", and "In Return Types".
|
|
|
|
|
|
Fix path search
Fixes #46015.
r? @QuietMisdreavus
|
|
|