about summary refs log tree commit diff
path: root/src/librustdoc/html/render
AgeCommit message (Collapse)AuthorLines
2022-05-31rustdoc: also index impl traitMichael Howell-6/+24
2022-05-31Display empty impl blocks if they have documentationsGuillaume Gomez-0/+7
2022-05-30Auto merge of #97489 - GuillaumeGomez:settings-js-disabled, r=notriddlebors-0/+5
Add sentence in case JS is disabled on settings.html page Instead of having an empty page, it'll look like this: ![Screenshot from 2022-05-28 17-46-23](https://user-images.githubusercontent.com/3050060/170833333-e1a59c2b-27ca-47da-9c08-2356e4a689cb.png) r? `@notriddle`
2022-05-29Fix order of closing HTML elements in rustdoc outputJan-Erik Rediger-1/+1
2022-05-29Auto merge of #96652 - notriddle:notriddle/self, r=GuillaumeGomezbors-16/+55
rustdoc: include impl generics / self in search index Fixes #92205
2022-05-28Improve settings page display with disabled javascriptGuillaume Gomez-0/+5
2022-05-27Pass Context as a &mut to allow to remove RefCell fieldsGuillaume Gomez-100/+112
2022-05-27cleanup librustdoc by making parent stack store itemsMichael Howell-15/+2
2022-05-26rustdoc: factor orphan impl items into an actual structMichael Howell-5/+7
2022-05-25rustdoc: include impl generics / self in search indexMichael Howell-13/+63
2022-05-24fix clippy perf lintsklensy-3/+5
2022-05-24fix simple clippy lintsklensy-10/+10
2022-05-23Auto merge of #94053 - GuillaumeGomez:fields-stripped, r=notriddlebors-11/+11
rustdoc: Remove fields_stripped fields (and equivalents) Fixes #90588. r? `@camelid`
2022-05-22Auto merge of #97177 - oli-obk:const-stability, r=davidtwcobors-4/+1
Implement proper stability check for const impl Trait, fall back to unstable const when undeclared Continuation of #93960 `@jhpratt` it looks to me like the test was simply not testing for the failure you were looking for? Your checks actually do the right thing for const traits?
2022-05-21Remove fields_stripped fields (and equivalents)Guillaume Gomez-11/+11
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-53/+57
2022-05-19Add and use stability helper methodsJacob Pratt-4/+1
This avoids an ambiguity (when reading) where `.level.is_stable()` is not immediately clear whether it is general stability or const stability.
2022-05-18Move some DOM generation into the HTML settings file directlyGuillaume Gomez-3/+13
2022-05-17rustdoc: make search.js a moduleJacob Hoffman-Andrews-1/+7
Previously, search.js relied on the DOM and the `window` object. It can now be loaded in the absence of the DOM, for instance by Node. The same is true of search-index.js. This allows removing a lot of code from src/tools/rustdoc-js/tester.js that tried to parse search.js and extract specific functions that were needed for testing.
2022-05-14Remove theme picker buttonGuillaume Gomez-1/+0
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