summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2016-10-31Changed most vec! invocations to use square bracesiirelu-4/+4
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-19Improve `$crate`.Jeffrey Seyfried-3/+2
2016-10-15rustdoc: Improve playground run buttonsOliver Middleton-95/+39
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-14Rollup merge of #37102 - est31:rustdoc_question_mark, r=GuillaumeGomezJonathan Turner-2/+10
rustdoc: color the question mark operator The idea of coloring `?` specially was proposed by @eddyb in: https://github.com/rust-lang/rust/issues/31436#issuecomment-247426582
2016-10-12Change color and make ? boldest31-1/+2
2016-10-12rustdoc: color the question mark operatorest31-2/+9
The idea was proposed by eddyb in: https://github.com/rust-lang/rust/issues/31436#issuecomment-247426582
2016-10-11Rollup merge of #36679 - QuietMisdreavus:rustdoc-line-breaks, r=steveklabnikGuillaume Gomez-102/+335
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-08Auto merge of #36637 - GuillaumeGomez:fix_run_button, r=blussbors-2/+32
Fixes run button appearing when it shouldn't Fixes #36621. r? @steveklabnik
2016-10-06Remove underline when run button hoveredGuillaume Gomez-0/+1
2016-10-05Fixes run button appearing when it shouldn'tGuillaume Gomez-2/+32
2016-10-02Remove redundant 'Variant' in variant names, stop reexporting.Corey Farwell-6/+8
2016-10-02Remove redundant 'Import' in variant names, stop reexporting.Corey Farwell-3/+3
2016-10-02Cleanup `return` statements.Corey Farwell-5/+5
2016-10-02Rename method 'to_string' to match conventions.Corey Farwell-1/+1
2016-10-02Remove redundant 'Type' in variant names, stop reexporting.Corey Farwell-10/+10
2016-09-30Simplify logic around Context's root_path.Corey Farwell-14/+12
Was previously cached and maintained in the `Context`, which to me seems overkill.
2016-09-30Migrate Item ➡ ItemType function to method.Corey Farwell-25/+20
2016-09-26Auto merge of #36764 - jonathandturner:rollup, r=jonathandturnerbors-0/+5
Rollup of 14 pull requests - Successful merges: #36563, #36574, #36586, #36662, #36663, #36669, #36676, #36721, #36723, #36727, #36729, #36742, #36754, #36756 - Failed merges:
2016-09-26rustdoc: fix regression when printing single-element tuplesQuietMisdreavus-1/+1
2016-09-26Rollup merge of #36676 - bluss:rustdoc-where-css, r=steveklabnikJonathan Turner-0/+5
rustdoc css: Put `where` in trait listings on a new line This is about the gray area at the top of a trait's documentation page, that lists all methods and their signatures. A big trait page like Iterator is very crowded without this tweak.
2016-09-26rustdoc: format bare functions like rustfmtQuietMisdreavus-32/+37
see commit 2a274e72 for details
2016-09-26rustdoc: format struct methods like rustfmtQuietMisdreavus-100/+320
* ignore signatures 80 characters or shorter * otherwise, put arguments and return arrow on their own line, indented to the opening parenthesis in doing this, most of a plain-text output has been written for rustdoc, accessible through "alternate" Display printing: "{:#}"
2016-09-26deduplicate inline is_nightly_build implementationsTim Neumann-7/+4
2016-09-26refactor away get_unstable_features_settingTim Neumann-5/+3
2016-09-24Rollup merge of #36559 - grimreaper:eax/fix/r1, r=nikomatsakisGuillaume Gomez-6/+7
Fix a variety of minor issues CSS: - use integer values for font-size in CSS - use correct ordering of @import - "invisible" isn't a tag - presume its a class - "border-color" defines the complete border python: - use "not" instead of == "[]" for python - prefer triple quoted docstrings - prefer static functions where possible - prefer modern style classes where possible - remove semicolons; global: - remove duplicated words words
2016-09-23rustdoc css: Put `where` in trait listings on a new lineUlrik Sverdrup-0/+5
This is about the gray area at the top of a trait's documentation page, that lists all methods and their signatures. A big trait page like Iterator is very crowded without this tweak.
2016-09-23rustdoc: format non-self arguments for struct methods on their own lineQuietMisdreavus-1/+5
2016-09-23rustdoc: print arguments to bare functions on their own lineQuietMisdreavus-1/+5
2016-09-20rustc_metadata: go only through rustc_serialize in astencode.Eduard Burtescu-7/+5
2016-09-17invisible isn't a tagEitan Adler-1/+1
2016-09-17border-color > borderEitan Adler-1/+1
2016-09-17add missing semi-colonEitan Adler-1/+2
2016-09-17duplicate theEitan Adler-1/+1
2016-09-17Fix order of @importEitan Adler-2/+2
In CSS 2.1, any @import rules must precede all other rules (except the @charset rule, if present).
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-10/+10
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-20/+17
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-20/+17
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: more docblock-short stylesLiigo-5/+5
2016-09-09rustdoc: don't collapse `docblock-short`Liigo-5/+5
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-20/+17
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/+3