summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
AgeCommit message (Collapse)AuthorLines
2016-09-26refactor away get_unstable_features_settingTim Neumann-3/+2
2016-09-20rustc_metadata: go only through rustc_serialize in astencode.Eduard Burtescu-5/+4
2016-09-15Auto merge of #36393 - petrochenkov:ancient, r=eddybbors-1/+1
Remove some obsolete code from the compiler
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 #36472 - GuillaumeGomez:rollup, r=GuillaumeGomezbors-1/+2
Rollup of 5 pull requests - Successful merges: #36334, #36335, #36363, #36374, #36467 - Failed merges:
2016-09-14Rollup merge of #36334 - GuillaumeGomez:run_but, r=steveklabnikGuillaume Gomez-1/+2
Set run button transparent instead of invisible r? @steveklabnik And of course a screenshot: ![screenshot from 2016-09-08 01-15-45](https://cloud.githubusercontent.com/assets/3050060/18331849/31fe1f8c-7562-11e6-9ae9-1dab44089ec6.png)
2016-09-14Auto merge of #35667 - ollie27:rustdoc_opaque_structs, r=steveklabnikbors-6/+15
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-13Remove some ancient code providing special support for newtypesVadim Petrochenkov-1/+1
2016-09-10Rollup merge of #36045 - ollie27:rustdoc_titles3, r=steveklabnikGuillaume Gomez-3/+15
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-6/+15
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-08Set run button transparent instead of invisibleGuillaume Gomez-1/+2
2016-09-07Auto merge of #36266 - Sawyer47:issue-35169, r=alexcrichtonbors-27/+60
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-11/+10
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-27/+60
Old code filtered out only static methods. This code also excludes &mut self methods if there is no DerefMut implementation
2016-09-04Replace `_, _` with `..`Vadim Petrochenkov-1/+1
2016-09-03Fix rebase + address commentsVadim Petrochenkov-4/+2
2016-09-03Support unions in rustdocVadim Petrochenkov-3/+78
2016-08-29Add some features to flock.Michael Woerister-1/+1
2016-08-29Move `flock.rs` from librustdoc to librustc_data_structures.Michael Woerister-1/+2
2016-08-29rustdoc: Fix associated consts in search resultsOliver Middleton-11/+10
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-3/+15
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-27Use deterministic `FnvHash{Map,Set}` in rustdocJonas Schievink-28/+29
2016-08-24Migrate ItemType::from_type_kind to convert::From.Corey Farwell-1/+1
2016-08-24Migrate ItemType::from_item to convert::From.Corey Farwell-1/+1
2016-08-24Migrate Context::maybe_ignore_item method to standalone function.Corey Farwell-14/+14
The method wasn't using any `self` data from Context, so it seemed miseading to implement it as a method.
2016-08-24Move ItemEnum → Generics logic into method on ItemEnum.Corey Farwell-11/+2
2016-08-19RedirectNick Cameron-0/+10
2016-08-17Review changesNick Cameron-37/+66
2016-08-17rustdoc: redirects from sane, namespaced URLs to Rustdoc's ridiculous onesNick Cameron-17/+42
cc #35020 which does this properly
2016-08-17rustdoc: refactoring and tidying upNick Cameron-106/+108
pulled out of #35020
2016-07-25rustdoc: Fix tuple struct where clause renderingOliver Middleton-2/+13
For tuple structs the where clause comes after the definition.
2016-07-12rustdoc: Fix methods in seach resultsOliver Middleton-24/+19
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-07-06Rollup merge of #34626 - sylvestre:master, r=ManishearthSteve Klabnik-1/+1
Fix typos
2016-07-05Auto merge of #34587 - ollie27:rustdoc_prim_titles, r=steveklabnikbors-7/+8
rustdoc: Remove paths from primitive page <title> tags 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-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-21/+15
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-07-03Fix a few typos in the codeSylvestre Ledru-1/+1
2016-06-30rustdoc: Remove paths from primitive page <title> tagsOliver Middleton-7/+8
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-30Auto merge of #34541 - jseyfried:rollup, r=jseyfriedbors-16/+1
Rollup of 5 pull requests - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
2016-06-29Rollup merge of #34105 - ollie27:rustdoc_derived, r=alexcrichtonJeffrey Seyfried-16/+1
rustdoc: Remove Derived Implementations title As far as I know whether a trait was derived or not does not change the public API so there is no need to include this information in the docs. This title currently just adds an extra divide in the list of trait implementations which I don't think needs to be there.
2016-06-28rustdoc: Fix empty Implementations section on some module pagesOliver Middleton-0/+3
These are caused by `DefaultImpl`s.
2016-06-23rustdoc: Fix panic caused by doc(hidden) trait methodsOliver Middleton-10/+13
2016-06-20rustdoc: Fix a couple of issues with src links to external cratesOliver Middleton-6/+9
- 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-17/+30
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-17/+30
Also fixes missing stability notices on methods with no docs.
2016-06-14Auto merge of #34245 - ollie27:rustdoc_redirect_rename, r=alexcrichtonbors-12/+10
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-14Auto merge of #34234 - GuillaumeGomez:bad_inlining, r=steveklabnikbors-2/+2
Fix invalid inlining r? @steveklabnik So to put a context. @nox found an issue on the generated doc: ![screenshot from 2016-06-11 19-53-38](https://cloud.githubusercontent.com/assets/3050060/15987898/f7341de0-303b-11e6-9cd7-f2a6df423ee7.png) So as you can see, the two variants are on the same where they shouldn't. I found out that the issue is also on structs: ![screenshot from 2016-06-11 19-53-31](https://cloud.githubusercontent.com/assets/3050060/15987900/0f66c5de-303c-11e6-90fc-5e49d11b6903.png) And so such is the result of the PR: ![screenshot from 2016-06-12 01-15-21](https://cloud.githubusercontent.com/assets/3050060/15987904/19d9183c-303c-11e6-91c1-7c3f1163fbb0.png) ![screenshot from 2016-06-12 01-15-24](https://cloud.githubusercontent.com/assets/3050060/15987905/1b5d2db0-303c-11e6-8f43-9a8ad2371007.png)
2016-06-14rustdoc: Fix redirect pages for renamed reexportsOliver Middleton-12/+10
We need to use the name of the target not the name of the current item when creating the link.
2016-06-12Auto merge of #34045 - ollie27:rustdoc_stripped, r=brsonbors-17/+24
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-12Fix invalid inliningGuillaume Gomez-2/+2