summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
AgeCommit message (Collapse)AuthorLines
2017-09-11rustc: replace usize with u64 and ConstUsize.Eduard-Mihai Burtescu-1/+1
2017-08-28Fix invalid linker positionGuillaume Gomez-1/+1
2017-08-01add documentation for function pointers as a primitiveQuietMisdreavus-5/+3
2017-07-30add docs for references as a primitiveQuietMisdreavus-19/+17
2017-06-24rustdoc: Don't ICE on `use *;`Oliver Middleton-1/+5
2017-06-11rustdoc: Link directly to associated typesOliver Middleton-23/+19
Rather than just linking to the trait. Also simplifies the logic used to decide whether to render the full QPath.
2017-06-01rustdoc: Rename `Vector` and `FixedVector` to `Slice` and `Array`Oliver Middleton-11/+4
Also store the array length as a usize rather than a String. This is just a minor refactor.
2017-05-31rustdoc: Cleanup associated const value renderingOliver Middleton-153/+53
Rather than (ab)using Debug for outputting the type in plain text use the alternate format parameter which already does exactly that. This fixes type parameters for example which would output raw HTML. Also cleans up adding parens around references to trait objects.
2017-05-30Fix signature by adding parens when neededGuillaume Gomez-14/+23
2017-05-15rustdoc: Display `extern "C" fn` instead of `extern fn`Oliver Middleton-1/+0
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-2/+2
2017-04-12Fix invalid associated type rendering in rustdocGuillaume Gomez-41/+74
2017-04-09merge with master to pick up pulldown switchQuietMisdreavus-4/+4
2017-04-06rustdoc: move the space at the end of where clausesQuietMisdreavus-3/+11
...so that we don't indent the next line by one extra space
2017-04-06rustdoc: where clause adjustment to fix testsQuietMisdreavus-4/+7
- add spaces to output so stripping lines and breaking spaces renders the same - add commas to where clauses in rustdoc tests to match the new output
2017-04-05style: space between struct name and opening braceQuietMisdreavus-2/+2
2017-04-04rustdoc: properly indent fn signatures in traitsQuietMisdreavus-7/+21
2017-03-31rustdoc: fix alignment of fn arguments when on multiple linesQuietMisdreavus-1/+1
2017-03-31rustdoc: format where clauses like rust-lang-nursery/fmt-rfcs#38QuietMisdreavus-32/+29
2017-03-28rustdoc: format fns like format rfc 39QuietMisdreavus-20/+16
2017-03-21Add whitespace around "=" in assoc itemsGuillaume Gomez-2/+2
2017-03-17Fix invalid debug display for associated constsGuillaume Gomez-2/+2
2017-03-10Fix associated consts displayGuillaume Gomez-19/+47
2017-02-28Apply the same transformation to every typesGuillaume Gomez-20/+34
2017-02-26Put the const type and value into <code>Guillaume Gomez-18/+70
2017-02-09Add the short type to inline links, tooMichael Howell-2/+2
2017-02-06rustdoc: Improve impl disambiguationOliver Middleton-2/+4
* Don't disambiguate if there are multiple impls for the same type. * Disambiguate for impls of &Foo and &mut Foo. * Don't try to disambiguate generic types.
2017-01-21Force backline on all where in docsGuillaume Gomez-4/+3
2017-01-17AST/HIR: Merge ObjectSum and PolyTraitRefVadim Petrochenkov-13/+0
2017-01-04Auto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnikbors-164/+183
Rustdoc: disambiguate Implementors when the type name is not unique Presentation [goes from](https://doc.rust-lang.org/stable/std/iter/trait.ExactSizeIterator.html#implementors): <img width="492" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276752/b2b50474-c387-11e6-96e1-9766851da269.png"> to: <img width="787" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276763/bb37f6b0-c387-11e6-8596-9163cb254674.png"> on cases where there're multiple implementors with the same name. Fixes #37762.
2016-12-22use same param name across methodsEsteban Küber-7/+10
2016-12-20rustdoc: properly calculate line length for impl where clausesQuietMisdreavus-1/+1
2016-12-15Rustdoc: disambiguate Implementors when the type name is not uniqueEsteban Küber-164/+180
2016-11-30rustdoc: link to cross-crate sources directly.Eduard-Mihai Burtescu-10/+12
2016-11-28rustc: desugar `use a::{b,c};` into `use a::b; use a::c;` in HIR.Eduard-Mihai Burtescu-27/+0
2016-10-17rustdoc: make Method/WhereClause wrappers use usize for indentsQuietMisdreavus-12/+13
2016-10-15rustdoc: if a where clause gets any lines, it gets its own lineQuietMisdreavus-1/+3
2016-10-15rustdoc: break where clauses onto their own line if they don't have enough roomQuietMisdreavus-1/+6
2016-10-15rustdoc: apply proper indent when where clauses aren't on their own lineQuietMisdreavus-8/+26
2016-10-13fix spurious </span> appearing before the opening tagQuietMisdreavus-1/+1
2016-10-13rustdoc: add line breaks to where clauses a la rustfmtQuietMisdreavus-11/+23
2016-10-11Rollup merge of #36679 - QuietMisdreavus:rustdoc-line-breaks, r=steveklabnikGuillaume Gomez-100/+318
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-02Remove redundant 'Import' in variant names, stop reexporting.Corey Farwell-3/+3
2016-10-02Rename method 'to_string' to match conventions.Corey Farwell-1/+1
2016-09-26rustdoc: fix regression when printing single-element tuplesQuietMisdreavus-1/+1
2016-09-26rustdoc: format bare functions like rustfmtQuietMisdreavus-24/+29
see commit 2a274e72 for details
2016-09-26rustdoc: format struct methods like rustfmtQuietMisdreavus-99/+304
* 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-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-2/+1