summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2019-06-06upgrade rustdoc's `pulldown-cmark` to 0.5.2Andy Russell-5/+5
Fixes #60482.
2019-05-20Rollup merge of #60487 - GuillaumeGomez:fix-search-sidebar-width-colors, ↵Mazdak Farrokhzad-9/+10
r=Dylan-DPC Fix search sidebar width when no crate select is present Fixes #60480. I also fixed the box-shadow that seemed to have been kind of removed? r? @QuietMisdreavus
2019-05-20Rollup merge of #60383 - ↵Mazdak Farrokhzad-207/+214
GuillaumeGomez:fix-position-source-code-files-toggle, r=Manishearth Fix position source code files toggle Fixes #60381. The second commit is a big cleanup of the media queries. r? @rust-lang/rustdoc cc @Manishearth screenshot of the fix: <img width="501" alt="Screenshot 2019-04-29 at 23 42 56" src="https://user-images.githubusercontent.com/3050060/56929111-112b2b00-6ad9-11e9-9a23-e0a8e3641395.png">
2019-05-19Auto merge of #60272 - Jakst:patch-1, r=Manishearthbors-5/+24
Explicitly set height on rust logo <img> element in docs The layout of the left side menu in docs reflows when navigating between pages because of missing height on the <img> element of rust logo. Setting height='100' tells the browser to reserve that vertical space, leading to a less janky experience.
2019-05-19Auto merge of #60065 - QuietMisdreavus:async-move-doctests, r=ollie27bors-36/+53
rustdoc: set the default edition when pre-parsing a doctest Fixes https://github.com/rust-lang/rust/issues/59313 (possibly more? i think we've had issues with parsing edition-specific syntax in doctests at some point) When handling a doctest, rustdoc needs to parse it beforehand, so that it can see whether it declares a `fn main` or `extern crate my_crate` explicitly. However, while doing this, rustdoc doesn't set the "default edition" used by the parser like the regular compilation runs do. This caused a problem when parsing a doctest with an `async move` block in it, since it was expecting the `move` keyword to start a closure, not a block. This PR changes the `rustdoc::test::make_test` function to set the parser's default edition while looking for a main function and `extern crate` statement. However, to do this, `make_test` needs to know what edition to set. Since this is also used during the HTML rendering process (to make playground URLs), now the HTML renderer needs to know about the default edition. Upshot: rendering standalone markdown files can now accept a "default edition" for their doctests with the `--edition` flag! (I'm pretty sure i waffled around how to set that a long time ago when we first added the `--edition` flag... `>_>`) I'm posting this before i stop for the night so that i can write this description while it's still in my head, but before this merges i want to make sure that (1) the `rustdoc-ui/failed-doctest-output` test still works (i expect it doesn't), and (2) i add a test with the sample from the linked issue.
2019-05-19Auto merge of #60760 - GuillaumeGomez:generic-display, r=varkor,badboybors-3/+1
Fix display of const generics in rustdoc <img width="745" alt="Screenshot 2019-05-18 at 15 45 22" src="https://user-images.githubusercontent.com/3050060/57970638-04854e80-7984-11e9-9f04-da6b51ec8bc7.png"> Part of #60737. cc @varkor r? @badboy
2019-05-19Rollup merge of #60931 - cuviper:array-iter, r=KodrAusMazdak Farrokhzad-1/+1
Use iter() for iterating arrays by slice These `into_iter()` calls will change from iterating references to values if we ever get `IntoIterator` for arrays, which may break the code using that iterator. Calling `iter()` is future proof.
2019-05-18Auto merge of #60093 - GuillaumeGomez:fix-attrs-pos, r=Manishearthbors-28/+49
Fix attrs pos Fixes #60042. Screenshot: <img width="438" alt="Screenshot 2019-05-12 at 15 02 25" src="https://user-images.githubusercontent.com/3050060/57582606-1455ec00-74c7-11e9-9d4e-5ec4da4de7dd.png"> r? @rust-lang/rustdoc
2019-05-18Fix display of const generics in rustdocGuillaume Gomez-3/+1
2019-05-17Use iter() for iterating arrays by sliceJosh Stone-1/+1
These `into_iter()` calls will change from iterating references to values if we ever get `IntoIterator` for arrays, which may break the code using that iterator. Calling `iter()` is future proof.
2019-05-14Add comment to explain what is the top parameterGuillaume Gomez-0/+8
2019-05-13Return a `Symbol` from `name_or_empty` functions.Nicholas Nethercote-17/+17
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-5/+6
2019-05-11Keep the original token in `ast::Lit`Vadim Petrochenkov-0/+2
2019-05-07Rollup merge of #60489 - GuillaumeGomez:remove-hamburger, r=QuietMisdreavusMazdak Farrokhzad-0/+4
Remove hamburger button from source code page Fixes #60483. Screenshot: <img width="575" alt="Screenshot 2019-05-03 at 00 12 51" src="https://user-images.githubusercontent.com/3050060/57110298-61ec8f00-6d38-11e9-85fd-d13be94b9c52.png"> cc @rust-lang/rustdoc
2019-05-06update rustdoc doc testQuietMisdreavus-1/+5
2019-05-06update rustdoc unit testsQuietMisdreavus-4/+7
2019-05-06set the default edition when pre-parsing a doctestQuietMisdreavus-31/+41
2019-05-03use span instead of div for since versionAndy Russell-2/+2
2019-05-03Remove hamburger button from source code pageGuillaume Gomez-0/+4
2019-05-02Fix search sidebar width when no crate select is presentGuillaume Gomez-9/+10
2019-04-30Rollup merge of #60382 - Manishearth:revert-code-font, r=GuillaumeGomezMazdak Farrokhzad-3/+3
Revert "Update Source Code Pro fonts to version 2.030" Temporary fix for https://github.com/rust-lang/rust/issues/60365 https://github.com/rust-lang/rust/pull/60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy. We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on. Till we figure that out, I'll just back this out. r? @GuillaumeGomez This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.
2019-04-30Cleanup media queriesGuillaume Gomez-184/+179
2019-04-30Improve file sidebar in source code view page on mobileGuillaume Gomez-33/+45
2019-04-29Revert "Update Source Code Pro fonts to version 2.030"Manish Goregaokar-3/+3
This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.
2019-04-29Fix line number display in source viewGuillaume Gomez-0/+4
2019-04-29Fix image position and displayGuillaume Gomez-10/+22
2019-04-29Wrap logo in container to prevent layout reflowJakob Ståhl-2/+9
2019-04-29Revert "Explicitly set height on rust logo <img> element in docs"Jakob Ståhl-2/+2
This reverts commit d79a01b72f4722611cb21b719e6243aad3e7ec3c.
2019-04-29Explicitly set height on rust logo <img> element in docsJakob Ståhl-2/+2
The layout of the left side menu in docs reflows when navigating between pages because of missing height on the <img> element of rust logo. Setting height='100' tells the browser to reserve that vertical space, leading to a less janky experience.
2019-04-28Fix default value for setting "Auto-hide item methods' documentation"Dmitry Murzin-1/+1
2019-04-26Make "Implementations on Foreign Types" items in sidebar link to specific implsDmitry Murzin-11/+19
2019-04-26Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasperbors-0/+2
Add a tidy check for files with over 3,000 lines Files with a large number of lines can cause issues in GitHub (e.g. https://github.com/rust-lang/rust/issues/60015) and also tend to be indicative of opportunities to refactor into less monolithic structures. This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in https://github.com/rust-lang/rust/issues/60015#issuecomment-483868594. (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with `// ignore-tidy-filelength`. Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in https://github.com/rust-lang/rust/issues/60015).
2019-04-26Rollup merge of #60134 - GuillaumeGomez:fix-index-page, r=ManishearthMazdak Farrokhzad-26/+11
Fix index-page generation Fixes #60096. The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons. r? @rust-lang/rustdoc
2019-04-26Rollup merge of #59734 - GuillaumeGomez:improve-rustdoc-failure, r=ollie27Mazdak Farrokhzad-3/+4
Prevent failure in case no space left on device in rustdoc Fixes #59703. r? @QuietMisdreavus
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+2
2019-04-25Improvement comment explanationsGuillaume Gomez-2/+5
2019-04-24Remove useless code and update index page testGuillaume Gomez-25/+2
2019-04-24Prevent failure in case no space left on device in rustdocGuillaume Gomez-3/+4
2019-04-24Rollup merge of #59822 - GuillaumeGomez:fix-dark-theme-css, r=ManishearthMazdak Farrokhzad-3/+3
Fix dark css rule Fixes #59817. r? @rust-lang/rustdoc
2019-04-23Fix index-page generationGuillaume Gomez-1/+6
2019-04-23Rollup merge of #60146 - Manishearth:font-update, r=QuietMisdreavusMazdak Farrokhzad-14/+9
Update fonts used by rustdoc Our version of Source Serif Pro is pretty old and is causing issues on Linux, see https://bugzilla.mozilla.org/show_bug.cgi?id=1545317 . I took this opportunity to update all of the fonts we use. r? @steveklabnik @QuietMisdreavus
2019-04-22upgrade rustdoc's pulldown-cmark to 0.4.1Andy Russell-80/+37
2019-04-20Update Fira Sans to version 4.202Manish Goregaokar-8/+3
From https://github.com/mozilla/Fira
2019-04-20Update Source Code Pro fonts to version 2.030Manish Goregaokar-3/+3
Pulled in from https://github.com/adobe-fonts/source-code-pro/
2019-04-20Update Source Serif Pro fonts to version 2.010Manish Goregaokar-3/+3
Pulled in from https://github.com/adobe-fonts/source-serif-pro/ See https://bugzilla.mozilla.org/show_bug.cgi?id=1545317
2019-04-18Fix items alignmentGuillaume Gomez-11/+19
2019-04-18Fixes attributes position in types declGuillaume Gomez-17/+22
2019-04-17Remove unwanted z-index changeGuillaume Gomez-1/+0
2019-04-16Fix dark css ruleGuillaume Gomez-3/+3