summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2017-01-27Don't generate doc if doc comments only filled with 'white' charactersGuillaume Gomez-1/+2
2017-01-21Force backline on all where in docsGuillaume Gomez-4/+3
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-9/+7
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-17Fix fallout in `rustdoc`.Jeffrey Seyfried-9/+7
2017-01-17AST/HIR: Merge ObjectSum and PolyTraitRefVadim Petrochenkov-13/+0
2017-01-15Fix missing blank space issueGuillaume Gomez-2/+4
2017-01-12Auto merge of #38569 - chris-morgan:rustdoc-highlight-kw-2, r=steveklabnikbors-3/+5
Fix rustdoc highlighting of `&` and `*` Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2 (RefKeyword). The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
2017-01-09Improved rustdoc rendering for unstable featuresManish Goregaokar-11/+26
2017-01-09Auto merge of #38244 - estebank:escape-reason-docs, r=ollie27bors-9/+36
rustdoc: escape the deprecated and unstable reason text Fix #38220. Instead of the [current output](https://doc.rust-lang.org/std/boxed/trait.FnBox.html): <img width="967" alt="incorrect unescaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021898/73121d42-bd2f-11e6-8076-8a5127dbc010.png"> display: <img width="979" alt="escaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021876/52eb0f88-bd2f-11e6-9088-58bdc7d92328.png">
2017-01-04Auto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnikbors-166/+201
Rustdoc: disambiguate Implementors when the type name is not unique Presentation [goes from](https://doc.rust-lang.org/stable/std/iter/trait.ExactSizeIterator.html#implementors): <img width="492" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276752/b2b50474-c387-11e6-96e1-9766851da269.png"> to: <img width="787" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276763/bb37f6b0-c387-11e6-8596-9163cb254674.png"> on cases where there're multiple implementors with the same name. Fixes #37762.
2016-12-29rustdoc: Fix broken CSS for trait itemsOliver Middleton-2/+1
2016-12-27Merge branch 'master' into escape-reason-docsEsteban Küber-39/+37
2016-12-27Auto merge of #38329 - ollie27:rustdoc_stab_em_div, r=steveklabnikbors-15/+16
rustdoc: Fix invalid HTML in stability notices `em` tags cannot contain `p` tags so use `div`s instead of `em`s as the Markdown will create `p` tags.
2016-12-25Add unittestEsteban Küber-1/+12
2016-12-24Rollup merge of #38497 - QuietMisdreavus:rustdoc-where-again, r=steveklabnikSteve Klabnik-1/+1
rustdoc: properly calculate line length for where clauses Apparently, while I was cleaning up #37190, I regressed the formatting for long where clauses, where it wouldn't take the "prefix" length into account when deciding whether to break the line up. This patch fixes that.
2016-12-24Rollup merge of #38480 - clarcharr:import_css, r=steveklabnikSteve Klabnik-2/+1
Don't @import normalize.css. This lets the browser load both files in parallel instead of waiting for `rustdoc.css` to load first.
2016-12-22use same param name across methodsEsteban Küber-9/+12
2016-12-23Fix rustdoc highlighting of `&` and `*`.Chris Morgan-3/+5
Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2. The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
2016-12-22Auto merge of #38330 - ollie27:rustdoc_short_summaries, r=steveklabnikbors-19/+8
rustdoc: Fix short summaries in search results They should be run through a Markdown renderer in rustdoc to remove links. This also fixes the mouse over text for the Crates list on the sidebar. [before](https://doc.rust-lang.org/nightly/std/index.html?search=ord) [after](https://ollie27.github.io/rust_doc_test/std/index.html?search=ord)
2016-12-21use &str instead of Stringbluss-6/+5
2016-12-20rustdoc: properly calculate line length for impl where clausesQuietMisdreavus-1/+1
2016-12-19Don't @import normalize.css.Clar Charr-2/+1
2016-12-19remove O(n^2) to O(n) behaviorEsteban Küber-14/+17
2016-12-15Rustdoc: disambiguate Implementors when the type name is not uniqueEsteban Küber-166/+196
2016-12-14Add `MarkdownHmtl` escape structEsteban Küber-11/+27
`MarkdownHtml` structs escape HTML tags from its text.
2016-12-13rustdoc: Fix invalid HTML in stability noticesOliver Middleton-15/+16
`em` tags cannot contain `p` tags so just use a `div` instead.
2016-12-12rustdoc: escape the deprecated and unstable reason textEsteban Küber-3/+3
2016-12-12Rollup merge of #38264 - ollie27:rustdoc_src_macro, r=brsonCorey Farwell-0/+7
rustdoc: Remove broken src links from reexported items from macros When an item is defined in an external macro it doesn't get a real filename so we need to filter out these when generating src links for reexported items.
2016-12-12Rollup merge of #38164 - sourcefrog:fonts, r=GuillaumeGomezCorey Farwell-2/+4
Avoid using locally installed Source Code Pro font (fixes #24355). In some versions of this font the ampersands are drawn badly. A doc tree built with this change is at https://storage.googleapis.com/mbp-rust-builds/fonts/doc/std/index.html I'm not seeing this problem locally so I'm not sure this fixes it, but based on the diagnosis in the bug it should. I've made this a minimal change by only removing the one problematic font but maybe for consistency every font should be read from the Rust docs tree?
2016-12-12rustdoc: Fix short summaries in search resultsOliver Middleton-19/+8
They should be run through a Markdown renderer in rustdoc to remove links. This also fixes the mouse over text for the Crates list on the sidebar.
2016-12-09rustdoc: Remove broken src links from reexported items from macrosOliver Middleton-0/+7
When an item is defined in an external macro it doesn't get a real filename so we need to filter out these when generating src links for reexported items.
2016-12-07Auto merge of #38105 - ollie27:rustdoc_deterministic_js, r=GuillaumeGomezbors-24/+26
rustdoc: Sort lines in search index and implementors js This means the files are generated deterministically even with rustdoc running in parallel. Fixes the first part of #30220.
2016-12-04Avoid using locally installed Source Code Pro font (fixes #24355).Martin Pool-2/+4
In some versions of this font the ampersands are drawn badly.
2016-12-01rustdoc: Sort lines in search index and implementors jsOliver Middleton-24/+26
This means the files are generated deterministically even with rustdoc running in parallel.
2016-12-01Auto merge of #37911 - liigo:rustdoc-playground, r=alexcrichtonbors-0/+8
rustdoc: get back missing crate-name when --playground-url is used follow up PR #37763 r? @alexcrichton (since you r+ed to #37763 ) ---- Edit: When `#![doc(html_playground_url="")]` is used, the current crate name is saved to `PLAYGROUND`, so rustdoc may generate `extern crate NAME;` into code snips automatically. But when `--playground-url` was introduced in PR #37763, I forgot saving crate name to `PLAYGROUND`. This PR fix that. ---- Update: - add test - unstable `--playground-url`
2016-11-30rustdoc: link to cross-crate sources directly.Eduard-Mihai Burtescu-115/+82
2016-11-30rustdoc: fix up --playground-urlLiigo Zhuang-5/+5
2016-11-30rustdoc: get back missing crate-name when --playground-url is usedLiigo Zhuang-0/+8
follow up PR #37763
2016-11-28rustc: desugar `use a::{b,c};` into `use a::b; use a::c;` in HIR.Eduard-Mihai Burtescu-27/+0
2016-11-24rustdoc: use libsyntax ast::Attribute instead of "cleaning" them.Eduard-Mihai Burtescu-53/+50
2016-11-20Rollup merge of #37881 - ollie27:rustdoc_stab_enum_macro, r=alexcrichtonGuillaume Gomez-2/+0
rustdoc: Remove unnecessary stability versions For some reason only on enum and macro pages, the stability version is rendered after the summary unlike all other pages. As it is already displayed at the top of the page for all items, this removes it for consistency and to prevent it from overlapping the summary text. Fixes #36093
2016-11-19rustdoc: Remove unnecessary stability versionsOliver Middleton-2/+0
For some reason only on enum and macro pages, the stability version is rendered after the summary unlike all other pages. As it is already displayed at the top of the page for all items, this removes it for consistency and to prevent it from overlapping the summary text.
2016-11-18Auto merge of #37763 - liigo:rustdoc-playground, r=alexcrichtonbors-4/+2
rustdoc: add cli argument `--playground-url` Add a new cli argument `--playground-url` for rustdoc: `rustdoc lib.rs --playground-url="https://play.rust-lang.org/"` `rustdoc book.md --playground-url="https://play.rust-lang.org/"` This makes it possible for tools like https://docs.rs to generate crate docs that can submit samples code to run at https://play.rust-lang.org, even if the crate's author *forgot* putting `#![doc(html_playground_url = "https://play.rust-lang.org/")]` to crate root. By the way, I'd like to say, many crate authors are not aware of existing of `#![doc(html_playground_url = "https://play.rust-lang.org/")]`. `--playground-url` may be reset by `--markdown-playground-url` or `#![doc(html_playground_url=...)]`, so it's backward compatible. @alexcrichton since you implemented playground-url related features.
2016-11-17doc: nits and typos on commentsTshepang Lekhonkhobe-17/+17
2016-11-16Auto merge of #37773 - ollie27:rustdoc_inline_glob, r=brsonbors-35/+17
rustdoc: Fix some local inlining issues * Only inline public items when inlining glob imports. * Never inline while in a private module or a child of a private module. * Never inline impls. This allowed the removal of a workaround in the rendering code.
2016-11-14rustdoc: Fix some local inlining issuesOliver Middleton-35/+17
* Only inline public items when inlining glob imports. * Never inline while in a private module or a child of a private module. * Never inline impls. This allowed the removal of a workaround in the rendering code.
2016-11-14rustdoc: add cli argument `--playground-url`Liigo-4/+2
2016-11-13do not use deprecated text for unstable docsAndy Russell-4/+9
2016-11-12Auto merge of #37728 - QuietMisdreavus:rustdoc-enum-struct, r=GuillaumeGomezbors-3/+32
rustdoc: fold fields for enum struct variants into a docblock Per discussion in #37500, this PR updates the enum rendering code to wrap variants with named struct fields in a `docblock` span that is hidden automatically upon load of the page. This gives struct variant fields a clean separation from other enum variants, giving a boost to the readability of such documentation. Preview output is available [on the issue page](https://github.com/rust-lang/rust/issues/37500#issuecomment-260069269), but for the sake of completeness I'll include the images here again. ![rustdoc struct enum variant 4 part 1](https://cloud.githubusercontent.com/assets/5217170/20231925/96160b7e-a82a-11e6-945b-bbba95c5e4bc.PNG) When you initially load the page, there's a line under variants with struct fields letting you know you can click to expand the listing. ![rustdoc struct enum variant 4 part 2](https://cloud.githubusercontent.com/assets/3050060/20232067/1dc63266-a866-11e6-9555-8fb1c8afdcec.png) If you click to expand, the header and table unfold into a nicely-indented listing. If you want to take a look in your own browser and screen size, [I've got this version hosted on my server](https://shiva.icesoldier.me/doctest/doctest/enum.OldTopicRemoval.html). Fixes #37500 r? @GuillaumeGomez
2016-11-12rustdoc: fold fields for enum struct variants into a docblockQuietMisdreavus-3/+32