Mazdak Farrokhzad
4bd9168d7f
Rollup merge of #66514 - GuillaumeGomez:fix-search-filter-save, r=kinnison
...
Fix selected crate search filter
Fixes #62929 .
r? @kinnison
2019-11-20 18:32:10 +01:00
Mazdak Farrokhzad
423137b779
Rollup merge of #65665 - tspiteri:italic-and-update-SourceCodePro, r=GuillaumeGomez
...
Update Source Code Pro and include italics
Fixes #65502 .
A few notes:
* As stated in #65502 , this does increase the download size.
* Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged.
* The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600 )).
2019-11-20 12:58:26 +01:00
Guillaume Gomez
530d866aef
Apply review comments
2019-11-18 16:43:48 +01:00
Guillaume Gomez
7cbf31aa04
rename check-theme option into check-themes
2019-11-18 16:43:48 +01:00
Guillaume Gomez
bbfd63c89a
Improve documentation, add checks for themes option arguments, make sure the themes file names are js compatible
2019-11-18 16:43:48 +01:00
Guillaume Gomez
e365120243
Prevent invalid html characters in themes name
2019-11-18 16:43:48 +01:00
Guillaume Gomez
00ef5c1b98
Fix selected crate search filter
2019-11-18 14:15:00 +01:00
Mazdak Farrokhzad
59e79ff137
Rollup merge of #64696 - GuillaumeGomez:rustdoc-sub-settings, r=kinnison
...
[rustdoc] add sub settings
This PR is to give a finer control over what types are automatically expanded or not as well as the possibility to add sub-settings in the settings page.

