about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2019-02-01Fix image link in the settings menuGuillaume Gomez-14/+34
2019-01-31Add missing generation for test and proc_macro, remove old macro redirectionGuillaume Gomez-9/+0
2019-01-31rustdoc: wrap stability tags in colored spansAndy Russell-12/+16
2019-01-28Rollup merge of #57859 - GuillaumeGomez:fix-background, r=QuietMisdreavusMazdak Farrokhzad-8/+0
Fix invalid background color As discussed in #57814. r? @QuietMisdreavus
2019-01-28rustdoc: remove blank unstable spansAndy Russell-4/+0
2019-01-27Add generate-old-style-files option to rustdocGuillaume Gomez-1/+26
2019-01-27Remove rustdoc old style files generationGuillaume Gomez-21/+1
2019-01-25Update minifier versionGuillaume Gomez-2/+3
2019-01-23Fix invalid background colorGuillaume Gomez-8/+0
2019-01-22Rollup merge of #57552 - GuillaumeGomez:default-images, r=QuietMisdreavusMazdak Farrokhzad-4/+20
Default images Add default rust logo (the image at the top of the sidebar) and default favicon. No more missing image or inexistent icon on the documentation tabs! r? @QuietMisdreavus
2019-01-20Add default favicon for documentationGuillaume Gomez-3/+9
2019-01-20Auto merge of #56884 - euclio:codeblock-diagnostics, r=QuietMisdreavusbors-37/+164
rustdoc: overhaul code block lexing errors Fixes #53919. This PR moves the reporting of code block lexing errors from rendering time to an early pass, so we can use the compiler's error reporting mechanisms. This dramatically improves the diagnostics in this situation: we now de-emphasize the lexing errors as a note under a warning that has a span and suggestion instead of just emitting errors at the top level. Additionally, this PR generalizes the markdown -> source span calculation function, which should allow other rustdoc warnings to use better spans in the future. Last, the PR makes sure that the code block is always emitted in the docs, even if it fails to highlight correctly. Of note: - The new pass unfortunately adds another pass over the docs to gather the doc blocks for syntax-checking. I wonder if this could be combined with the pass that looks for testable blocks? I'm not familiar with that code, so I don't know how feasible that is. - `pulldown_cmark` doesn't make it easy to find the spans of the code blocks, so the code that calculates the spans is a little nasty. It works for all the test cases I threw at it, but I wouldn't be surprised if an edge case would break it. Should have a thorough review. - This PR worsens the state of #56885, since those certain fatal lexing errors are now emitted before docs get generated at all.
2019-01-20Add default rust logo for documentationGuillaume Gomez-1/+11
2019-01-20Auto merge of #57651 - JohnTitor:give-char-type, r=estebankbors-1/+1
Implement new literal type `Err` Fixes #57384 I removed `return Ok`, otherwise, two errors occur. Any solutions? r? @estebank
2019-01-19Rollup merge of #57476 - Xanewok:bye-crate-analysis, r=ZoxcMazdak Farrokhzad-1/+1
Move glob map use to query and get rid of CrateAnalysis ~Also includes commits from ~https://github.com/rust-lang/rust/pull/57392~ and ~https://github.com/rust-lang/rust/pull/57436~.~ With glob map calculated unconditionally in https://github.com/rust-lang/rust/pull/57392, this PR moves the calculated glob map to `GlobalCtxt` and exposes a relevant query (as we do with other queries which copy precomputed data over from the `Resolver`). This allows us to get rid of the `CrateAnalysis` struct in an attempt to simplify the compiler interface. cc @Zoxc r? @nikomatsakis @Zoxc @petrochenkov
2019-01-18Rollup merge of #57710 - GuillaumeGomez:non-clickable, r=QuietMisdreavusMazdak Farrokhzad-4/+0
Fix non-clickable urls Fixes #57695 I didn't find anywhere where this rule was useful. Why did you add it @JohnHeitmann? r? @QuietMisdreavus
2019-01-18Rollup merge of #57646 - GuillaumeGomez:fix-css, r=QuietMisdreavusMazdak Farrokhzad-14/+2
Fixes text becoming invisible when element targetted Fixes #57628. r? @QuietMisdreavus
2019-01-18Rollup merge of #57636 - GuillaumeGomez:fix-sources-sidebar, r=QuietMisdreavusMazdak Farrokhzad-3/+1
Fix sources sidebar not showing up Fixes #57601. The order of imports made it so that the sidebar creation was called before the sidebar sources were created. Like this, when the sources are loaded, they create the sidebar as expected. r? @QuietMisdreavus
2019-01-17Fix non-clickable urlsGuillaume Gomez-4/+0
2019-01-18Add token::ErrYuki Okushi-1/+1
2019-01-17Querify glob map usage (last use of CrateAnalysis)Igor Matuszewski-1/+1
2019-01-17End fixing search index minificationGuillaume Gomez-24/+94
2019-01-17Minify search-index in one passGuillaume Gomez-5/+5
2019-01-17Reduce search-index.js sizeGuillaume Gomez-1/+4
2019-01-15Fixes text becoming invisible when element targettedGuillaume Gomez-14/+2
2019-01-15Fix sources sidebar not showing upGuillaume Gomez-3/+1
2019-01-15Rollup merge of #57614 - GuillaumeGomez:fix-crate-filtering, r=QuietMisdreavusMazdak Farrokhzad-1/+1
[rustdoc] Fix crates filtering box not being filled Currently, the filter crate box (at the left of the search input) is always empty. To get the number of keys of dictionary in JS, you need to call `Object.keys()` on it. r? @QuietMisdreavus
2019-01-14rustdoc: check code block syntax in early passAndy Russell-37/+164
2019-01-15Fix crates filtering box not being filledGuillaume Gomez-1/+1
2019-01-13Rollup merge of #56874 - JohnHeitmann:docs-spacing, r=GuillaumeGomezMazdak Farrokhzad-66/+68
Simplify foreign type rendering. Simplified foreign type rendering by switching from tables to flexbox. Also, removed some seemingly extraneous elements like “ghost” spans. Reduces element count on the `std::iter::Iterator` page by 30%. On my laptop it drops Iterator page load time from ~15s to ~10s. Frame times during scrolling are a hair lower too. Known visual changes (happy to tweak based on feedback): * The main `impl ...` headers are now getting the default, larger, h3 font size. This was an accident, but I liked how it turned out so I didn't fix it. * There's a hair less vertical spacing between the end of a where block and the start of the next fn. Now, all spacing is consistent. I think this looks a bit worse. I may tweak vertical spacing more here or in a follow-up that cleans up vertical spacing more broadly. * "[src]" links are all sized at 17px. A few were 19px in the original. I haven't yet done heavy cross-browser or cross-crate testing. I was hoping to get a quick thumbs up or thumbs down here at this first draft, then if this is on the right track I'll spend some time on that testing. TODO: - [x] Test on Chrome - [x] Test on Firefox - [ ] ~~Test on UC Android~~ - [x] Test on Edge - [x] Test on iOS safari - [x] Test on desktop safari - [x] Update automated tests - [x] Increase vertical margin - [x] Fix "Important traits for" hover overlap - [x] Wait for #55798 to land & merge it
2019-01-10Re-enable history api on file:// protocolGuillaume Gomez-2/+1
2019-01-07Update static files code for updated Source Serif Pro fontTrevor Spiteri-19/+12
2019-01-07Replace Heuristica with Source Serif Pro italic in rustdoc.cssTrevor Spiteri-5/+4
2019-01-07Source Serif Pro regular and bold 2.007, and italic 1.007Trevor Spiteri-117/+2
Use fonts from the Roman 2.007 and Italic 1.007 version at: https://github.com/adobe-fonts/source-serif-pro/releases/tag/2.007R-ro%2F1.007R-it The following files are used from the distribution: * WOFF/TTF/SourceSerifPro-Regular.ttf.woff * WOFF/TTF/SourceSerifPro-Bold.ttf.woff * WOFF/TTF/SourceSerifPro-It.ttf.woff These replace the older Source Serif Pro regular and bold fonts, and the Heuristica italic font.
2018-12-29Rollup merge of #57163 - JohnHeitmann:chevron-fix, r=estebankkennytm-1/+1
Give the crate select chevron room to breathe. Before: ![screen shot 2018-12-27 at 10 26 10 pm](https://user-images.githubusercontent.com/4282480/50505100-9ff24300-0a26-11e9-9b74-37bdee6faf83.png) After: ![screen shot 2018-12-27 at 10 25 57 pm](https://user-images.githubusercontent.com/4282480/50505110-a54f8d80-0a26-11e9-9fa2-7fed21773207.png)
2018-12-29Auto merge of #57006 - GuillaumeGomez:no-crate-filter, r=QuietMisdreavusbors-19/+52
Add no-crate filter option on rustdoc @onur asked me about it so here it is! r? @QuietMisdreavus
2018-12-27Give the crate select chevron room to breathe.John Heitmann-1/+1
2018-12-27Simplify foreign type rendering.John Heitmann-66/+68
Simplified foreign type rendering by switching from tables to flexbox. Also, removed some seemingly extraneous elements like “ghost” spans. Reduces element count on std::iter::Iterator by 30%.
2018-12-25Remove licensesMark Rousskov-199/+1
2018-12-25Auto merge of #56962 - nivkner:fixme_fixup4, r=pnkfelixbors-7/+5
address some FIXME whose associated issues were marked as closed part of #44366
2018-12-24Add no-crate filter option on rustdocGuillaume Gomez-19/+52
2018-12-23Rollup merge of #57011 - QuietMisdreavus:static-root-path, r=GuillaumeGomezkennytm-22/+55
rustdoc: add new CLI flag to load static files from a different location This PR adds a new CLI flag to rustdoc, `--static-root-path`, which controls how rustdoc links pages to the CSS/JS/font static files bundled with the output. By default, these files are linked with a series of `../` which is calculated per-page to link it to the documentation root - i.e. a relative link to the directory given by `-o`. This is causing problems for docs.rs, because even though docs.rs has saved one copy of these files and is dispatching them dynamically, browsers have no way of knowing that these are the same files and can cache them. This can allow it to link these files as, for example, `/rustdoc.css` instead of `../../rustdoc.css`, creating a single location that the files are loaded from. I made sure to only change links for the *static* files, those that don't change between crates. Files like the search index, aliases, the source files listing, etc, are still linked with relative links. r? @GuillaumeGomez cc @onur
2018-12-23Rollup merge of #56967 - GuillaumeGomez:regen-search-index, r=QuietMisdreavuskennytm-2/+2
Replace current crate's searchIndex when regenerating Fixes #56921. r? @QuietMisdreavus
2018-12-22Auto merge of #56824 - euclio:internal-apis, r=QuietMisdreavusbors-96/+116
rustdoc: display rustc_private APIs as "Internal" This PR updates the display of `rustc_private` APIs to be "Internal" instead of "Experimental", and changes the colors appropriately. It also updates the copy of the `rustc_private` feature to sound more informative and less like a compiler suggestion. The PR additionally contains a significant refactor of the `short_stability` function to remove duplication and fix a few rendering bugs due to extra or missing spaces. Before: ![screen shot 2018-12-14 at 11 45 28 am](https://user-images.githubusercontent.com/1372438/50015926-c9768d80-ff95-11e8-9649-5df29df6909b.png) After: ![screen shot 2018-12-14 at 11 45 11 am](https://user-images.githubusercontent.com/1372438/50015934-cf6c6e80-ff95-11e8-912b-74b893f55425.png)
2018-12-21Auto merge of #55798 - GuillaumeGomez:version-display-associated-const, ↵bors-31/+51
r=QuietMisdreavus Add version display for associated consts Fixes #54030. <img width="1440" alt="screenshot 2018-11-08 at 23 57 29" src="https://user-images.githubusercontent.com/3050060/48232648-99decf00-e3b2-11e8-9f41-6bd12a161c7d.png"> r? @QuietMisdreavus
2018-12-20display rustc_private APIs as "Internal"Andy Russell-8/+42
2018-12-20split extra_scripts to handle root_path shenanigansQuietMisdreavus-10/+23
2018-12-20new --static-root-path flag for controlling static file locationsQuietMisdreavus-14/+34
2018-12-19FIXME(9639) remove fixme and accept non-utf8 paths in librustdocNiv Kaminer-7/+5
2018-12-19Replace current crate's searchIndex when regeneratingGuillaume Gomez-2/+2