summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2018-07-30Delete unused code in rustdocMark Rousskov-14/+0
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-1/+1
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-16/+16
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-29Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakisbors-15/+11
Misc cleanups
2018-07-28Auto merge of #52585 - GuillaumeGomez:generic-impls, r=QuietMisdreavusbors-35/+66
[rustdoc] Generic impls Fixes #33772. r? @QuietMisdreavus
2018-07-28Don't format!() string literalsljedrz-1/+1
2018-07-28Don't display full blanket implementation and put it into its own sectionGuillaume Gomez-18/+47
2018-07-28Rollup merge of #52781 - ljedrz:avoid_vec_arguments, r=nikomatsakiskennytm-3/+3
Use a slice where a vector is not necessary
2018-07-27Use slices where a vector is not necessaryljedrz-3/+3
2018-07-27Use str::repeatShotaro Yamada-15/+11
2018-07-27Prefer to_string() to format!()ljedrz-16/+16
2018-07-25Add missing dynTatsuyuki Ishi-5/+5
2018-07-22Improve codeGuillaume Gomez-10/+1
2018-07-22CleanupGuillaume Gomez-6/+0
2018-07-22Add filter over non generic implsGuillaume Gomez-1/+0
2018-07-22Working generic implGuillaume Gomez-21/+25
2018-07-22some improvementsGuillaume Gomez-3/+12
2018-07-22part 2Guillaume Gomez-1/+5
2018-07-22First step to generic trait implsGuillaume Gomez-0/+1
2018-07-19Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakisbors-4/+46
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
2018-07-19Auto merge of #51854 - davidtwco:rfc-2008-rustdoc, r=QuietMisdreavusbors-9/+66
RFC 2008 non-exhaustive enums/structs: Rustdoc Part of #44109. Not sure how those who maintain rustdoc primarily would prefer this addition look or where it should be placed, happy to make any changes required. r? @QuietMisdreavus (not sure if this is the right person, just guessing)
2018-07-19Generate a page for existential typesOliver Schneider-4/+37
2018-07-19Updated FRU terminology.David Wood-1/+1
2018-07-18remove FIXME about macro redirectsQuietMisdreavus-1/+0
Based on the discussion in #35705, the rustdoc team has determined that macro redirects are here to stay. Closes #35705
2018-07-18Updated wording and placement of non-exhaustive notice so it is collapsed by ↵David Wood-18/+37
default and easier to understand.
2018-07-18Implement existential typesOliver Schneider-0/+9
2018-07-12Moved non_exhaustive message to fields/variants section and onto type.David Wood-19/+18
2018-07-08Add setting to prevent doc auto-hide of trait implementationsGuillaume Gomez-10/+14
2018-07-06Auto merge of #52088 - kennytm:rollup, r=kennytmbors-1/+1
Rollup of 14 pull requests Successful merges: - #51619 (rust: add initial changes to support powerpc64le musl) - #51793 (Fix variant background color on hover in search results) - #52005 (Update LLVM to bring in a wasm codegen fix) - #52016 (Deduplicate error reports for statics) - #52019 ([cross-lang-lto] Allow the linker to choose the LTO-plugin (which is useful when using LLD)) - #52030 (Any docs preposition change) - #52031 (Strenghten synchronization in `Arc::is_unique`) - #52033 ([Gardening] Update outdated comments: ByVal -> Scalar) - #52055 (Include VS 2017 in error message.) - #52063 (Add a link to the rustc docs) - #52073 (Add a punch card to weird expressions test) - #52080 (Improve dependency deduplication diagnostics) - #52093 (rustc: Update tracking issue for wasm_import_module) - #52096 (Fix typo in cell.rs) Failed merges:
2018-07-06Auto merge of #51861 - GuillaumeGomez:prevent-some-markdown-short-doc, ↵bors-7/+36
r=QuietMisdreavus Prevent some markdown transformation on short docblocks Before: <img width="1440" alt="screen shot 2018-06-28 at 01 46 01" src="https://user-images.githubusercontent.com/3050060/42005762-7d533bbe-7a76-11e8-8361-027886803399.png"> After: <img width="1440" alt="screen shot 2018-06-28 at 01 46 02" src="https://user-images.githubusercontent.com/3050060/42005768-81bd59a0-7a76-11e8-819b-9b4be72579d6.png"> This is only performed on short doc blocks, not on plain ones. Not all transformations are prevented (you still have a few like urls, code blocks, etc...). cc @nical r? @QuietMisdreavus
2018-07-06Rollup merge of #51793 - GuillaumeGomez:search-result-hover, r=QuietMisdreavuskennytm-1/+1
Fix variant background color on hover in search results Fixes #51792. <img width="1440" alt="screen shot 2018-06-26 at 00 37 24" src="https://user-images.githubusercontent.com/3050060/41879313-60ecf3be-78d9-11e8-9986-21af529ab758.png"> r? @QuietMisdreavus
2018-07-05Simplified checking for non_exhaustive attribute.David Wood-1/+1
2018-07-05Auto merge of #51599 - GuillaumeGomez:reduce-search-index, r=QuietMisdreavusbors-32/+53
reduce search-index size Reduce size of `search-index.js` of around 16%: Going from `2996785` bytes to `2545583`. r? @QuietMisdreavus
2018-07-04Auto merge of #51803 - lucasem:rustdoc-code-hash-escape, r=GuillaumeGomezbors-10/+10
rustdoc codeblock hash escape So that docstring text such as the following (in a code block) can be created ergonomically: ```rust let s = " foo # bar baz "; ``` Such code in a docstring hide the <code>&nbsp;&nbsp;&nbsp;&nbsp;# bar</code> line. Previously, using two consecutive hashes <code>&nbsp;&nbsp;&nbsp;&nbsp;## bar</code> would turn the line into _shown_ `# bar`, losing the leading whitespace. A line of code like <code>&nbsp;&nbsp;&nbsp;&nbsp;# bar</code> (such as in the example above) **could not be represented** in the docstring text. This commit makes the two consecutive hashes not also trim the leading whitespace — the two hashes simply **escape** into a single hash and do not hide the line, leaving the rest of that line unaffected. The new docstring text to achieve the above code block is: ```rust /// ``` /// let s = " /// foo /// ## bar /// baz /// "; /// ``` ```
2018-06-30Improved non_exhaustive message.David Wood-16/+29
2018-06-30reduce search-index sizeGuillaume Gomez-32/+53
2018-06-29Auto merge of #51592 - GuillaumeGomez:fix-macro-doc-search, r=GuillaumeGomezbors-4/+2
Fix macro missing from doc search Fixes #51095. r? @QuietMisdreavus
2018-06-28Prevent some markdown transformation on short docblocksGuillaume Gomez-7/+36
2018-06-27Include type in non-exhaustive message. Include new css in dark theme.David Wood-4/+6
2018-06-27Display #[non_exhaustive] in rustdoc on types.David Wood-1/+25
2018-06-26rustdoc codeblock hash escapeLucas Morales-10/+10
2018-06-26Fix variant background color on hover in search resultsGuillaume Gomez-1/+1
2018-06-25Minify cssGuillaume Gomez-12/+31
2018-06-25Remove unused variableGuillaume Gomez-1/+0
2018-06-23Auto merge of #51580 - cramertj:async-await, r=eddybbors-26/+39
async/await This PR implements `async`/`await` syntax for `async fn` in Rust 2015 and `async` closures and `async` blocks in Rust 2018 (tracking issue: https://github.com/rust-lang/rust/issues/50547). Limitations: non-`move` async closures with arguments are currently not supported, nor are `async fn` with multiple different input lifetimes. These limitations are not fundamental and will be removed in the future, however I'd like to go ahead and get this PR merged so we can start experimenting with this in combination with futures 0.3. Based on https://github.com/rust-lang/rust/pull/51414. cc @petrochenkov for parsing changes. r? @eddyb
2018-06-22Fix rustdoc and remove default impl for FnHeaderTaylor Cramer-5/+7
2018-06-22Auto merge of #51482 - GuillaumeGomez:table-display, r=QuietMisdreavusbors-7/+3
Greatly improve tables display in docs Fixes #51454. r? @QuietMisdreavus Before: <img width="1440" alt="screen shot 2018-06-10 at 22 43 52" src="https://user-images.githubusercontent.com/3050060/41206138-cc61b2b4-6cff-11e8-9b6f-0b1e435d4b1b.png"> After: <img width="1440" alt="screen shot 2018-06-10 at 23 33 16" src="https://user-images.githubusercontent.com/3050060/41207049-d455c03c-6d0e-11e8-968f-d4fccaeb4265.png">
2018-06-21async await desugaring and testsTaylor Cramer-1/+2
2018-06-21Display async fn in rustdoc.Without Boats-3/+18
2018-06-21Parse async fn header.Without Boats-21/+16
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.