about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2021-07-21rustdoc: Restore --default-theme, etc, by restoring varname escapingIan Jackson-0/+2
In #86157 cd0f93193c84ddc6698f9b65909da71c084dcb74 Use Tera templates for rustdoc. dropped the following transformation from the keys of the default settings element's `data-` attribute names: .map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v))) The `Escape` part is indeed no longer needed, because Tera does that for us. But the massaging of `-` to `_` is needed, for the (bizarre) reasons explained in the new comments. I have tested that the default theme function works again for me. I have also verified that passing --default-theme="zork&" escapes the value in the HTML. Closes #87263. CC: Jacob Hoffman-Andrews <github@hoffman-andrews.com> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-07-21Rollup merge of #87024 - weihanglo:issue-85494, r=ManishearthEric Huss-12/+34
rustdoc: show count of item contents when hidden Resolves #85494
2021-07-21Rollup merge of #87230 - GuillaumeGomez:docblock-table-overflow, r=notriddleGuillaume Gomez-4/+5
Fix docblock <table> overflow Before: ![Screenshot from 2021-07-18 00-05-23](https://user-images.githubusercontent.com/3050060/126050272-ce08bc5f-74ff-4135-bc12-d708d87470cc.png) After: ![Screenshot from 2021-07-18 00-03-55](https://user-images.githubusercontent.com/3050060/126050273-42f41b4d-ad57-4a87-91de-18e63f8504ec.png) cc `@SergioBenitez` r? `@notriddle`
2021-07-19Rollup merge of #87251 - GuillaumeGomez:item-info-width, r=notriddleGuillaume Gomez-0/+3
Fix "item info" width Fixes #87202. It now looks again like this: ![Screenshot from 2021-07-18 12-33-27](https://user-images.githubusercontent.com/3050060/126064005-013acabc-7f17-4436-8dfc-cb6b9bc24413.png) cc `@jyn514` r? `@notriddle`
2021-07-18Fix item info displayGuillaume Gomez-0/+3
2021-07-18Fix <table> overflow in doc blocksGuillaume Gomez-4/+5
2021-07-17Remove redundant CSSMichael Howell-1/+0
2021-07-17Rustdoc accessibility: make the sidebar headers actual headersMichael Howell-29/+34
Part of #87059 Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
2021-07-16Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, ↵Guillaume Gomez-1/+2
r=GuillaumeGomez feat(rustdoc): open sidebar menu when links inside it are focused Fixes #87172 Based on #87167 (which should be merged first) r? ``@GuillaumeGomez`` Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
2021-07-16feat(rustdoc): open sidebar menu when links inside it are focusedMichael Howell-1/+2
Fixes #87172 Based on #87167 (which should be merged first) Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
2021-07-16Auto merge of #87182 - GuillaumeGomez:rollup-whwohua, r=GuillaumeGomezbors-4/+9
Rollup of 7 pull requests Successful merges: - #86983 (Add or improve natvis definitions for common standard library types) - #87069 (ExprUseVisitor: Treat ByValue use of Copy types as ImmBorrow) - #87138 (Correct invariant documentation for `steps_between`) - #87145 (Make --cap-lints and related options leave crate hash alone) - #87161 (RFC2229: Use the correct place type) - #87162 (Fix type decl layout "overflow") - #87167 (Fix sidebar display on small devices) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-16Rollup merge of #87167 - GuillaumeGomez:sidebar-display-mobile, r=notriddleGuillaume Gomez-4/+6
Fix sidebar display on small devices Part of #87059. Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users. Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html). r? `@notriddle`
2021-07-16Rollup merge of #87162 - GuillaumeGomez:type-decl-overflow, r=notriddleGuillaume Gomez-0/+3
Fix type decl layout "overflow" Before: ![Screenshot from 2021-07-15 17-56-12](https://user-images.githubusercontent.com/3050060/125822644-c4595211-d75e-4dd7-ba44-183197ee836c.png) After: ![Screenshot from 2021-07-15 17-56-17](https://user-images.githubusercontent.com/3050060/125822648-7b363847-e153-4ff3-9fba-59478e32eced.png) cc ```@SergioBenitez``` r? ```@notriddle```
2021-07-16Auto merge of #86662 - mockersf:fix-86620-link-unknown-location, r=jyn514bors-30/+48
fix dead link for method in trait of blanket impl from third party crate fix #86620 * changes `href` method to raise the actual error it had instead of an `Option` * set the href link correctly in case of an error I did not manage to make a small reproducer, I think it happens in a situation where * crate A expose a trait with a blanket impl * crate B use the trait from crate A * crate C use types from crate B * building docs for crate C without dependencies r? `@jyn514`
2021-07-16Copy item path rather than full `use` statement.moxian-4/+3
2021-07-15Do not hide the sidebar on mobile, move it outside of the viewport insteadGuillaume Gomez-4/+6
2021-07-15Fix layout overflow in type declarationGuillaume Gomez-0/+3
2021-07-15Fix misuse of rev attribute on <a> tagGuillaume Gomez-2/+1
2021-07-14Rollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddleGuillaume Gomez-1/+1
Fix Ayu theme <code> color Fixes #87072 (the second regression). r? `@notriddle`
2021-07-14Rollup merge of #87056 - GuillaumeGomez:fix-codeblocks-overflow, r=notriddleGuillaume Gomez-19/+34
Fix codeblocks overflow Fixes #87043. Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes. r? `@Nemo157`
2021-07-14Fix color for <code> which are not in doc blocksGuillaume Gomez-1/+1
2021-07-14Fix display for non-rust code blocksGuillaume Gomez-19/+34
2021-07-13Fix color for keyword/primitive search resultGuillaume Gomez-3/+3
2021-07-13Fix search result description text color for ayu themeGuillaume Gomez-1/+1
2021-07-13Rollup merge of #87035 - GuillaumeGomez:fix-implementors-display, r=notriddleYuki Okushi-4/+14
Fix implementors display Part of https://github.com/rust-lang/rust/issues/86632. This PR does a few things: * It fixes of the JS rendered implementors. * It generates anchors for JS rendered implementors to make it coherent with the others. * It adds a test to ensure that we won't have the same issue again. * It changes the way we render the rustdoc-gui crates to simplify it a bit and also to allow to have dependencies without going through compiletest. Before: ![Screenshot from 2021-07-10 13-30-13](https://user-images.githubusercontent.com/3050060/125174172-b4048700-e1c3-11eb-8f0e-c46081371d4f.png) After: ![Screenshot from 2021-07-10 21-11-15](https://user-images.githubusercontent.com/3050060/125174173-b49d1d80-e1c3-11eb-8740-1dbbff70c2eb.png) I plan to add the `[src]` links in another PR because this one is already big enough. cc `@Mark-Simulacrum` (for the bootstrap changes) r? `@Nemo157`
2021-07-12Auto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremeebors-2/+11
Fix rendering of reexported macros 2.0 and fix visibility of reexported items So, this PR grew a bit out of focus, it does the following things: * Fixes #86276. * Fixes visibility display for reexported items: it now takes the visibility of the "use" statement rather than the visibility of the reexported item itself). * Fixes the display of reexported items if "--document-private-items" option is used. Before, they were simply skipped. * Fixes inconsistency on typedef items: they didn't display their visibility contrary to other items. I added tests to check everything listed above. cc `@camelid` `@ollie27` (in case one of you want to review?) r? `@jyn514`
2021-07-11rustdoc: show count of item contents when hiddenWeihang Lo-12/+34
2021-07-11comment about link without a hrefFrançois Mockers-0/+1
2021-07-10cleanup(rustdoc): remove unused function getObjectNameByIdMichael Howell-15/+8
This function was used in an earlier version, when idx's were used to serialize function inputs and outputs. That's not done any more, so removed the JS-side support for it.
2021-07-10Fix display for external trait implementorsGuillaume Gomez-4/+14
2021-07-08Rollup merge of #86903 - GuillaumeGomez:small-header-display, r=Nemo157Guillaume Gomez-6/+1
Fix small headers display You can see it on the `IoSlice` or on the `ErrorKind` pages. Before: ![Screenshot from 2021-07-06 15-26-33](https://user-images.githubusercontent.com/3050060/124610344-b50a8100-de70-11eb-8ab4-ac5de8adf18f.png) ![Screenshot from 2021-07-08 17-51-43](https://user-images.githubusercontent.com/3050060/124953436-7235de00-e015-11eb-9f99-b361c7eb41a9.png) After: ![Screenshot from 2021-07-08 17-48-42](https://user-images.githubusercontent.com/3050060/124953042-12d7ce00-e015-11eb-8132-1ae4552dd969.png) ![Screenshot from 2021-07-08 17-48-47](https://user-images.githubusercontent.com/3050060/124953052-13706480-e015-11eb-89f8-dab96c2f0f63.png) r? `@Nemo157`
2021-07-08Fix display of small-section-header elementsGuillaume Gomez-6/+1
2021-07-08Rework SESSION_GLOBALS API to prevent overwriting itGuillaume Gomez-3/+3
2021-07-07Clean up rustdoc static filesGuillaume Gomez-41/+42
2021-07-07Fix inconsistency on visibility display for typedefsGuillaume Gomez-2/+11
2021-07-07Rollup merge of #86819 - GuillaumeGomez:cleanup-rustdoc-ids, r=jyn514Yuki Okushi-4/+11
Clean up rustdoc IDs I cherry-picked the commit from https://github.com/rust-lang/rust/pull/86178. It adds missing rustdoc IDs (for the HTML) and remove unused ones. cc `@camelid` r? `@jyn514`
2021-07-06only remove link for TyMethodFrançois Mockers-4/+4
2021-07-06review - better error names/docFrançois Mockers-8/+9
2021-07-06fix dead link for method in trait of blanket impl from third party crateFrançois Mockers-30/+46
2021-07-05Revert "rustdoc: Store DefId's in ItemId on heap for decreasing Item's size"Justus K-33/+24
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
2021-07-05rustdoc: Store DefId's in ItemId on heap for decreasing Item's sizeJustus K-24/+33
2021-07-05rustdoc: Rename `expect_real` to `expect_def_id`, remove `Item::is_fake`Justus K-19/+19
2021-07-05rustdoc: Replace `FakeDefId` with new `ItemId` typeJustus K-4/+4
2021-07-05Auto merge of #86663 - fee1-dead:use-rustdoc-css, r=GuillaumeGomezbors-3/+2
Use rustdoc.css for error index Closes #86512.
2021-07-04Clean up rustdoc IDsGuillaume Gomez-4/+11
2021-07-01fix(rustdoc): generics searchMichael Howell-19/+88
This commit adds a test case for generics, re-adds generics data to the search index, and tweaks function indexing to use less space in JSON. This reverts commit 14ca89446c076bcf484d3d05bd991a4b7985a409.
2021-07-01Rollup merge of #86746 - GuillaumeGomez:query-type-filter, r=notriddleYuki Okushi-1/+2
Fix rustdoc query type filter I realized while reviewing #86659 that the type filter was broken on search so I'd prefer it to get merged before merging #86659. r? `@notriddle`
2021-06-30Enforce search typed queriesGuillaume Gomez-1/+2
2021-06-30Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157bors-3/+9
Fix boldness (put it back where needed) I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
2021-06-30Fix some style regressions due to normalize.css 8Yuki Okushi-2/+23