summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
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
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).