summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
AgeCommit message (Collapse)AuthorLines
2018-05-03Auto merge of #50413 - kennytm:rollup, r=kennytmbors-1/+1
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-03Fix invalid path generation in rustdoc searchGuillaume Gomez-1/+1
2018-05-02make it compile againflip1995-1/+1
2018-05-02Remove Option from the return type of Attribute::name()Seiichi Uchida-1/+1
2018-04-27Rollup merge of #50229 - GuillaumeGomez:search-one-result, r=QuietMisdreavuskennytm-0/+2
Add setting to go to item if there is only one result Fixes #50216. r? @QuietMisdreavus
2018-04-26Add setting to go to item if there is only one resultGuillaume Gomez-0/+2
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+2
2018-04-22Auto merge of #49954 - GuillaumeGomez:doc-settings, r=ollie27,QuietMisdreavusbors-3/+76
Add rustdoc settings menu Fixes #18167. r? @QuietMisdreavus
2018-04-21Add aliases in the search as wellGuillaume Gomez-3/+7
2018-04-21Generate alias fileGuillaume Gomez-6/+74
2018-04-21Remove link generation on image, favicon and logo in settingsGuillaume Gomez-17/+19
2018-04-17Add rustdoc settings menuGuillaume Gomez-3/+74
2018-04-17Rollup merge of #50032 - ollie27:rustdoc_all_private, r=GuillaumeGomezGuillaume Gomez-1/+3
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-16Add rustdoc-ui test suiteGuillaume Gomez-1/+1
2018-04-13rustdoc: Don't include private paths in all.htmlOliver Middleton-1/+3
2018-04-10Auto merge of #49504 - GuillaumeGomez:doc-all-types, r=QuietMisdreavusbors-36/+205
Add page to list all crate's items r? @QuietMisdreavus
2018-04-07Improve codeGuillaume Gomez-21/+20
2018-04-06Auto merge of #49335 - ↵bors-11/+19
GuillaumeGomez:remove-unneeded-trait-implementations-title, r=QuietMisdreavus Remove unneeded trait implementations titles r? @QuietMisdreavus
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-1/+1
2018-04-04Rollup merge of #49516 - GuillaumeGomez:add-union-field-missing-anchor, ↵kennytm-2/+7
r=QuietMisdreavus Add missing anchor for union type fields r? @QuietMisdreavus
2018-04-04Rollup merge of #49179 - varkor:future-deprecation, ↵kennytm-4/+18
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-04Add page to list all crate's itemsGuillaume Gomez-36/+206
2018-03-31Shorten deprecation notevarkor-2/+2
2018-03-30Rename fs::read_string to read_to_string and stabilizeMatt Brubeck-1/+1
2018-03-30Add missing anchor for union type fieldsGuillaume Gomez-2/+7
2018-03-30Auto merge of #49489 - kennytm:rollup, r=kennytmbors-6/+6
Rollup of 10 pull requests - Successful merges: #49443, #49445, #49446, #49463, #49464, #49466, #49468, #49473, #49484, #49486 - Failed merges:
2018-03-30Auto merge of #49412 - GuillaumeGomez:hide-type-decl, r=QuietMisdreavusbors-135/+150
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-30Rollup merge of #49445 - GuillaumeGomez:light-theme, r=QuietMisdreavuskennytm-6/+6
Rename main theme into light theme r? @QuietMisdreavus
2018-03-29Remove unneeded trait implementations titlesGuillaume Gomez-11/+19
2018-03-29Rename main theme into light themeGuillaume Gomez-6/+6
2018-03-28Fix text overlapGuillaume Gomez-16/+17
2018-03-27Hide type declarations by defaultGuillaume Gomez-135/+150
2018-03-26Add future deprecation warning to rustdocvarkor-4/+18
2018-03-13Rollup merge of #48898 - GuillaumeGomez:remove-empty-section, r=QuietMisdreavuskennytm-8/+10
Remove auto trait implementation section when empty Fixes #48882.
2018-03-10Auto merge of #48755 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavusbors-28/+23
Multiple rustdoc fixes Fixes #48733. r? @QuietMisdreavus
2018-03-09Remove auto trait implementation section when emptyGuillaume Gomez-8/+10
2018-03-09Add missing items in the sidebar for functionsGuillaume Gomez-28/+23
2018-03-05Add resource-suffix option for rustdocGuillaume Gomez-15/+36
2018-02-18Remove extra whitespaceAaron Hill-1/+1
2018-02-18Fix inliningAaron Hill-2/+7
2018-02-18More formatting fixupsAaron Hill-1/+1
2018-02-18Cleanup formattingAaron Hill-18/+0
2018-02-18Generate documentation for auto-trait implsAaron Hill-60/+235
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-16Remove hoedown from rustdocGuillaume Gomez-218/+18
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-01-26Merge branch 'rustdoc_masked' of https://github.com/ollie27/rust into rollupAlex Crichton-25/+27
2018-01-25Auto merge of #47686 - GuillaumeGomez:theme-fixes, r=QuietMisdreavusbors-4/+4
Few fixes for multiple themes support feature r? @QuietMisdreavus Fixes #47695.
2018-01-24Few fixes for multiple themes support featureGuillaume Gomez-4/+4
2018-01-23Auto merge of #47678 - kennytm:rollup, r=kennytmbors-1/+2
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-23Auto merge of #47620 - GuillaumeGomez:multiple-themes, r=QuietMisdreavusbors-6/+76
Multiple themes for rustdoc r? @QuietMisdreavus
2018-01-23rustdoc: Hide methods from #[doc(masked)] crates from the search indexOliver Middleton-25/+27