summary refs log tree commit diff
path: root/src/librustdoc/html/render
AgeCommit message (Collapse)AuthorLines
2022-05-12rustdoc: remove weird, unused variable from source-files.jsMichael Howell-1/+1
2022-05-12Auto merge of #96974 - matthiaskrgr:rollup-jd4otnc, r=matthiaskrgrbors-3/+5
Rollup of 5 pull requests Successful merges: - #95896 (Note the contacts for the nvptx64 target(s)) - #96860 (openbsd: convert futex timeout managment to Timespec usage) - #96939 (Fix settings page CSS) - #96941 (update graphviz links) - #96968 (Add tests for #96806) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-11Add missing CSS file for settings pageGuillaume Gomez-3/+5
2022-05-10update rustdoclcnr-1/+1
2022-05-09Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errorsbors-2/+2
Remove `#[rustc_deprecated]` This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`. I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
2022-05-07Rollup merge of #96636 - GuillaumeGomez:fix-jump-to-def-regression, r=notriddleGuillaume Gomez-3/+1
Fix jump to def regression https://github.com/rust-lang/rust/pull/93803 introduced a regression in the "jump to def" feature. This fixes it. Nice side-effect: it adds a new regression test. :) I also used this opportunity to add documentation about this unstable feature in the rustdoc book. cc ``@cjgillot`` r? ``@notriddle``
2022-05-06Remove unneeded SpanMapVisitor::visit_generics functionGuillaume Gomez-13/+1
2022-05-06Rollup merge of #96754 - notriddle:notriddle/impl-dups, r=GuillaumeGomezGuillaume Gomez-15/+96
rustdoc: ensure HTML/JS side implementors don't have dups Fixes #94641 Rendered: - https://notriddle.com/notriddle-rustdoc-test/impl-dups/std/iter/trait.Iterator.html - https://notriddle.com/notriddle-rustdoc-test/impl-dups/core/iter/trait.Iterator.html
2022-05-06Fix reexports missing from the search indexGuillaume Gomez-2/+16
2022-05-05rustdoc: ensure HTML/JS side implementors don't have dupsMichael Howell-15/+96
2022-05-03Rollup merge of #93097 - GuillaumeGomez:settings-js, r=jshaYuki Okushi-141/+10
Switch settings menu to full js Since the settings can only be set when the JS is enabled, it's not really a problem. It also fixes a debate we had around the themes not being accessible easily before. ![Screenshot from 2022-01-19 23-06-59](https://user-images.githubusercontent.com/3050060/150221936-fd1a1e76-06b6-4416-a653-dbae111979ed.png) You can test it [here](https://rustdoc.crud.net/imperio/settings-js/doc/foo/index.html). r? ``@jsha``
2022-05-02Fix regression in link-to-definition introduced in #93803Guillaume Gomez-2/+12
2022-04-30Store all generic bounds as where predicates.Camille GILLOT-11/+2
2022-04-30Move settings into full JSGuillaume Gomez-141/+10
2022-04-21Remove .woff font filesGuillaume Gomez-18/+9
2022-04-16Rollup merge of #96118 - GuillaumeGomez:cleanup-def-id-item-id, r=notriddleDylan DPC-39/+39
rustdoc: Rename `def_id` into `item_id` when the type is `ItemId` for readability As `@notriddle` mentioned in https://github.com/rust-lang/rust/pull/96091, the field name is inaccurate. This PR fixes it by renaming it accordingly to its real type. r? `@notriddle`
2022-04-16Rename `def_id` into `item_id` when the type is `ItemId` for readabilityGuillaume Gomez-39/+39
2022-04-15Rollup merge of #95194 - kckeiks:update-algo-in-find-use-placement, r=pnkfelixDylan DPC-2/+5
remove find_use_placement A more robust solution to finding where to place use suggestions was added in #94584. The algorithm uses the AST to find the span for the suggestion so we pass this span down to the HIR during lowering and use it instead of calling `find_use_placement` Fixes #94941
2022-04-14Error on `#[rustc_deprecated]`Jacob Pratt-2/+2
2022-04-13Rollup merge of #93217 - willcrichton:example-analyzer, r=GuillaumeGomezDylan DPC-3/+52
Improve Rustdoc UI for scraped examples with multiline arguments, fix overflow in line numbers This PR improves a few aspects of the scrape examples feature in Rustdoc. * Only function names and not the full call expression are highlighted. * For call-sites with multiline arguments, the minimized code viewer will scroll to the top of the call-site rather than the middle if the argument is larger than the viewer size, ensuring that the function name is visible. * This fixes an issue where the line numbers column had a visible x-scroll bar. r? `@GuillaumeGomez`
2022-04-12Add Rustdoc book link to scrape examples help. Remove remaining panicWill Crichton-3/+9
locations in scrape examples.
2022-04-12rustdoc: discr. required+provided assoc consts+tysLeón Orell Valerian Liehr-165/+242
2022-04-06Switch item-info div to span to generate valid HTMLGuillaume Gomez-3/+3
2022-04-06Rollup merge of #95684 - GuillaumeGomez:fix-item-info-overflow, r=notriddleDylan DPC-1/+1
rustdoc: Fix item info display overflow I came across this issue when reading local `Iterator` docs (reproduced in this screenshot): ![Screenshot from 2022-04-05 17-45-13](https://user-images.githubusercontent.com/3050060/161798150-769ee838-4768-4df8-9d34-b02eb8104eed.png) The problem comes from the fact that `span` isn't `display: block` by default. Since `item-info` was already present on `<div>` in other places, I moved the last one to `div` as well. r? `@notriddle`
2022-04-05Generate a <div> instead of a <span> for item-info elementsGuillaume Gomez-1/+1
2022-04-05Mark scalar layout unions so that backends that do not support partially ↵Oli Scherer-1/+1
initialized scalars can special case them.
2022-04-03Rollup merge of #95613 - GuillaumeGomez:fix-rustdoc-attr-display, r=notriddleDylan DPC-1/+6
Fix rustdoc attribute display Fixes #81482. r? `@notriddle`
2022-04-03Fix display of attributes in rustdocGuillaume Gomez-1/+6
2022-04-02Auto merge of #95568 - GuillaumeGomez:fix-invalid-dom-generation, r=notriddlebors-2/+2
Fix invalid DOM generation Fixes #64371. r? `@notriddle`
2022-04-01Fix invalid DOM generationGuillaume Gomez-2/+2
2022-04-01Rollup merge of #95475 - ↵Matthias Krüger-0/+1
Jules-Bertholet:rustdoc-hide-assoc-consts-from-trait-impls, r=jsha rustdoc: Only show associated consts from inherent impls in sidebar Resolves #95459
2022-03-31remove find_use_placementFausto-2/+5
A more robust solution to finding where to place use suggestions was added. The algorithm uses the AST to find the span for the suggestion so we pass this span down to the HIR during lowering and use it. Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-03-30Remove unneeded `to_string` callGuillaume Gomez-1/+1
2022-03-30Only show associated consts from inherent impls in sidebarJules Bertholet-0/+1
2022-03-29Auto merge of #95096 - GuillaumeGomez:rm-header-fn-field, r=camelidbors-14/+15
Remove header field from clean::Function Fixes https://github.com/rust-lang/rust/issues/89673. This is another take on https://github.com/rust-lang/rust/issues/89673 (compared to https://github.com/rust-lang/rust/pull/91217) but very different on the approach: I moved the header call in one place but still require to have the `clean::Item` so I can use the `DefId` to get what is missing. cc `@jyn514` (you reviewed the original so maybe you want to take a look?) r? `@camelid`
2022-03-29Remove header field from clean::FunctionGuillaume Gomez-14/+15
2022-03-27Add scrape examples help pageWill Crichton-5/+43
2022-03-27Fix markdown issue, remove hard-coded rust-lang.org urlWill Crichton-1/+3
2022-03-27Improve alignment of additional scraped examples, add scrape examples help pageWill Crichton-0/+2
2022-03-27Only highlight identifier in scraped examples, not argumentsWill Crichton-29/+4
2022-03-27Improve Rustdoc UI for scraped examples with multiline arguments, fixWill Crichton-3/+29
overflow in line numbers
2022-03-21fix: add a space only in front of 🔒Maximilian Köhl-2/+2
2022-03-21move the 🔒 after the nameMaximilian Köhl-1/+1
2022-03-19apply rustfmtMaximilian Köhl-2/+4
2022-03-19rustdoc: add 🔒 to indicate restricted visibilityMaximilian Köhl-3/+10
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-1/+1
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-14Auto merge of #94139 - est31:let_else_rustdoc, r=notriddlebors-14/+4
librustdoc: adopt let else in more places Continuation of #89933, #91018, #91481, #93046, #93590, #94011. I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles librustdoc.
2022-03-12Auto merge of #94733 - nnethercote:fix-AdtDef-interning, r=fee1-deadbors-1/+1
Improve `AdtDef` interning. This commit makes `AdtDef` use `Interned`. Much of the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`. r? `@fee1-dead`
2022-03-11Collapse Blanket Implementations and Auto-trait implementations by defaultGuillaume Gomez-5/+11
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-1/+1
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.