about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2021-07-15Remove refs from pat slicesCameron Steffen-11/+6
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 #87120 - jyn514:rustdoc-cleanup, r=CraftSpiderGuillaume Gomez-16/+12
rustdoc: Remove unnecessary `extern crate` aliases
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-13Remove useless alias from `rustc_span` to itselfJoshua Nelson-1/+1
2021-07-13Remove renaming of `test` crateJoshua Nelson-15/+11
This is leftover from when `doctest` used to be called `test`. Remove it now, it's unnecessary and makes the code harder to read.
2021-07-13Remove trival `impl Clean for CrateNum`Joshua Nelson-10/+4
2021-07-13Remove unnecessary CrateNum from Cache.externsJoshua Nelson-13/+12
It can be found from ExternalCrate.
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 #87078 - fee1-dead:rustdoc, r=jyn514Yuki Okushi-0/+6
Rustdoc: suggest removing disambiguator if linking to field This fixes #85615. `@rustbot` label T-rustdoc
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-13Rollup merge of #86887 - jyn514:cleanup-clean, r=CraftSpiderYuki Okushi-46/+1
rustdoc: remove dead code in `clean` Builds on https://github.com/rust-lang/rust/pull/86886 and should not be merged before.
2021-07-12Auto merge of #86841 - GuillaumeGomez:reexported-macro-2-render, r=Stupremeebors-56/+90
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-12suggest removing disambiguator if linking to fieldDeadbeef-0/+6
2021-07-12Rollup merge of #87037 - ↵Yuki Okushi-15/+8
notriddle:notriddle/search-cleanup-getobjectnamefromid, r=GuillaumeGomez cleanup(rustdoc): remove unused function getObjectNameById 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-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-10Change all instance of optflag added since the original change to optflagmulti.Zach Lute-4/+6
2021-07-10Change all 'optflag' arguments to 'optflagmulti'Zach Lute-15/+15
Because specifying these flags multiple times will never be discernibly different in functionality from specifying them a single time, there is no reason to fail and report an error to the user.
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-15/+15
2021-07-07Clean up rustdoc static filesGuillaume Gomez-43/+44
2021-07-07Only show restricted pub useGuillaume Gomez-1/+2
2021-07-07Fix inconsistency on visibility display for typedefsGuillaume Gomez-2/+11
2021-07-07Fix reexports visibilityGuillaume Gomez-33/+30
2021-07-07Unify macro source displayGuillaume Gomez-58/+48
2021-07-07Fix rendering of reexported macros 2.0Guillaume Gomez-9/+46
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-31/+47
2021-07-06Auto merge of #86644 - Stupremee:replace-fakedefids-with-itemid, r=jyn514bors-179/+188
rustdoc: Replace `FakeDefId` with new `ItemId` type Follow up from #84707 `@Manishearth` [suggested](https://github.com/rust-lang/rust/pull/84707#issuecomment-831994669) that there should be a new `ItemId` type that can distinguish between auto traits, normal ids, and blanket impls instead of using `FakeDefId`s. This type is introduced by this PR. There are still some `FIXME`s left, because I was unsure what the best solution for them would be. Especially the naming in general now is a bit weird right now and needs to be cleaned up. Now there are no "fake" ids so the `is_fake` method on `Item` does not really make sense and maybe the methods on `ItemId` should be renamed too? Also, we need to represent the new item ids in the JSON backend somehow.
2021-07-05rustdoc: Use `impl_id` and `for_` DefId's for Blanket item idJustus K-4/+4
2021-07-05rustdoc: Add `PrimitiveType` to `ItemId::Primitive`Justus K-8/+9
2021-07-05rustdoc: Convert new ItemId's to real Json IdsJustus K-3/+18
2021-07-05Revert "rustdoc: Store DefId's in ItemId on heap for decreasing Item's size"Justus K-115/+109
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
2021-07-05rustdoc: Store DefId's in ItemId on heap for decreasing Item's sizeJustus K-109/+115
2021-07-05rustdoc: Rename `expect_real` to `expect_def_id`, remove `Item::is_fake`Justus K-105/+103
2021-07-05rustdoc: Replace `FakeDefId` with new `ItemId` typeJustus K-86/+81
2021-07-05rustdoc: Remove unused Clean implsJoshua Nelson-46/+1
2021-07-05Remove `impl Clean for {Ident, Symbol}`Joshua Nelson-15/+1
These were only used once, in a place where it was trivial to replace. Also, it's unclear what 'clean' would mean for these, so it seems better to be explicit.