about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2021-10-17Some "parenthesis" and "parentheses" fixesr00ster91-1/+1
2021-10-17Rollup merge of #89943 - matthiaskrgr:clpcompl, r=oli-obkYuki Okushi-6/+4
clippy::complexity fixes
2021-10-16clippy::complexity changesMatthias Krüger-6/+4
2021-10-16Rollup merge of #89906 - ↵Matthias Krüger-1/+1
yuvaldolev:move-format-version-to-rustdoc-json-types, r=CraftSpider Moved format-version constant to rustdoc-json-types Addresses #88620 Moved format-version constant from rustdoc to rustdoc-json-types.
2021-10-15Apply documentation suggestions from code reviewUrgau-3/+3
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-10-15Moved format-version constant to rustdoc-json-typesYuval Dolev-1/+1
2021-10-14Oops, inverted condition, fix thatLoïc BRANSTETT-1/+1
2021-10-14Auto merge of #89815 - GuillaumeGomez:associated-consts-sidebar, r=notriddlebors-16/+79
Associated consts sidebar Fixes #89354. A screenshot with `f32`: ![Screenshot from 2021-10-12 15-07-57](https://user-images.githubusercontent.com/3050060/136962078-5faf7b87-7ea5-4d7a-99a4-b2afd77b78e2.png)
2021-10-14Deduplicate macro_rules! from module_exports when documenting themLoïc BRANSTETT-3/+11
This can append if within the same module a `#[macro_export] macro_rules!` is declared but also a reexport of itself producing two export of the same macro in the same module. In that case we only want to document it once.
2021-10-13Improve code readability for sidebar linksGuillaume Gomez-16/+48
2021-10-12Fix local crate not being scrapedWill Crichton-8/+12
2021-10-12List associated constants in the sidebarGuillaume Gomez-7/+38
2021-10-12rustdoc: update noto sans krShinwoo Park-13/+14
2021-10-11Cleanup .item-table CSSStefan Schindler-1/+1
2021-10-11Rollup merge of #89736 - GuillaumeGomez:rm-unused-css-rule, r=dns2utf8Matthias Krüger-2/+0
Remove unused CSS rule As you can see in the firefox devtools: ![Screenshot from 2021-10-10 14-28-08](https://user-images.githubusercontent.com/3050060/136695689-16c77ceb-b1ab-40df-963a-048f2258e217.png) It needs the display to be `grid` or `inline-grid`, which isn't the case. r? `@dns2utf8`
2021-10-11Rollup merge of #89722 - jkugelman:cannonical-typo, r=joshtriplettMatthias Krüger-1/+1
Fix spelling: Cannonical -> Canonical
2021-10-11Rollup merge of #89632 - GuillaumeGomez:fix-docblock-code, r=jshaMatthias Krüger-0/+4
Fix docblock code display on mobile Fixes https://github.com/rust-lang/rust/issues/89618. Before: ![Screenshot from 2021-10-07 12-01-37](https://user-images.githubusercontent.com/3050060/136363624-72bedddd-b45e-48a0-89b4-6563612f8677.png) After: ![Screenshot from 2021-10-07 20-17-21](https://user-images.githubusercontent.com/3050060/136440704-fa9ffa68-8e94-46a7-b556-c41aa5153750.png) r? `@jsha`
2021-10-10Remove unused CSS ruleGuillaume Gomez-2/+0
2021-10-10Fix <code> blocks in doc blocks display on mobileGuillaume Gomez-0/+4
2021-10-10Fix spelling: Cannonical -> CanonicalJohn Kugelman-1/+1
2021-10-10Auto merge of #89695 - jsha:more-templates, r=GuillaumeGomezbors-55/+113
Move top part of print_item to Tera templates Part of #84419. This moves the first line of each item page (E.g. `Struct foo::Bar .... 1.0.0 [-][src]` into a Tera template. I also moved template initialization into its own module and added a small macro to reduce duplication and opportunity for errors.
2021-10-09Auto merge of #88379 - camelid:cleanup-clean, r=jyn514bors-514/+415
rustdoc: Cleanup various `clean` types Cleanup various `clean` types.
2021-10-09Remove some stray whitespace.Jacob Hoffman-Andrews-3/+3
2021-10-09Rollup merge of #89700 - GuillaumeGomez:fix-rustdoc-higher-bound-html-gen, ↵Guillaume Gomez-2/+6
r=notriddle Fix invalid HTML generation for higher bounds Considering this is a bug, I cherry-picked the commit from #89676 so it's merged more quickly. r? ``@notriddle``
2021-10-09Fix invalid HTML generation for higher boundsGuillaume Gomez-2/+6
2021-10-08Move template initialization into its own file.Jacob Hoffman-Andrews-15/+23
2021-10-08Add template for print_itemJacob Hoffman-Andrews-46/+96
Add print_item.html and the code in print_item.rs to use it.
2021-10-08Change handling of spans in scrape examples, add test for highlight decorationsWill Crichton-4/+23
2021-10-08Rollup merge of #89669 - Urgau:json-remove-type-never, r=GuillaumeGomezGuillaume Gomez-2/+1
Remove special-casing of never primitive in rustdoc-json-types Fixes https://github.com/rust-lang/rust/issues/89349 r? `@GuillaumeGomez`
2021-10-08Rollup merge of #89649 - matthiaskrgr:clippycompl, r=jyn514Guillaume Gomez-1/+1
clippy::complexity fixes
2021-10-08Rollup merge of #89538 - notriddle:notriddle/arrow-highlight, r=GuillaumeGomezGuillaume Gomez-6/+25
Make rustdoc not highlight `->` and `=>` as operators It was marking them up as `<span class="op">=</span><span class="op">&gt;</span>`, which is bloaty and wrong (at least, I think `<=` and `=>` should probably be different colors, since they're so different and yet made from the same symbols). Before: ![image](https://user-images.githubusercontent.com/1593513/135939748-f49b0f9e-6a7d-4d65-935a-e31cdf688a81.png) After: ![image](https://user-images.githubusercontent.com/1593513/135940063-5ef1f6b1-7e03-4227-b46b-572b063aba05.png)
2021-10-08Move more scrape-examples logic from JS to rustWill Crichton-61/+62
Fix failing test Add missing backslash Fix padding issue with horizontal scrollbar
2021-10-08clippy::complexity fixesMatthias Krüger-1/+1
2021-10-08Remove special-casing of never primitive in rustdoc-json-typesLoïc BRANSTETT-2/+1
2021-10-08Auto merge of #89576 - tom7980:issue-89275-fix, r=estebankbors-1/+2
Prevent error reporting from outputting a recursion error if it finds an ambiguous trait impl during suggestions Closes #89275 This fixes the compiler reporting a recursion error during another already in progress error by trying to make a conversion method suggestion and encounters ambiguous trait implementations that can convert a the original type into a type that can then be recursively converted into itself via another method in the trait. Updated OverflowError struct to be an enum so I could differentiate between passes - it's no longer a ZST but I don't think that should be a problem as they only generate when there's an error in compiling code anyway
2021-10-07Auto merge of #89638 - rust-lang:revert-88548-intersperse, r=Mark-Simulacrumbors-0/+1
Revert "Stabilize `Iterator::intersperse()`" Reverts rust-lang/rust#88548 First step in resolving https://github.com/rust-lang/rust/issues/88967
2021-10-07Revert "Stabilize `Iterator::intersperse()`"Jane Lusby-0/+1
2021-10-07Move some expansion logic into generation-time, fix section header links, ↵Will Crichton-40/+54
remove ID from line numbers, fix horizontal scrolling on non-expanded elements
2021-10-07Rollup merge of #89596 - GuillaumeGomez:implicit-doc-cfg, r=jyn514Guillaume Gomez-10/+73
Make cfg imply doc(cfg) This is a reopening of #79341, rebased and modified a bit (we made a lot of refactoring in rustdoc's types so they needed to be reflected in this PR as well): * `hidden_cfg` is now in the `Cache` instead of `DocContext` because `cfg` information isn't stored anymore on `clean::Attributes` type but instead computed on-demand, so we need this information in later parts of rustdoc. * I removed the `bool_to_options` feature (which makes the code a bit simpler to read for `SingleExt` trait implementation. * I updated the version for the feature. There is only one thing I couldn't figure out: [this comment](https://github.com/rust-lang/rust/pull/79341#discussion_r561855624) > I think I'll likely scrap the whole `SingleExt` extension trait as the diagnostics for 0 and >1 items should be different. How/why should they differ? EDIT: this part has been solved, the current code was fine, just needed a little simplification. cc `@Nemo157` r? `@jyn514` Original PR description: This is only active when the `doc_cfg` feature is active. The implicit cfg can be overridden via `#[doc(cfg(...))]`, so e.g. to hide a `#[cfg]` you can use something like: ```rust #[cfg(unix)] #[doc(cfg(all()))] pub struct Unix; ``` By adding `#![doc(cfg_hide(foobar))]` to the crate attributes the cfg `#[cfg(foobar)]` (and _only_ that _exact_ cfg) will not be implicitly treated as a `doc(cfg)` to render a message in the documentation.
2021-10-06Update to latest rustc and rustdoc stylesWill Crichton-8/+9
2021-10-06Unversioned -> InvocationSpecificWill Crichton-1/+1
2021-10-06Fix lint error, change scrape-examples.js minify callWill Crichton-2/+9
2021-10-06Move JS into a standalone fileWill Crichton-115/+124
2021-10-06Change serialized format to use DefPathHash instead of custom StringWill Crichton-39/+24
Move test to rustdoc-ui Fix test writing to wrong directory Formatting Fix test Add FIXME Remove raw multiline strings
2021-10-06Add target crates as inputs to reduce size of intermediatesWill Crichton-31/+93
Add tests for module-path remapping and scrape example options Find all crates with a given name
2021-10-06Incorporate jyn's feedbackWill Crichton-132/+183
* Move call location logic from function constructor to rendering * Fix issue with macro spans in scraping examples * Clean up example loading logic Documentation / newtype for DecorationInfo Fix line number display Serialize edition of call site, other small cleanup
2021-10-06Add styles for non-white themesWill Crichton-15/+61
Tweak colors Tabs New link heading style
2021-10-06Reduce blur size, fix example width bug, add better error handling for I/O ↵Will Crichton-29/+68
issues Remove repository url Fix formatting Fix file_span in print_src Formatting
2021-10-06Move highlighting logic from JS to RustWill Crichton-187/+189
Continue migrating JS functionality Cleanup Fix compile error Clean up the diff Set toggle font to sans-serif
2021-10-06Sort examples by sizeWill Crichton-61/+158
Improve styling Start to clean up code, add comments