Commit Graph

851 Commits

Author SHA1 Message Date
Guillaume Gomez 4b14573d50 Add minification process 2018-05-12 19:15:06 +02:00
bors e82261dfbb Auto merge of #50413 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests

Successful merges:

 - #50302 (Add query search order check)
 - #50320 (Fix invalid path generation in rustdoc search)
 - #50349 (Rename "show type declaration" to "show declaration")
 - #50360 (Clarify wordings of the `unstable_name_collision` lint.)
 - #50365 (Use two vectors in nearest_common_ancestor.)
 - #50393 (Allow unaligned reads in constants)
 - #50401 (Revert "Implement FromStr for PathBuf")
 - #50406 (Forbid constructing empty identifiers from concat_idents)
 - #50407 (Always inline simple BytePos and CharPos methods.)
 - #50416 (check if the token is a lifetime before parsing)
 - #50417 (Update Cargo)
 - #50421 (Fix ICE when using a..=b in a closure.)

Failed merges:
2018-05-03 20:45:54 +00:00
Guillaume Gomez a876d28b4a Fix invalid path generation in rustdoc search 2018-05-03 22:14:37 +02:00
flip1995 121abd0599
make it compile again 2018-05-02 12:05:13 +02:00
Seiichi Uchida 9b3aea602c
Remove Option from the return type of Attribute::name() 2018-05-02 11:32:34 +02:00
kennytm e6889933e3
Rollup merge of #50229 - GuillaumeGomez:search-one-result, r=QuietMisdreavus
Add setting to go to item if there is only one result

Fixes #50216.

r? @QuietMisdreavus
2018-04-27 16:23:26 +08:00
Guillaume Gomez acf0adf798 Add setting to go to item if there is only one result 2018-04-26 19:53:21 +02:00
Irina Popa 04fa0e7bb3 rustc_target: move in syntax::abi and flip dependency. 2018-04-26 17:49:16 +03:00
bors 28193e873c Auto merge of #49954 - GuillaumeGomez:doc-settings, r=ollie27,QuietMisdreavus
Add rustdoc settings menu

Fixes #18167.

r? @QuietMisdreavus
2018-04-22 11:04:41 +00:00
Guillaume Gomez 03b0856849 Add aliases in the search as well 2018-04-21 22:02:53 +02:00
Guillaume Gomez 57bcabc108 Generate alias file 2018-04-21 22:02:53 +02:00
Guillaume Gomez 1f7892f16a Remove link generation on image, favicon and logo in settings 2018-04-21 21:59:12 +02:00
Guillaume Gomez f2ad3c3f6c Add rustdoc settings menu 2018-04-17 23:35:43 +02:00
Guillaume Gomez 92d29c1267
Rollup merge of #50032 - ollie27:rustdoc_all_private, r=GuillaumeGomez
rustdoc: Don't include private paths in all.html

