summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
AgeCommit message (Collapse)AuthorLines
2017-09-29rustdoc: Render [src] links for trait implementors (#43893)Vitaly _Vi Shukela-1/+10
2017-09-29rustdoc: Extract converter from Impementor to Item to a fnVitaly _Vi Shukela-13/+19
2017-09-23Rollup merge of #44554 - GuillaumeGomez:add-missing-pub, r=QuietMisdreavusCorey Farwell-2/+4
Add pub visibility for methods as well Fixes #44527. r? @QuietMisdreavus
2017-09-20Auto merge of #44350 - GuillaumeGomez:id-false-positive, r=QuietMisdreavusbors-24/+44
Improve how rustdoc warnings are displayed cc @rust-lang/dev-tools r? @nrc
2017-09-19Improve how warnings are displayedGuillaume Gomez-24/+44
2017-09-19Add pub visibility for methods as wellGuillaume Gomez-2/+4
2017-09-19Auto merge of #44026 - QuietMisdreavus:trimmed-std, r=steveklabnikbors-17/+29
hide internal types/traits from std docs via new #[doc(masked)] attribute Fixes #43701 (hopefully for good this time) This PR introduces a new parameter to the `#[doc]` attribute that rustdoc looks for on `extern crate` statements. When it sees `#[doc(masked)]` on such a statement, it hides traits and types from that crate from appearing in either the "Trait Implementations" section of many type pages, or the "Implementors" section of trait pages. This is then applied to the `libc`/`rand`/`compiler_builtins` imports in libstd to prevent those crates from creating broken links in the std docs. Like in #43348, this also introduces a feature gate, `doc_masked`, that controls the use of this parameter. To view the std docs generated with this change, head to https://tonberry.quietmisdreavus.net/std-43701/std/index.html.
2017-09-17Add more links and put the link character to the leftGuillaume Gomez-3/+5
2017-09-17Rollup merge of #44397 - GuillaumeGomez:codeblock-color, r=QuietMisdreavusTim Neumann-1/+4
Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
2017-09-14Rollup merge of #44368 - ollie27:rustdoc_pulldown_ids, r=QuietMisdreavusCorey Farwell-2/+6
rustdoc: Don't counts ids twice when using --enable-commonmark cc @GuillaumeGomez r? @QuietMisdreavus
2017-09-12Fix rendering of const keyword for functionsGuillaume Gomez-17/+4
2017-09-11Add arrow and improve displayGuillaume Gomez-1/+2
2017-09-11Add class for codeblocksGuillaume Gomez-1/+3
2017-09-10Rollup merge of #44347 - GuillaumeGomez:rustdoc-false-positive, ↵Guillaume Gomez-3/+7
r=QuietMisdreavus Reduce false positives number in rustdoc html diff cc @rust-lang/dev-tools r? @nrc Very simple trick but should lighten html diff a bit
2017-09-10Rollup merge of #44329 - nrc:pulldown-warn-fix, r=ollie27Guillaume Gomez-80/+22
Fixup some nits from #44238 r? @ollie27
2017-09-06rustdoc: Don't counts ids twice when using --enable-commonmarkOliver Middleton-2/+6
2017-09-06Reduce false positives number in rustdoc html diffGuillaume Gomez-3/+7
2017-09-06Fixup some nits from #44238Nick Cameron-80/+22
2017-09-05new attribute #[doc(masked)] to hide internal crates from std docsQuietMisdreavus-17/+29
2017-09-05add "Implementations on Foreign Types" to the sidebarQuietMisdreavus-0/+11
2017-09-05if not showing default docs on an impl, autohide the itemsQuietMisdreavus-0/+9
2017-09-05rustdoc: add new "Implementations on Foreign Types" section to traitsQuietMisdreavus-14/+56
2017-09-01Windows line endingsNick Cameron-1/+1
2017-09-01Do a better job of eliding whitespace-only differences from warningsNick Cameron-1/+67
2017-09-01Improve the appearance of markdown warningsNick Cameron-14/+98
2017-09-01rustdoc: collect rendering warnings and print them in one placeNick Cameron-16/+34
2017-09-01Only emit warnings if the user is using PulldownNick Cameron-25/+32
Also checks for differences after eliminating whitespace-only diffs. Renames get_html_diff
2017-08-31Auto merge of #41991 - GuillaumeGomez:rustdoc-html-diff, r=nrcbors-2/+31
Add warnings when rustdoc html rendering differs
2017-08-30Remove some false positive issuesGuillaume Gomez-1/+9
2017-08-30Print warning whatever the rendering modeGuillaume Gomez-26/+15
2017-08-30Update unstable-crate testGuillaume Gomez-7/+8
2017-08-30Add warnings when rustdoc html rendering differsGuillaume Gomez-2/+33
2017-08-28Fix invalid linker positionGuillaume Gomez-4/+2
2017-08-26Rollup merge of #43979 - Jouan:Add-links-for-impls, r=GuillaumeGomezCorey Farwell-1/+7
Add links for impls Implements a solution for issue #23552 r? @QuietMisdreavus
2017-08-24Remove duplicates in rustdocGuillaume Gomez-0/+31
2017-08-18Add links for implsJouan Amate-1/+7
Implements a solution for issue #23552
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-15/+15
Like #43008 (f668999), but _much more aggressive_.
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-0/+8
Expose all OS-specific modules in libstd doc. 1. Uses the special `--cfg dox` configuration passed by rustbuild when running `rustdoc`. Changes the `#[cfg(platform)]` into `#[cfg(any(dox, platform))]` so that platform-specific API are visible to rustdoc. 2. Since platform-specific implementations often won't compile correctly on other platforms, `rustdoc` is changed to apply `everybody_loops` to the functions during documentation and doc-test harness. 3. Since platform-specific code are documented on all platforms now, it could confuse users who found a useful API but is non-portable. Also, their examples will be doc-tested, so must be excluded when not testing on the native platform. An undocumented attribute `#[doc(cfg(...))]` is introduced to serve the above purposed. Fixes #24658 (Does _not_ fully implement #1998).
2017-08-12Auto merge of #43736 - ollie27:rustdoc_impls_js, r=QuietMisdreavusbors-0/+12
rustdoc: Don't add external impls to implementors js Otherwise impls from not documented crates appear. Fixes #43701
2017-08-10Implemented #[doc(cfg(...))].kennytm-0/+8
This attribute has two effects: 1. Items with this attribute and their children will have the "This is supported on **** only" message attached in the documentation. 2. The items' doc tests will be skipped if the configuration does not match.
2017-08-08Improve headers linkingGuillaume Gomez-22/+22
2017-08-08rustdoc: Don't add external impls to implementors jsOliver Middleton-0/+12
Otherwise impls from not documented crates appear.
2017-07-30Auto merge of #43515 - QuietMisdreavus:show-assoc-types, r=GuillaumeGomezbors-0/+7
rustdoc: print associated types in traits "implementors" section When viewing a trait's implementors, they won't show anything about the implementation other than any bounds on the generics. You can see the full implementation details on the page for the type, but if the type is external (e.g. it's an extension trait being implemented for primitives), then you'll never be able to see the details of the implementation without opening the source code. This doesn't solve everything about that, but it does still show an incredibly useful piece of information: the associated types. This can help immensely for traits like `Deref` or `IntoIterator` in libstd, and also for traits like `IntoFuture` outside the standard library. Fixes #24200 🚨 BIKESHED ALERT 🚨 The indentation and sizing of the types is suspect. I put it in the small text so it wouldn't blend in with the next impl line. (It shares a CSS class with the where clauses, as you can see in the following image.) However, the indentation is nonstandard. I initially tried with no indentation (looked awkward and blended too well with the surrounding impls) and with 4-space indentation (too easy to confuse with where clauses), before settling on the 2-space indentation seen below. It's... okay, i guess. Open to suggestions. ![snippet of the implementors of IntoIterator, showing the associated types](https://user-images.githubusercontent.com/5217170/28697456-a4e01a12-7301-11e7-868e-2a6441d6c9e0.png)
2017-07-29Rollup merge of #43509 - QuietMisdreavus:method-src, r=GuillaumeGomezMark Simulacrum-1/+9
rustdoc: add [src] links to associated functions inside an impl block While impl blocks currently have a `[src]` link to show the source for the impl block as a whole, individual methods inside that impl block do not. This can pose a problem for structs with a lot of methods, like many in libstd. This change adds little `[src]` links to individual methods that point directly to the function in the bundled source. fixes #12932 ![methods on HashMap, showing the new src links](https://user-images.githubusercontent.com/5217170/28686066-9e7a19de-72cf-11e7-8e6b-b7d60fa33032.png)
2017-07-29print associated types in traits "implementors" sectionQuietMisdreavus-0/+7
2017-07-27add [src] links to associated functions inside an impl blockQuietMisdreavus-1/+9
2017-07-23rustdoc: make major section headers self-linksZack M. Davis-13/+36
The sidebar already has links to these h2's ids, but for convenience, the h2 itself should also be a link (retaining its present appearance). This should address most of #24484.
2017-07-09Add spacing between trait functionsGuillaume Gomez-2/+9
2017-06-23rustdoc: Fix a few issues with associated constsOliver Middleton-40/+26
* Make sure private consts are stripped. * Don't show a code block for the value if there is none. * Make sure default values are shown in impls. * Make sure docs from the trait are used if the impl has no docs.
2017-06-12Rollup merge of #42592 - ollie27:rustdoc_empty_modules, r=steveklabnikCorey Farwell-15/+4
rustdoc: Stop stripping empty modules There is no good reason to strip empty modules with no documentation and doing so causes subtle problems. Fixes #42590