1
Fork 0
Commit graph

1212 commits

Author SHA1 Message Date
Mazdak Farrokhzad
75e4783f63 Normalize syntax::source_map imports. 2020-01-02 13:57:04 +01:00
Vadim Petrochenkov
70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
David Tolnay
4646a88b7a
Deprecate Error::description for real
`description` has been documented as soft-deprecated since 1.27.0 (17
months ago). There is no longer any reason to call it or implement it.

This commit:

- adds #[rustc_deprecated(since = "1.41.0")] to Error::description;

- moves description (and cause, which is also deprecated) below the
  source and backtrace methods in the Error trait;

- reduces documentation of description and cause to take up much less
  vertical real estate in rustdocs, while preserving the example that
  shows how to render errors without needing to call description;

- removes the description function of all *currently unstable* Error
  impls in the standard library;

- marks #[allow(deprecated)] the description function of all *stable*
  Error impls in the standard library;

- replaces miscellaneous uses of description in example code and the
  compiler.
2019-12-24 22:39:49 -08:00
Ohad Ravid
811bdeee00 Show value for consts in the documentation 2019-12-24 10:10:36 +01:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Guillaume Gomez
0d7a49d356 Implement PrintWithSpace trait on hir::Mutability 2019-12-22 13:31:47 +01:00
Guillaume Gomez
5a0d747eef Remove clean::Mutability enum 2019-12-21 21:19:03 +01:00
Andy Russell
94630d4c8b
replace serialize with serde in rustdoc 2019-12-12 16:33:25 -05:00
Guillaume Gomez
9e3e421ab3 Sort auto trait and blanket implementations display 2019-12-08 14:24:06 +01:00
bors
710a362dc7 Auto merge of #66828 - GuillaumeGomez:less-minification, r=kinnison
Less minification

The goal of this PR is to remove the minification process on the `search-index.js` file. It provides great result in term of space reduction but the computation time is far too long. I'll work on this issue and will put it back once it's fast enough.

cc @nox @lqd
r? @kinnison
2019-12-05 17:45:31 +00:00
Guillaume Gomez
2d0f0ca25b Add missing backline 2019-12-02 11:25:27 +01:00
Guillaume Gomez
852079fbf2 minify theme.js as well 2019-12-02 10:25:36 +01:00
Guillaume Gomez
35ba58f5a9 Remove minification on search-index.js file 2019-12-02 10:25:36 +01:00
Mazdak Farrokhzad
b45f21d38e move UnstableFeatures -> rustc_feature 2019-11-30 02:50:47 +01:00
Mazdak Farrokhzad
0bb06cbea9
Rollup merge of #66657 - ollie27:rustdoc_flock_panic, r=GuillaumeGomez
rustdoc: Don't panic when failing to write .lock file

It can be treated like any other unexpected IO error.

I couldn't think of a good way to add a test for this unfortunately.

r? @GuillaumeGomez
2019-11-23 23:22:38 +01:00
Oliver Middleton
05ef20f922 rustdoc: Don't panic when failing to write .lock file
It can be treated like any other unexpected IO error.
2019-11-23 02:08:10 +00:00
Guillaume Gomez
d0b67ddc0f Revert "Update Source Code Pro and include italics"
This reverts commit ea9519bf16.
2019-11-21 11:18:23 +01:00
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.

![Screenshot from 2019-09-23 00-46-14](https://user-images.githubusercontent.com/3050060/65395521-15aff300-dd9c-11e9-9437-429ca347d455.png)

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