r? @Mark-Simulacrum
2019-11-07 14:27:21 +01:00
Guillaume Gomez
8784b074e7
Change sub-setting CSS class to sub-settings
2019-11-04 11:39:00 +01:00
Nicholas Nethercote
b9cef6984b
Simplify various Symbol
use points.
...
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch
of unnecessary sigils.
2019-11-02 09:01:02 +11:00
Guillaume Gomez
79956b96e8
add sub settings in rustdoc
2019-10-29 13:54:11 +01:00
Mazdak Farrokhzad
fb12c70852
rustc, rustc_passes: don't depend on syntax_expand.
...
This is done by moving some data definitions to syntax::expand.
2019-10-27 17:05:57 +01:00
Trevor Spiteri
ea9519bf16
Update Source Code Pro and include italics
2019-10-21 16:25:03 +02:00
Guillaume Gomez
87744841c8
Add option to disable keyboard shortcuts in docs
2019-10-21 11:36:52 +02:00
Mazdak Farrokhzad
d420d719c4
move syntax::ext to new crate syntax_expand
2019-10-16 10:59:53 +02:00
Mazdak Farrokhzad
742ec4b9bf
ast: remove implicit pprust dependency via Display.
...
Instead just use `pprust::path_to_string(..)` where needed.
This has two benefits:
a) The AST definition is now independent of printing it.
(Therefore we get closer to extracting a data-crate.)
b) Debugging should be easier as program flow is clearer.
2019-10-13 06:58:51 +02:00
Oliver Middleton
dc295318fc
rustdoc: Fix default logo filename
2019-09-29 22:17:03 +01:00
Mark Rousskov
cac7e5faed
Remove unused arguments
2019-09-23 07:48:24 -04:00
Mark Rousskov
53acfc3f8a
Utilize shared error codes rather than re-querying env
2019-09-23 07:48:24 -04:00
Mark Rousskov
583a81dc5e
Remove pointless or
2019-09-23 07:48:24 -04:00
Mark Rousskov
61f16920b3
Remove needless Rc<RefCell<...>>
2019-09-23 07:48:24 -04:00
Mark Rousskov
5f58834fb8
Provide helper for synthesizing paths with resource suffix
2019-09-23 07:48:24 -04:00
Mark Rousskov
0ad789aa5b
Stylistic fix -- remove double impl
2019-09-13 19:44:45 -04:00
Mark Rousskov
6e0b0d4d70
Move cache into Context, avoid TLS
...
This doesn't move everything over as cache() is pretty annoying to
remove fully, but it gets the ball rolling.
2019-09-13 19:44:45 -04:00
Mark Rousskov
f5ed0fd1c0
Move Cache
generation to separate module
2019-09-13 19:44:45 -04:00
Mark Rousskov
f4bb5a7c1a
Move playground to shared context
2019-09-13 19:44:45 -04:00
Mark Rousskov
c26518086e
Move error codes to shared context
2019-09-13 19:44:45 -04:00
Mark Rousskov
98c94f6f77
Move edition field out of Context
2019-09-13 19:44:44 -04:00
Mark Rousskov
e0e0c3787c
Replace SlashChecker with ensure_trailing_slash
2019-09-13 19:44:44 -04:00
Mark Rousskov
aa4055cd6c
Simplify render_spotlight_traits
2019-09-13 19:44:44 -04:00
Mark Rousskov
8a9dab3a20
Remove *Space wrappers in favor of direct impls or functions
2019-09-13 19:44:44 -04:00
Mark Rousskov
ec349bef24
Unwrap Visibility fields
...
There's not really any reason to not have the visibility default to
inherited, and this saves us the trouble of checking everywhere for
whether we have a visibility or not.
2019-09-13 19:44:44 -04:00
Mark Rousskov
04b27efa00
Move to print functions on types instead of impl fmt::Display
...
This will eventually allow us to easily pass in more parameters to the
functions without TLS or other such hacks
2019-09-13 19:44:44 -04:00
Mark Rousskov
02c5c5cb59
Move to buffers throughout print_item
2019-09-07 19:33:43 -04:00
Mark Rousskov
c1c1e86d5a
Item to function
2019-09-07 19:31:59 -04:00
Mark Rousskov
a502e85603
AllTypes to function
2019-09-07 19:31:59 -04:00
Mark Rousskov
17bef30d0b
Settings to function
2019-09-07 19:31:59 -04:00
Mark Rousskov
3f0e77f19c
layout::render takes Print instead of fmt::Display
2019-09-07 19:31:58 -04:00
Mark Rousskov
d5f147086b
De-indent all fmt::Display impls for later replacement to functions
2019-09-07 19:31:58 -04:00
Mark Rousskov
eefaee1af4
Delete Sidebar struct in favor of FnOnce impl
2019-09-07 19:31:58 -04:00
Mark Rousskov
f4a15ae3b2
Implement Print for FnOnce(&mut Buffer)
...
This means that callers can pass in a closure like
`|buf| some_function(..., &mut buf)` and pass in arbitrary arguments to
that function without complicating the trait definition. We also keep
the impl for str and String, since it's useful to be able to just pass
in "" or format!("{}"...) results in some cases.
This changes Print's definition to take self, instead of &self, because
otherwise FnOnce cannot be called directly. We could instead take FnMut
or even Fn, but that seems like it'd merely complicate matters -- most
of the time, the FnOnce does not constrain us at all anyway. If it does,
a custom Print impl for &'_ SomeStruct is not all that painful.
2019-09-07 19:31:58 -04:00
Mark Rousskov
f8bccb1658
Move sidebar to Buffer-printing
2019-09-07 19:31:58 -04:00
Mark Rousskov
75528f266f
Replace writeln!/write! with push_str
2019-09-07 19:31:58 -04:00
Mark Rousskov
57243b74b1
Move constant parameters to render to Layout struct
2019-09-07 19:31:58 -04:00
Mark Rousskov
3657bfc040
Remove needless clone of layout
2019-09-07 19:31:58 -04:00
Mark Rousskov
9e52ba94fa
Create buffers in top-level rendering
...
This avoids needlessly creating and threading the buffers through when
we only use them once.
2019-09-07 19:31:58 -04:00
Mark Rousskov
eebd0265c3
Migrate top-level rendering to Buffer
2019-09-07 19:31:58 -04:00
Guillaume Gomez
d4d5aa436d
Fix invalid span generation when it should be div
2019-09-05 14:15:58 +02:00
Mazdak Farrokhzad
1ea8fc587c
Rollup merge of #62734 - GuillaumeGomez:hide-default-methods, r=Mark-Simulacrum
...
Hide trait default methods
Fixes #62499 .
However, the question remains: do we want to extend it to this point or not?
r? @QuietMisdreavus
2019-08-29 17:13:57 +02:00
Mark Rousskov
b0fab966fa
Shorten line during rendering instead of in markdown
2019-08-26 20:30:10 -04:00