For example the `std` [`all.html`](https://doc.rust-lang.org/nightly/std/all.html) includes references to the `coresimd` module which is a private implementation detail.

r? @GuillaumeGomez
2018-04-17 18:43:17 +02:00
Guillaume Gomez b2192ae157 Add rustdoc-ui test suite 2018-04-16 23:37:11 +02:00
Oliver Middleton abded6111b rustdoc: Don't include private paths in all.html 2018-04-13 14:58:43 +01:00
bors a1c21ed7e2 Auto merge of #49504 - GuillaumeGomez:doc-all-types, r=QuietMisdreavus
Add page to list all crate's items

r? @QuietMisdreavus
2018-04-10 06:23:52 +00:00
Guillaume Gomez 1292e51e73 Improve code 2018-04-07 13:10:49 +02:00
bors 2253216ec5 Auto merge of #49335 - GuillaumeGomez:remove-unneeded-trait-implementations-title, r=QuietMisdreavus
Remove unneeded trait implementations titles

r? @QuietMisdreavus
2018-04-06 12:03:16 +00:00
Vadim Petrochenkov 3a30bad6de Use `Ident` instead of `Name` in `MetaItem` 2018-04-06 11:52:16 +03:00
kennytm e0c180362e
Rollup merge of #49516 - GuillaumeGomez:add-union-field-missing-anchor, r=QuietMisdreavus
Add missing anchor for union type fields

r? @QuietMisdreavus
2018-04-04 11:07:13 +02:00
kennytm b7b2ae2b6f
Rollup merge of #49179 - varkor:future-deprecation, r=QuietMisdreavus,GuillaumeGomez
Handle future deprecation annotations

This adds special handling to the `since` parameter of the `deprecated` attribute: in particular, if the `since` version exceeds the version of the compiler, the deprecation notice will not be printed; but a note is added to the documentation stating that the item will be deprecated in a later version.

(I've used `since` for this, rather than adding a new attribute, because it's more seamless and, I feel, intuitive. Plus it involves less code churn.)

![image](https://user-images.githubusercontent.com/3943692/37611317-ef5cdf16-2b99-11e8-8251-e35e8f7b0137.png)
![image](https://user-images.githubusercontent.com/3943692/37611323-f748c2d0-2b99-11e8-966b-11408c73d416.png)

This is a prerequisite for doing things renaming methods in the standard library (e.g. #30459). Resolves #30785.
2018-04-04 11:07:10 +02:00
Guillaume Gomez 760e389fa6 Add page to list all crate's items 2018-04-04 00:56:08 +02:00
varkor 44ad8fd136 Shorten deprecation note 2018-03-31 21:44:12 +01:00
Matt Brubeck 6b7627f8c9 Rename fs::read_string to read_to_string and stabilize 2018-03-30 10:20:58 -07:00
Guillaume Gomez adaaeeaee3 Add missing anchor for union type fields 2018-03-30 16:10:16 +02:00
bors d8a1bc73f7 Auto merge of #49489 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #49443, #49445, #49446, #49463, #49464, #49466, #49468, #49473, #49484, #49486
- Failed merges:
2018-03-30 04:17:05 +00:00
bors 15e8c5d846 Auto merge of #49412 - GuillaumeGomez:hide-type-decl, r=QuietMisdreavus
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
2018-03-30 01:45:54 +00:00
kennytm eb3e2feb0d
Rollup merge of #49445 - GuillaumeGomez:light-theme, r=QuietMisdreavus
Rename main theme into light theme

r? @QuietMisdreavus
2018-03-30 01:31:12 +02:00
Guillaume Gomez d91a821ee8 Remove unneeded trait implementations titles 2018-03-29 14:33:16 +02:00
Guillaume Gomez 772a8028ff Rename main theme into light theme 2018-03-29 13:45:56 +02:00
Guillaume Gomez 51f26acaea Fix text overlap 2018-03-28 13:25:43 +02:00
Guillaume Gomez 73b97c7e7c Hide type declarations by default 2018-03-27 11:57:00 +02:00
varkor ecaf1f57ea Add future deprecation warning to rustdoc 2018-03-26 22:16:10 +01:00
kennytm e30d89d7a5
Rollup merge of #48898 - GuillaumeGomez:remove-empty-section, r=QuietMisdreavus
Remove auto trait implementation section when empty

Fixes #48882.
2018-03-13 05:01:37 +08:00
bors 948e3a30e6 Auto merge of #48755 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
Multiple rustdoc fixes

Fixes #48733.

r? @QuietMisdreavus
2018-03-10 08:24:08 +00:00
Guillaume Gomez 7dc71ec009 Remove auto trait implementation section when empty 2018-03-09 22:18:08 +01:00
Guillaume Gomez 6235ef0422 Add missing items in the sidebar for functions 2018-03-09 17:45:44 +01:00
Guillaume Gomez 831009f035 Add resource-suffix option for rustdoc 2018-03-05 23:45:27 +01:00
Aaron Hill 298d703506
Remove extra whitespace 2018-02-18 16:29:25 -05:00
Aaron Hill 64a1f6fbfd
Fix inlining 2018-02-18 16:29:25 -05:00
Aaron Hill 94fd4f360b
More formatting fixups 2018-02-18 16:29:25 -05:00
Aaron Hill 1531fbe9be
Cleanup formatting 2018-02-18 16:29:25 -05:00
Aaron Hill 6728f21d85
Generate documentation for auto-trait impls
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).
2018-02-18 16:29:24 -05:00
Guillaume Gomez 5bd5bc3f21 Remove hoedown from rustdoc
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long?

-----

So, timeline for those who need to catch up:

* Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io.
* A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed.
* However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates.
* A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously.
* However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences.
* That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people.
  * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land.
  * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers.
  * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04.
  * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown.

And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2018-02-16 23:17:15 +01:00
Alex Crichton 1dc85768d2 Merge branch 'rustdoc_masked' of https://github.com/ollie27/rust into rollup 2018-01-26 06:51:58 -08:00
bors 4cf26f8a13 Auto merge of #47686 - GuillaumeGomez:theme-fixes, r=QuietMisdreavus
Few fixes for multiple themes support feature

r? @QuietMisdreavus

Fixes #47695.
2018-01-25 06:12:06 +00:00
Guillaume Gomez e78f1392b7 Few fixes for multiple themes support feature 2018-01-24 12:13:52 +01:00
bors 4e3901d35f Auto merge of #47678 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

- Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672
- Failed merges:
2018-01-23 16:13:18 +00:00
bors 3a39b2aa5a Auto merge of #47620 - GuillaumeGomez:multiple-themes, r=QuietMisdreavus
Multiple themes for rustdoc

r? @QuietMisdreavus
2018-01-23 13:23:58 +00:00