about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2017-09-19Add pub visibility for methods as wellGuillaume Gomez-0/+31
2017-09-17Rollup merge of #44397 - GuillaumeGomez:codeblock-color, r=QuietMisdreavusTim Neumann-0/+31
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-12Fix rendering of const keyword for functionsGuillaume Gomez-0/+27
2017-09-11add testGuillaume Gomez-0/+31
2017-09-01Fix testsNick Cameron-3/+3
This is just undoing changes from #41991 because we are not running markdown rendering twice.
2017-08-31Auto merge of #41991 - GuillaumeGomez:rustdoc-html-diff, r=nrcbors-3/+3
Add warnings when rustdoc html rendering differs
2017-08-30Temporary fix for a test (will require another update when this is fully merged)Guillaume Gomez-3/+3
2017-08-30Update unstable-crate testGuillaume Gomez-1/+1
2017-08-30Add warnings when rustdoc html rendering differsGuillaume Gomez-1/+1
2017-08-29Rollup merge of #43918 - mystor:rustdoc-pound, r=QuietMisdreavusAriel Ben-Yehuda-2/+6
Don't highlight # which does not start an attribute in rustdoc Currently when we highlight some macros for rustdoc (e.g. `quote!` from https://github.com/dtolnay/quote), we get really bad syntax highlighting, because we assume that every token between a `#` character and the next `]` in the source must be an attribute. This patch improves that highlighting behavior to instead only highlight after finding the `[` token after the `#` token. (NOTE: I've only run this patch against https://github.com/nrc/rustdoc-highlight so if it doesn't build on travis that's why - I don't have a recent rustc build on this laptop) I'm guessing r? @steveklabnik
2017-08-28Update test issue-41783.rs for new attribute highlighting behaviourMichael Layzell-2/+6
2017-08-24Add duplicate testGuillaume Gomez-0/+24
2017-08-15Exclude `impl Trait` functions from everybody_loops.kennytm-0/+32
Fixes #43869.
2017-08-13Rollup merge of #43782 - nrc:include, r=GuillaumeGomezGuillaume Gomez-0/+20
Fix include! in doc tests By making the path relative to the current file. Fixes #43153 [breaking-change] - if you use `include!` inside a doc test, you'll need to change the path to be relative to the current file rather than relative to the working directory.
2017-08-13Auto merge of #43348 - kennytm:fix-24658-doc-every-platform, r=alexcrichtonbors-0/+47
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/+15
rustdoc: Don't add external impls to implementors js Otherwise impls from not documented crates appear. Fixes #43701
2017-08-10doc tests: use the filename from the source file for doc test programs, ↵Nick Cameron-0/+20
rather than a dummy name
2017-08-10Implemented #[doc(cfg(...))].kennytm-0/+47
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-08rustdoc: Don't add external impls to implementors jsOliver Middleton-0/+15
Otherwise impls from not documented crates appear.
2017-08-07Remove \0 printingGuillaume Gomez-1/+1
2017-08-06Fix hoedown error in rustdocGuillaume Gomez-0/+18
2017-07-25Add tests for issues with the E-needstest labeltopecongiro-0/+15
2017-07-06remove associated_consts feature gateSean McArthur-7/+0
2017-06-26Auto merge of #42885 - ollie27:rustdoc_empty_glob_path, r=GuillaumeGomezbors-0/+23
rustdoc: Don't ICE on `use *;` Fixes #42875
2017-06-24rustdoc: Don't ICE on `use *;`Oliver Middleton-0/+23
2017-06-23rustdoc: Fix a few issues with associated constsOliver Middleton-0/+79
* 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-13Auto merge of #42608 - ollie27:rustdoc_variant_reexport, r=QuietMisdreavusbors-0/+23
rustdoc: Fix missing enum variant reexports Fixes #35488
2017-06-12rustdoc: Fix missing enum variant reexportsOliver Middleton-0/+23
2017-06-12Rollup merge of #42594 - ollie27:rustdoc_assoc_type_links, r=steveklabnikCorey Farwell-0/+7
rustdoc: Link directly to associated types Rather than just linking to the trait. Also simplifies the logic used to decide whether to render the full QPath.
2017-06-11rustdoc: Stop stripping empty modulesOliver Middleton-0/+51
There is no good reason to strip empty modules with no documentation and doing so causes subtle problems.
2017-06-11rustdoc: Link directly to associated typesOliver Middleton-0/+7
Rather than just linking to the trait. Also simplifies the logic used to decide whether to render the full QPath.
2017-06-09Document direct implementations on type aliases.Michael Killough-0/+35
This improves #32077, but is not a complete fix. For a type alias `type NewType = AliasedType`, it will include any `impl NewType` and `impl Trait for NewType` blocks in the documentation for `NewType`. A complete fix would include the implementations from the aliased type in the type alias' documentation, so that users have a complete picture of methods that are available on the alias. However, to do this properly would require a fix for #14072, as the alias may affect the type parameters of the type alias, making the documentation difficult to understand. (That is, for `type Result = std::result::Result<(), ()>` we would ideally show documentation for `impl Result<(), ()>`, rather than generic documentation for `impl<T, E> Result<T, E>`). I think this improvement is worthwhile, as it exposes implementations which are not currently documented by rustdoc. The documentation for the implementations on the aliased type are still accessible by clicking through to the docs for that type. (Although perhaps it's now less obvious to the user that they should click-through to get there).
2017-06-02rustdoc: Hide `self: Box<Self>` in list of deref methodsOliver Middleton-0/+12
These methods can never be called through deref so there is no point including them. For example you can't call `into_boxed_bytes` or `into_string` on `String`.
2017-05-31rustdoc: Cleanup associated const value renderingOliver Middleton-0/+18
Rather than (ab)using Debug for outputting the type in plain text use the alternate format parameter which already does exactly that. This fixes type parameters for example which would output raw HTML. Also cleans up adding parens around references to trait objects.
2017-05-30Fix signature by adding parens when neededGuillaume Gomez-0/+15
2017-05-27Stabilize unions with `Copy` fields and no destructorVadim Petrochenkov-2/+0
2017-05-22rustdoc: Fix names of items in cross crate reexported modulesOliver Middleton-0/+53
For renamed reexports the new name should be used.
2017-05-15rustdoc: Display `extern "C" fn` instead of `extern fn`Oliver Middleton-8/+8
2017-05-06Allow # to appear in rustdoc code output.Mark Simulacrum-0/+25
"##" at the start of a trimmed rustdoc line is now cut to "#" and then shown. If the user wanted to show "##", they can type "###".
2017-04-22Re-enable hoedown by defaultGuillaume Gomez-64/+0
2017-04-14Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcvCorey Farwell-0/+26
Fix invalid associated type rendering in rustdoc Fixes #41036. r? @rust-lang/docs
2017-04-14Rollup merge of #41172 - Aaron1011:rustdoc-overflow, r=frewsxcvCorey Farwell-0/+31
Fix rustdoc infinitely recursing when an external crate reexports itself Previously, rustdoc's LibEmbargoVisitor unconditionally visited the child modules of an external crate. If a module re-exported its parent via `pub use super::*`, rustdoc would re-walk the parent, leading to infinite recursion. This commit makes LibEmbargoVisitor store already visited modules in an FxHashSet, ensuring that each module is only walked once. Fixes #40936
2017-04-12Fix invalid associated type rendering in rustdocGuillaume Gomez-0/+26
2017-04-09Fix rustdoc infinitely recursing when an external crate reexports itselfAaron Hill-0/+31
Previously, rustdoc's LibEmbargoVisitor unconditionally visited the child modules of an external crate. If a module re-exported its parent via 'pub use super::*', rustdoc would re-walk the parent, leading to infinite recursion. This commit makes LibEmbargoVisitor store already visited modules in an FxHashSet, ensuring that each module is only walked once. Fixes #40936
2017-04-09merge with master to pick up pulldown switchQuietMisdreavus-2/+244
2017-04-06rustdoc: where clause adjustment to fix testsQuietMisdreavus-5/+5
- add spaces to output so stripping lines and breaking spaces renders the same - add commas to where clauses in rustdoc tests to match the new output
2017-04-06rustdoc: Use pulldown-cmark for Markdown HTML renderingOliver Middleton-11/+20
Instead of rendering all of the HTML in rustdoc this relies on pulldown-cmark's `push_html` to do most of the work. A few iterator adapters are used to make rustdoc specific modifications to the output. This also fixes MarkdownHtml and link titles in plain_summary_line.
2017-04-04Handle ordered lists as wellGuillaume Gomez-0/+32
2017-04-02Auto merge of #40919 - GuillaumeGomez:fix-new-rustdoc, r=frewsxcv,steveklabnikbors-0/+59
Add support for image, rules and footnotes Part of #40912. r? @rust-lang/docs PS: the footnotes are waiting for https://github.com/google/pulldown-cmark/pull/21 to be merged to be fully working.
2017-03-31Add end whitespace ignore flag for tidyGuillaume Gomez-1/+1