about summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2016-08-29rustdoc: Fix associated consts in search resultsOliver Middleton-0/+40
Associated consts can appear in none trait impls so need to be treated like methods when generating the search index.
2016-08-27rustdoc: Add missing item types to page titlesOliver Middleton-0/+59
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.
2016-08-19RedirectNick Cameron-0/+2
2016-08-18rustdoc: remove the `!` from macro URLs and titlesNick Cameron-2/+2
2016-08-17Review changesNick Cameron-0/+17
2016-08-11Make `private_in_public` compatibility lint deny-by-defaultVadim Petrochenkov-2/+4
2016-08-11Add test for recursive private alias substitution in rustdocVadim Petrochenkov-0/+11
2016-08-11Substitute private type aliases in rustdocpetrochenkov-0/+30
2016-07-25rustdoc: Fix tuple struct where clause renderingOliver Middleton-1/+17
For tuple structs the where clause comes after the definition.
2016-07-13Auto merge of #34684 - oli-obk:eval_rustdoc_array_len, r=alexcrichtonbors-2/+2
evaluate the array length of fixed size array types in rustdoc mitgates #34579 to fix it we'd need an expression simplifier. r? @steveklabnik cc @Osspial
2016-07-13evaluate the array length of fixed size array types in rustdocOliver Schneider-2/+2
2016-07-12rustdoc: Fix methods in seach resultsOliver Middleton-0/+42
Currently methods from extern crates are sometimes added to the search index when they shouldn't be or added with the original path rather than the reexported path. This fixes that by making sure `cache().paths` only contains local paths like the description for it states. It also fixes a few minor issues with link rendering and redirect generation which would point to local crate docs even if the docs for that crate hadn't been generated. Also a bug with methods implemented on traits which caused wrong paths and so dead links in the search results has been fixed.
2016-06-30rustdoc: Remove paths from primitive page <title> tagsOliver Middleton-0/+17
Currently primitive pages have a title like "std::u8 - Rust" this changes it to "u8 - Rust" as "std::u8" is the name of a module not a primitive type.
2016-06-29Rollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichtonManish Goregaokar-0/+15
rustdoc: Fix empty Implementations section on some module pages These are caused by `DefaultImpl`s. For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).
2016-06-29Rollup merge of #34513 - ollie27:rustdoc_stripped, r=alexcrichtonManish Goregaokar-0/+66
rustdoc: Fix a few stripping issues We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set. For example this removes [`core::num::ParseFloatError::__description`](https://doc.rust-lang.org/nightly/core/num/struct.ParseFloatError.html#method.__description) and [`impl Clone for ThreadRng`](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html).
2016-06-28rustdoc: Fix empty Implementations section on some module pagesOliver Middleton-0/+15
These are caused by `DefaultImpl`s.
2016-06-27rustdoc: Fix a few stripping issuesOliver Middleton-0/+66
We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set.
2016-06-26rustdoc: Fix inlined renamed reexports in import listsOliver Middleton-0/+22
2016-06-23rustdoc: Fix panic caused by doc(hidden) trait methodsOliver Middleton-0/+20
2016-06-20rustdoc: Fix a couple of issues with src links to external cratesOliver Middleton-0/+66
- src links/redirects to extern fn from another crate had an extra '/'. - src links to `pub use` of a crate module had an extra '/'. - src links to renamed reexports from another crate used the new name for the link but should use the original name.
2016-06-17Auto merge of #34292 - ollie27:rustdoc_depr_impl, r=GuillaumeGomezbors-0/+128
rustdoc: Add stability notices to impl items Also fixes missing stability notices on methods with no docs. For example [`f64::is_positive`](https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.is_positive) is missing its deprecation message.
2016-06-15rustdoc: Add stability notices to impl itemsOliver Middleton-0/+128
Also fixes missing stability notices on methods with no docs.
2016-06-14Auto merge of #34245 - ollie27:rustdoc_redirect_rename, r=alexcrichtonbors-0/+32
rustdoc: Fix redirect pages for renamed reexports We need to use the name of the target not the name of the current item when creating the link. An example in `std` is [`std::sys::ext`](https://doc.rust-lang.org/nightly/std/sys/ext/index.html).
2016-06-14rustdoc: Fix redirect pages for renamed reexportsOliver Middleton-0/+32
We need to use the name of the target not the name of the current item when creating the link.
2016-06-14Auto merge of #34232 - ollie27:rustdoc_inline, r=alexcrichtonbors-0/+42
rustdoc: Don't inline #[doc(hidden)] pub use Currently if a `#[doc(hidden)] pub use` item is inlined the `hidden` attribute is ignored so the item can appear in the docs. By never inlining such imports, they can be stripped. An example in `std` is [`__OsLocalKeyInner`](https://doc.rust-lang.org/nightly/std/thread/struct.__OsLocalKeyInner.html) which clearly should not be documented.
2016-06-12Auto merge of #34045 - ollie27:rustdoc_stripped, r=brsonbors-0/+22
rustdoc: Don't generate empty files for stripped items We need to traverse stripped modules to generate redirect pages, but we shouldn't generate anything else for them. This now renders the file contents to a Vec before writing it to a file in one go. I think that's probably a better strategy anyway. Fixes: #34025
2016-06-11rustdoc: Don't inline #[doc(hidden)] pub useOliver Middleton-0/+42
Currently if a `#[doc(hidden)] pub use` item is inlined the `hidden` attribute is ignored so the item can appear in the docs. By never inlining such imports, they can be stripped.
2016-06-03rustdoc: Fix generating redirect pages for statics and constsOliver Middleton-0/+23
These were missing from the cache for some reason meaning the redirect pages failed to render.
2016-06-02rustdoc: Don't generate empty files for stripped itemsOliver Middleton-0/+22
We need to traverse stripped modules to generate redirect pages, but we shouldn't generate anything else for them. This now renders the file contents to a Vec before writing it to a file in one go. I think that's probably a better strategy anyway.
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.