about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2016-05-20Update testsManish Goregaokar-6/+19
2016-05-12rustdoc: Fix missing type parameters on implsOliver Middleton-0/+23
2016-05-10Auto merge of #33512 - birkenfeld:issue-25944, r=sanxiynbors-0/+21
rustdoc: remove artificial indentation of doctest code The indentation makes the examples look nicer when printed (when is this done?), but breaks tests using multi-line string literals. Fixes: #25944
2016-05-09rustdoc: remove artificial indentation of doctest codeGeorg Brandl-0/+21
This makes the examples look nicer when printed (when is this done?), but breaks tests using multi-line string literals. Fixes: #25944
2016-05-09rustdoc: do not strip blanket impls in crate of originGeorg Brandl-0/+26
In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out. Now we check if they are generic, and keep them in that case. Fixes: #29503
2016-05-06s/aux/auxiliary, because windowsNiko Matsakis-0/+0
For legacy reasons (presumably), Windows does not permit files name aux.
2016-05-06add missing aux filesNiko Matsakis-0/+55
2016-05-06move auxiliary builds to a test-relative `aux`Niko Matsakis-0/+554
Instead of finding aux-build files in `auxiliary`, we now search for an `aux` directory relative to the test. So if your test is `compile-fail/foo.rs`, we would look in `compile-fail/aux`. Similarly, we ignore the `aux` directory when searching for tets.
2016-05-03Rollup merge of #33372 - birkenfeld:rustdoc-escape-code, r=cmrManish Goregaokar-0/+15
rustdoc: HTML-escape Rust code (from constants) Especially in cases like the one in the test file, this can blow up the rendering big time if string constants in the code contain HTML. But also other constants can contain special chars (e.g. `&` as an operator in constant expressions).
2016-05-03rustdoc: HTML-escape Rust code (from constants)Georg Brandl-0/+15
Especially in cases like the one in the test file, this can blow up the docs big time if string constants in the code contain HTML. But also other constants can contain special chars (e.g. `&` as an operator in constant expressions).
2016-05-03rustdoc: fix inserting source code spans for constant valuesGeorg Brandl-0/+46
This will go wrong when the constants partially result from macro expansion. Instead, use the expressions and pretty-print them as Rust code. Fixes: #33302
2016-04-27Auto merge of #33151 - ollie27:rustdoc_abi, r=alexcrichtonbors-0/+37
rustdoc: Cleanup ABI rendering Use a common method for rendering `extern "<abi>"`. This now consistently shows `extern fn` rather than `extern "C" fn`.
2016-04-27Auto merge of #33199 - mitaa:tokenize-responsibly, r=nrcbors-0/+21
Make some fatal lexer errors recoverable I've kept the changes to a minimum since I'm not really sure if this approach is a acceptable. fixes #12834 cc @nrc
2016-04-27Make some fatal lexer errors recoverablemitaa-0/+21
2016-04-27rustdoc: Render `extern fn` instead of `extern "C" fn`Oliver Middleton-8/+8
2016-04-26Rollup merge of #33196 - mitaa:rdoc-crate-links, r=alexcrichtonManish Goregaokar-0/+43
rustdoc: Linkify extern crates fixes #33178 r? @alexcrichton
2016-04-26Rollup merge of #33160 - euclio:rustdoc-unstable-deprecated, r=alexcrichtonManish Goregaokar-0/+25
show unstable status for deprecated items Fixes #32374.
2016-04-26Rollup merge of #33133 - mitaa:rdoc-smth-smth-impl, r=alexcrichtonManish Goregaokar-0/+64
rustdoc: inline all the impls This used to be done to avoid inlining impls referencing private items, but is now unnecessary since we actually check that impls do not reference non-doc-reachable items. fixes #32881 fixes #33025 fixes #33113 r? @alexcrichton
2016-04-25Linkify extern crates on rustdoc pagesmitaa-0/+43
2016-04-24Check reachability for inlined extern links toomitaa-0/+22
An item is inlined and recorded as inlined even if it is `doc(hidden)`, leading to unchecked external links.
2016-04-24Remove, now unnecessary, workaroundmitaa-0/+42
This used to be done to avoid inlining impls referencing private items, but is now unnecessary since we actually check that impls do not reference non-doc-reachable items.
2016-04-22show unstable status for deprecated itemsAndy Russell-0/+25
2016-04-22Only record the same impl oncemitaa-0/+43
Due to inlining it is possible to visit the same module multiple times during `<Cache as DocFolder>::fold_crate`, so we keep track of the modules we've already visited.
2016-04-22rustdoc: Cleanup ABI renderingOliver Middleton-5/+42
Use a common method for rendering `extern "<abi>"`. This now consistently shows `extern "C" fn` rather than just `extern fn`.
2016-04-21Auto merge of #33074 - mitaa:rdoc-irlst, r=alexcrichtonbors-0/+20
rustdoc: Fix the strip-hidden `ImplStripper` Instead of stripping impls which reference *stripped* items, we keep impls which reference *retained* items. We do this because when we strip an item we immediately return, and do not recurse into it - leaving the contained items non-stripped from the point of view of the `ImplStripper`. fixes #33069 r? @alexcrichton
2016-04-19Auto merge of #33002 - mitaa:rdoc-cross-impls, r=alexcrichtonbors-0/+130
rustdoc: refine cross-crate impl inlining This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation. fixes #14586 fixes #31948 .. and also applies the reachability checking to cross-crate links. fixes #28480 r? @alexcrichton
2016-04-19Auto merge of #32985 - caipre:rustdoc-disambiguate-impl-anchors, r=alexcrichtonbors-0/+27
rustdoc: Disambiguate anchors Closes https://github.com/rust-lang/rust/issues/32890
2016-04-18Rollup merge of #32558 - sanxiyn:rustdoc-self-link, r=steveklabnikSteve Klabnik-0/+16
Avoid linking to itself in implementors section of trait page Fix #32474.
2016-04-18Fix the strip-hidden `ImplStripper`mitaa-0/+20
Instead of stripping impls which reference *stripped* items, we keep impls which reference *retained* items. We do this because when we strip an item we immediately return, and do not recurse into it - leaving the contained items non-stripped from the point of view of the `ImplStripper`.
2016-04-17rustdoc: Disambiguate anchors for assoc item implsNick Platt-0/+27
2016-04-18Reachability check cross-crate linksmitaa-0/+23
2016-04-18Perform doc-reachability check for inlined implsmitaa-0/+107
This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation.
2016-04-15Add flag for whether an item is default or not.pierzchalski-0/+4
We don't want to render default item docs but previously `doctraititem` naively delegated to the trait definition in those cases. Updated tests to also check that this doesn't strip default item docs from the trait definition.
2016-04-15Add tests against weird provided/required method behaviourpierzchalski-7/+55
In `test/rustdoc/manual_impl.rs` there are now three structs: * S1 implements and documents required method `a_method`. * S2 implements and documents `a_method` as well as provided method `b_method`. * S3 implements `a_method` and `b_method`, but only documents `b_method`. For a struct, we want the rendered trait impls to include documentation if and only if it appears on the trait implementation itself (since users can just go to the trait definition for anything not covered in the impl docs). This means we expect: * S1, S2, and S3 to all include top-level trait impl docs. * S1, S2, and S3 to exclude all trait definition docs. * S1 to show impl docs for `a_method`. * S2 to show impl docs for `a_method` and `b_method`. * S3 to show impl docs for `b_method`. These tests cover those cases.
2016-04-14Delegate whether to print docblocks to 'document'pierzchalski-0/+26
Add test to check this resolves #24838 and #26871.
2016-04-11rustdoc: Fix testing no_run code blocksAlex Crichton-0/+19
This was a regression introduced by #31250 where the compiler deferred returning the results of compilation a little too late (after the `Stop` check was looked at). This commit alters the stop point to first try to return an erroneous `result` and only if it was successful return the sentinel `Err(0)`. Closes #31576
2016-04-06Add a testSeo Sanghyeon-0/+16
2016-04-02Refactor `HiddenStructField` into `StrippedItem`mitaa-0/+44
2016-04-02Make the rendering process less pass-awaremitaa-0/+48
Instead of hardcoding knowledge about the strip-private pass into the rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`. Rustdoc will, for example, generate redirect pages for public items contained in private modules which have been re-exported to somewhere externally reachable - this will now not only work for the `strip-private` pass, but for other passes as well, such as the `strip-hidden` pass.
2016-03-27Load struct-variant data correctly from metadatamitaa-0/+2
2016-03-27Linkify associated types and constantsmitaa-1/+4
2016-03-27Correct anchor for links to associated trait itemsmitaa-0/+39
2016-03-23Rollup merge of #32434 - mitaa:rdoc-no-inline, r=alexcrichtonEduard-Mihai Burtescu-0/+33
rustdoc: Consider `doc(no_inline)` in crate-local inlining Imports with `doc(no_inline)` will not be inlined, even when `doc(inline)` is present. fixes #32343 r? @alexcrichton
2016-03-22Consider `doc(no_inline)` in crate-local inliningmitaa-0/+33
2016-03-22Omit `pub` for inlined variant-struct fieldsmitaa-0/+21
2016-03-12Auto merge of #32142 - mitaa:rdoc-maybe-inline-local, r=alexcrichtonbors-4/+56
rustdoc: improve crate-local inlining fixes #28537 r? @alexcrichton
2016-03-11Adjust rustdoc test for new restrictionAaron Turon-3/+3
2016-03-10Remove `feature(globs)` since they are stablemitaa-4/+0
2016-03-10Consider `doc(hidden)` for crate-local inliningmitaa-0/+27
2016-03-09Check for `doc(inline)` instead of `.*(inline)`mitaa-0/+29