about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
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.
2016-11-14rustdoc: Fix some local inlining issuesOliver Middleton-0/+173
* 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-13do not use deprecated text for unstable docsAndy Russell-0/+10
2016-11-12Rollup merge of #37190 - QuietMisdreavus:rustdoc-where-newline, r=GuillaumeGomezEduard-Mihai Burtescu-0/+19
rustdoc: add line breaks to where clauses a la rustfmt Much like my last PR for rustdoc (#36679), this adds line breaks to certain statements based on their line length. Here the focus was on where clauses. Some examples: - [Where clause in a trait function](https://shiva.icesoldier.me/custom-std/std/iter/trait.Iterator.html?search=#method.unzip) (also in the trait header block at the top of the page) - [Where clause on a bare function](https://shiva.icesoldier.me/doc-custom2/petgraph/visit/fn.depth_first_search.html) - [Where clauses in trait impls on a struct](https://shiva.icesoldier.me/custom-std/std/collections/struct.HashMap.html) (scroll to the bottom) These are regularly not on their own line, but will be given their own line now if their "prefix text" doesn't give them enough room to sensibly print their constraints. HashMap's trait impls provide some examples of both behaviors. The libstd links above are the whole docs rendered with this, and the "bare function" link above is in another set that pulls some notable crates together. `petgraph` was the one that brought this request up, and that collection also includes [itertools](https://shiva.icesoldier.me/doc-custom2/itertools/trait.Itertools.html) which provided an easy sample to test with. r? @GuillaumeGomez
2016-10-15rustdoc: Improve playground run buttonsOliver Middleton-0/+79
The main change is to stop using javascript to generate the URLs and use rustdoc instead. This also adds run buttons to the error index examples.
2016-10-13rustdoc: add line breaks to where clauses a la rustfmtQuietMisdreavus-0/+19
2016-10-11Rollup merge of #36679 - QuietMisdreavus:rustdoc-line-breaks, r=steveklabnikGuillaume Gomez-0/+21
rustdoc: print non-self arguments of bare functions and struct methods on their own line This change alters the formatting rustdoc uses when it creates function and struct method documentation. For bare functions, each argument is printed on its own line. For struct methods, non-self arguments are printed on their own line. In both cases, no line breaks are introduced if there are no arguments, and for struct methods, no line breaks are introduced if there is only a single self argument. This should aid readability of long function signatures and allow for greater comprehension of these functions. I've run rustdoc with these changes on my crate egg-mode and its set of dependencies and put the result [on my server](https://shiva.icesoldier.me/doc-custom/egg_mode/). Of note, here are a few shortcut links that highlight the changes: * [Bare function with a long signature](https://shiva.icesoldier.me/doc-custom/egg_mode/place/fn.reverse_geocode.html) * [Struct methods, with single self argument and with self and non-self arguments](https://shiva.icesoldier.me/doc-custom/egg_mode/tweet/struct.Timeline.html#method.reset) * [Bare functions with no arguments](https://shiva.icesoldier.me/doc-custom/rand/fn.thread_rng.html) and [struct methods with no arguments](https://shiva.icesoldier.me/doc-custom/hyper/client/struct.Client.html#method.new) are left unchanged. This PR consists of two commits: one for bare functions and one for struct methods.
2016-10-06rustc: Rename rustc_macro to proc_macroAlex Crichton-6/+6
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`, which reflects the general consensus of #35900. A follow up PR to Cargo will be required to purge the `rustc-macro` name as well.