about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
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
2017-03-31Fix hard break issueGuillaume Gomez-0/+19
2017-03-30Fix multiple footnotes and improve testingGuillaume Gomez-4/+9
2017-03-29Add support for image, rules and footnotesGuillaume Gomez-0/+35
2017-03-28Rustdoc: test proper representation for `pub use` macrosAustin Bonander-0/+61
2017-03-21Add whitespace around "=" in assoc itemsGuillaume Gomez-2/+30
2017-03-19Rollup merge of #40587 - GuillaumeGomez:rustdoc-const-display, r=frewsxcvCorey Farwell-0/+31
Fix invalid debug display for associated consts Fixes #40568. r? @rust-lang/docs cc @SergioBenitez
2017-03-17Fix invalid debug display for associated constsGuillaume Gomez-0/+31
2017-03-16Fix const not displayed in rustdocGuillaume Gomez-0/+22
2017-02-28Rollup merge of #39944 - GuillaumeGomez:associated-consts, r=frewsxcvCorey Farwell-8/+33
Improve associated constant rendering in rustdoc Before: <img width="1440" alt="screen shot 2017-02-19 at 00 30 51" src="https://cloud.githubusercontent.com/assets/3050060/23097697/caeed80e-f63a-11e6-98c2-5d27e4efd76d.png"> After: <img width="1440" alt="screen shot 2017-02-19 at 00 30 39" src="https://cloud.githubusercontent.com/assets/3050060/23097698/cfb4874e-f63a-11e6-80cf-ffbf5c5c6162.png"> cc @SergioBenitez r? @rust-lang/docs
2017-02-28Update tests accordinglyGuillaume Gomez-8/+33
2017-02-25Fix nightly-only experimental API displayGuillaume Gomez-7/+7
2017-02-12Rollup merge of #39654 - ollie27:rustdoc_attributes, r=GuillaumeGomezGuillaume Gomez-0/+27
rustdoc: Show attributes on all item types Currently attributes are only shown for structs, unions and enums but they should be shown for all items. For example it is useful to know if a function is `#[no_mangle]`.
2017-02-08Rollup merge of #39589 - ollie27:rustdoc_impl_disambiguation, r=alexcrichtonCorey Farwell-0/+40
rustdoc: Improve impl disambiguation * Don't disambiguate if there are multiple impls for the same type. * Disambiguate for impls of &Foo and &mut Foo. * Don't try to disambiguate generic types. [before](https://doc.rust-lang.org/nightly/std/ops/trait.Rem.html#implementors) [after](https://ollie27.github.io/rust_doc_test/std/ops/trait.Rem.html#implementors)
2017-02-08rustdoc: Show attributes on all item typesOliver Middleton-0/+27
Currently attributes are only shown for structs, unions and enums but they should be shown for all items. For example it is useful to know if a function is `#[no_mangle]`.
2017-02-08Add more test for rustdoc --testGuillaume Gomez-0/+21
2017-02-06rustdoc: Improve impl disambiguationOliver Middleton-0/+40
* Don't disambiguate if there are multiple impls for the same type. * Disambiguate for impls of &Foo and &mut Foo. * Don't try to disambiguate generic types.
2017-02-05Auto merge of #38161 - durka:rustdoc-crate-attrs, r=alexcrichtonbors-0/+110
rustdoc: fix doctests with non-feature crate attrs Fixes #38129. The book says that any top-level crate attributes at the beginning of a doctest are moved outside the generated `fn main`, but it was only checking for `#![feature`, not `#![`. These attributes previously caused warnings but were then ignored, so in theory this could change the behavior of doctests in the wild.
2017-02-03Create new flag to test rustdoc --testGuillaume Gomez-3/+2
2017-02-03Move test from bootstrap to compiletestGuillaume Gomez-0/+27
2017-01-15Fix missing blank space issueGuillaume Gomez-1/+1
2017-01-09Improved rustdoc rendering for unstable featuresManish Goregaokar-3/+9
2017-01-02rustc: Stabilize the `proc_macro` featureAlex Crichton-2/+0
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the compiler to stabilize the "Macros 1.1" feature of the language. Many more details can be found on the tracking issue, #35900. Closes #35900
2016-12-12rustdoc: Fix short summaries in search resultsOliver Middleton-0/+20
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: fix doctests with non-feature crate attrsAlex Burka-0/+110
2016-12-08Fix doc-tests on exported `macro_rules!`.Jeffrey Seyfried-0/+18
2016-12-01Auto merge of #37911 - liigo:rustdoc-playground, r=alexcrichtonbors-0/+24
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-3/+4
2016-11-30unstable --playground-url, add test codeLiigo Zhuang-0/+24
2016-11-28rustc: desugar `use a::{b,c};` into `use a::b; use a::c;` in HIR.Eduard-Mihai Burtescu-4/+10
2016-11-16Auto merge of #37773 - ollie27:rustdoc_inline_glob, r=brsonbors-0/+173
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.