about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
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.
2016-09-30rustdoc: Fix documenting rustc-macro cratesAlex Crichton-0/+24
This commit adds a "hack" to the session to track whether we're a rustdoc session or not. If we're rustdoc then we skip the expansion to add the rustc-macro infrastructure. Closes #36820
2016-09-27add rustdoc test for adding line breaksQuietMisdreavus-0/+21
2016-09-14Auto merge of #36293 - liigo:docblock-short, r=steveklabnikbors-1/+1
rustdoc: don't collapse `docblock-short` ![docblock-short](https://cloud.githubusercontent.com/assets/346530/18267298/137d2542-7451-11e6-9c8e-dd4e1f1fea29.png)
2016-09-14Auto merge of #35667 - ollie27:rustdoc_opaque_structs, r=steveklabnikbors-0/+10
rustdoc: Don't add extra newlines for fully opaque structs Changes the definition for braced structs with only private or hidden fields to save space on the page. Before: ``` pub struct Vec<T> { // some fields omitted } ``` After: ``` pub struct Vec<T> { /* fields omitted */ } ``` This also cleans up empty braced structs. Before: ``` pub struct Foo { } ``` After: ``` pub struct Foo {} ``` [before](https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html) [after](https://ollie27.github.io/rust_doc_test/std/vec/struct.Vec.html) cc #34713
2016-09-10Rollup merge of #36045 - ollie27:rustdoc_titles3, r=steveklabnikGuillaume Gomez-0/+59
rustdoc: Add missing item types to page titles Most pages include the item type in the title such as "Struct std::vec::Vec". However it is missing from the pages for foreign functions, type definitions, macros, statics and constants. This adds them so for example, instead of a title of "std::u32::MAX" it is "Constant std::u32::MAX" to match the others. [before](https://doc.rust-lang.org/nightly/std/u32/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/u32/constant.MAX.html) [before](https://doc.rust-lang.org/nightly/std/io/type.Result.html) [after](https://ollie27.github.io/rust_doc_test/std/io/type.Result.html) Previous discussions: #34345, #35003
2016-09-09rustdoc: don't collapse `docblock-short`Liigo-1/+1
2016-09-09rustdoc: Don't add extra newlines for fully opaque structsOliver Middleton-0/+10
Changes the definition for opaque structs to look like `pub struct Vec<T> { /* fields omitted */ }` to save space on the page. Also only use one line for empty braced structs.
2016-09-08Auto merge of #35745 - jroesch:soundness-fix-29859, r=nikomatsakisbors-1/+1
Fix soundness bug described in #29859 This is an attempt at fixing the problems described in #29859 based on an IRC conversation between @nikomatsakis and I today. I'm waiting on a full build to come back, otherwise both tests trigger the correct error.
2016-09-07Auto merge of #36266 - Sawyer47:issue-35169, r=alexcrichtonbors-0/+85
rustdoc: Filter more incorrect methods inherited through Deref Old code filtered out only static methods. This code also excludes &mut self methods if there is no DerefMut implementation. Fixes #35169
2016-09-05Auto merge of #36078 - ollie27:rustdoc_search_assocconst, r=alexcrichtonbors-0/+40
rustdoc: Fix associated consts in search results Associated consts can appear in none trait impls so need to be treated like methods when generating the search index. Fixes #36031
2016-09-05rustdoc: Filter more incorrect methods inherited through DerefPiotr Jawniak-0/+85
Old code filtered out only static methods. This code also excludes &mut self methods if there is no DerefMut implementation
2016-09-03Support unions in rustdocVadim Petrochenkov-0/+20
2016-09-02Remove illegal bound from doc testJared Roesch-1/+1