about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
AgeCommit message (Collapse)AuthorLines
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
2016-08-24Remove unnecessary 'Primitive' prefix on `PrimitiveType` enum variants.Corey Farwell-7/+7
2016-08-24Stop reexporting `PrimitiveType` enum in librustdoc.Corey Farwell-13/+14
2016-08-17Auto merge of #35236 - nrc:rustdoc-redirects, r=@alexcrichtonbors-1/+1
rustdoc: redirect URLs cc #35020 which does this properly r? @alexcrichton
2016-08-17rustdoc: refactoring and tidying upNick Cameron-1/+1
pulled out of #35020
2016-08-13Rename empty/bang to neverAndrew Cann-1/+1
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Remove obsolete divergence related stuffAndrew Cann-1/+0
Replace FnOutput with Ty Replace FnConverging(ty) with ty Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-08-12syntax: add anonymized type syntax, i.e. impl TraitA+TraitB.Eduard Burtescu-0/+10
2016-07-12rustdoc: Fix methods in seach resultsOliver Middleton-22/+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-06rustc: Update stage0 to beta-2016-07-06Alex Crichton-2/+1
Hot off the presses, let's update our stage0 compiler!
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-12/+8
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-06-09fix damage in librustcAriel Ben-Yehuda-3/+4
2016-05-30print enum variant fields in docsOliver Schneider-8/+8
2016-05-15Auto merge of #33505 - petrochenkov:self, r=nrcbors-20/+22
Remove ExplicitSelf from HIR `self` argument is already kept in the argument list and can be retrieved from there if necessary, so there's no need for the duplication. The same changes can be applied to AST, I'll make them in the next breaking batch. The first commit also improves parsing of method declarations and fixes https://github.com/rust-lang/rust/issues/33413. r? @eddyb
2016-05-14Remove ExplicitSelf from HIRVadim Petrochenkov-20/+22
2016-05-12rustdoc: Fix missing type parameters on implsOliver Middleton-1/+7
2016-05-03rustdoc: HTML-escape Rust code (from constants)Georg Brandl-1/+2
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-04-27Auto merge of #33151 - ollie27:rustdoc_abi, r=alexcrichtonbors-6/+2
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-27rustdoc: Render `extern fn` instead of `extern "C" fn`Oliver Middleton-0/+1
2016-04-26Rollup merge of #33196 - mitaa:rdoc-crate-links, r=alexcrichtonManish Goregaokar-9/+24
rustdoc: Linkify extern crates fixes #33178 r? @alexcrichton
2016-04-25Linkify extern crates on rustdoc pagesmitaa-9/+24
2016-04-24Check reachability for inlined extern links toomitaa-3/+5
An item is inlined and recorded as inlined even if it is `doc(hidden)`, leading to unchecked external links.
2016-04-22rustdoc: Cleanup ABI renderingOliver Middleton-7/+2
Use a common method for rendering `extern "<abi>"`. This now consistently shows `extern "C" fn` rather than just `extern fn`.
2016-04-19Auto merge of #33002 - mitaa:rdoc-cross-impls, r=alexcrichtonbors-0/+4
rustdoc: refine cross-crate impl inlining This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation. fixes #14586 fixes #31948 .. and also applies the reachability checking to cross-crate links. fixes #28480 r? @alexcrichton