about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2022-12-29Auto merge of #106266 - matthiaskrgr:rollup-cxrdbzy, r=matthiaskrgrbors-7/+4
Rollup of 9 pull requests Successful merges: - #104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params) - #105899 (`./x doc library --open` opens `std`) - #106190 (Account for multiple multiline spans with empty padding) - #106202 (Trim more paths in obligation types) - #106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing) - #106236 (docs/test: add docs and a UI test for `E0514` and `E0519`) - #106259 (Update Clippy) - #106260 (Fix index out of bounds issues in rustdoc) - #106263 (Formatter should not try to format non-Rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-29Rollup merge of #106260 - chenyukang:yukang/fix-106213-doc, r=GuillaumeGomezMatthias Krüger-2/+1
Fix index out of bounds issues in rustdoc Fixes #106213 r? `@matthiaskrgr`
2022-12-29Fix index out of bounds issues in rustdocyukang-2/+1
2022-12-29Rollup merge of #106218 - GuillaumeGomez:migrate-css-var-scraped-examples, ↵Matthias Krüger-18/+13
r=notriddle Migrate css var scraped examples r? ``@notriddle``
2022-12-29Rollup merge of #106217 - notriddle:notriddle/tooltip-center, r=GuillaumeGomezMatthias Krüger-1/+0
rustdoc: remove unnecessary `.tooltip::after { text-align: center }` This doesn't have an effect, since these tooltip are only one line anyway.
2022-12-29Migrate more scraped examples CSS rules to CSS variablesGuillaume Gomez-24/+20
2022-12-28rustdoc: simplify settings, help, and copy button CSS by not reusingMichael Howell-5/+3
Since there remains only one common CSS rule shared between them, there's no point to it: the block and selector costs more than the single `width` rule saves.
2022-12-28rustdoc: remove unnecessary `.tooltip::after { text-align: center }`Michael Howell-1/+0
This doesn't have an effect, since these tooltip are only one line anyway.
2022-12-28Migrate scraped examples higlight CSS to variablesGuillaume Gomez-18/+13
2022-12-27rustdoc: combine common sidebar background color CSS rulesMichael Howell-5/+2
2022-12-27Remove unused empty CSS rules in ayu themeGuillaume Gomez-4/+0
2022-12-26Auto merge of #106156 - fee1-dead-contrib:rollup-3ir0951, r=fee1-deadbors-8/+8
Rollup of 2 pull requests Successful merges: - #106151 (Remove unused imports) - #106153 (Fix missing renaming for #titles into #search-tabs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-26Fix missing renaming for #titles into #search-tabsGuillaume Gomez-8/+8
2022-12-25rustdoc: clean up src sidebar toggle position CSSMichael Howell-10/+4
This PR makes the `464px` version of `#src-sidebar-toggle` the same as the `700px` version, with the button lower on the page so that it doesn't cover up the search form, and removes the left margin to make space for it.
2022-12-24Auto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddlebors-18/+11
Migrate toggle-line-inner background to CSS variable r? `@notriddle`
2022-12-24Migrate toggle-line-inner background to CSS variableGuillaume Gomez-18/+11
2022-12-23rustdoc: make line number CSS for doc comment and scraped the sameMichael Howell-25/+10
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling
2022-12-24Rollup merge of #106093 - notriddle:notriddle/docblock-short-overflow, ↵Matthias Krüger-2/+0
r=GuillaumeGomez rustdoc: remove no-op CSS from `.docblock-short` The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead. These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
2022-12-24Rollup merge of #106091 - GuillaumeGomez:correct-css-pseudo-element, r=notriddleMatthias Krüger-6/+6
Use correct CSS pseudo-element selector Pseudo-element should use "::" to not be confused with pseudo selectors (nice explanation here: https://css-tricks.com/to-double-colon-or-not-do-double-colon/). r? ``@notriddle``
2022-12-23rustdoc: remove no-op CSS from `.docblock-short`Michael Howell-2/+0
The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead. These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
2022-12-23Use correct CSS pseudo-element selectorGuillaume Gomez-6/+6
2022-12-22rustdoc: use a more evocative name for CSS/JS `#titles`Michael Howell-13/+12
This renames the ID, which is only used in search results, to `#search-tabs`. Also changes the `.count` to a span, so it doesn't need its display mode to be overridden.
2022-12-22Rollup merge of #106035 - ↵Matthias Krüger-12/+4
GuillaumeGomez:migrate-css-var-search-tab-title-color, r=notriddle Migrate search tab title color to CSS variable r? ```@notriddle```
2022-12-22Rollup merge of #106027 - notriddle:notriddle/more-scraped-examples-inner, ↵Matthias Krüger-14/+8
r=GuillaumeGomez rustdoc: simplify CSS and DOM for more-scraped-examples This gets rid of the more-scraped-examples-inner wrapper, instead nesting the children directly and using absolute positioning for the toggle line.
2022-12-22Auto merge of #106034 - matthiaskrgr:rollup-2zpql33, r=matthiaskrgrbors-11/+9
Rollup of 8 pull requests Successful merges: - #104741 (Switch `#[track_caller]` back to a no-op unless feature gate is enabled) - #105769 (add function to tell the identical errors for ambiguity_errors) - #105843 (Suggest associated const on possible capitalization mistake) - #105966 (Re-enable `Fn` trait call notation error for non-tuple argument) - #106002 (codegen tests: adapt patterns to also work with v0 symbol mangling) - #106010 (Give opaque types a better coherence error) - #106016 (rustdoc: simplify link anchor to section expand JS) - #106024 (Fix ICE due to `todo!()` in `rustdoc` for `Term`s) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Migrate search tab title color to CSS variableGuillaume Gomez-12/+4
2022-12-22Rollup merge of #106024 - JulianKnodt:add_term_html_docs, r=notriddleMatthias Krüger-4/+4
Fix ICE due to `todo!()` in `rustdoc` for `Term`s Left a todo awhile ago (I think), so fill it in to print a const for `Term`s. Fixes #105952. Should I add some annotations to the rustdoc test?
2022-12-22Rollup merge of #106016 - notriddle:notriddle/link-has-onclick, r=GuillaumeGomezMatthias Krüger-7/+5
rustdoc: simplify link anchor to section expand JS
2022-12-22Auto merge of #104889 - GuillaumeGomez:fix-impl-block-in-const-expr, r=notriddlebors-1/+1
Fix impl block in const expr Fixes #83026. The problem was that we didn't visit block expressions. Considering how big the [walk_expr](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_hir/intravisit.rs.html#678) function is, I decided to instead implement the `hir` visitor on the struct. It also answers the question which was in a comment for `RustdocVisitor`: we should have used a visitor instead of our ad-hoc implementation. Adding this visitor also added some extra checks that weren't present before (check changes in `rustdoc-ui` tests). r? `@notriddle`
2022-12-22Fix ICEkadmin-4/+4
Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.
2022-12-21rustdoc: simplify CSS and DOM for more-scraped-examplesMichael Howell-14/+8
This gets rid of the more-scraped-examples-inner wrapper, instead nesting the children directly and using absolute positioning for the toggle line.
2022-12-21rustdoc: simplify link anchor to section expand JSMichael Howell-7/+5
2022-12-20Rollup merge of #105972 - notriddle:notriddle/anchor, r=GuillaumeGomezMatthias Krüger-6/+2
rustdoc: simplify section anchor CSS Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be always positioned absolute, specifying it on hover as well is redundant.
2022-12-20rustdoc: simplify section anchor CSSMichael Howell-6/+2
Since f50bf8636e3b0296db82e631fe95c84324a46ccc changed anchors to be always positioned absolute, specifying it on hover as well is redundant.
2022-12-20rustdoc: prevent CSS layout of line numbers shrinking into nothingMichael Howell-0/+1
2022-12-20Rollup merge of #105914 - GuillaumeGomez:simplify-css-examples-code-blocks, ↵Matthias Krüger-10/+0
r=notriddle rustdoc: Simplify CSS for scraped code examples code blocks It's another approach than https://github.com/rust-lang/rust/pull/105894 for https://github.com/rust-lang/rust/pull/105823. I simply removed the extra style added for the scraped code blocks which appears to be unneeded. r? `@notriddle`
2022-12-20Rollup merge of #105912 - notriddle:notriddle/pre-line-height, r=GuillaumeGomezMatthias Krüger-0/+1
rustdoc: force pre tags to have the default line height Fixes #105906
2022-12-19Simplify CSS for code examples code blocksGuillaume Gomez-10/+0
2022-12-19rustdoc: remove width-limiter from source pages, stop overriding CSSMichael Howell-6/+2
2022-12-19rustdoc: force pre tags to have the default line heightMichael Howell-0/+1
Fixes #105906
2022-12-17Rollup merge of #105789 - notriddle:notriddle/examples-margin, r=GuillaumeGomezMatthias Krüger-9/+4
rustdoc: clean up margin CSS for scraped examples * This stops applying a margin to the additional example links. Because these links are `display: inline`, it doesn't actually do anything. * This switches from using a margin-bottom with a special exception for the examples themselves, plus an additional margin on the hide button, to instead using just margin-top on the examples, with an exception for the first one. No user-visible changes should result from this.
2022-12-17Rollup merge of #105780 - GuillaumeGomez:read-more-links, r=notriddleMatthias Krüger-8/+24
rustdoc: Don't add "Read more" link if there is no extra content Fixes #105677.
2022-12-16rustdoc: clean up margin CSS for scraped examplesMichael Howell-9/+4
* This stops applying a margin to the additional example links. Because these links are `display: inline`, it doesn't actually do anything. * This switches from using a margin-bottom with a special exception for the examples themselves, plus an additional margin on the hide button, to instead using just margin-top on the examples, with an exception for the first one. No user-visible changes should result from this.
2022-12-16Don't add "Read more" link if there is no extra contentGuillaume Gomez-8/+24
2022-12-16Rollup merge of #105764 - notriddle:notriddle/src-sidebar-toggle, ↵Matthias Krüger-11/+11
r=GuillaumeGomez rustdoc: name the source page sidebar-toggle `#src-sidebar-toggle` The old name doesn't get across where it's really supposed to be used.
2022-12-16Rollup merge of #105757 - notriddle:notriddle/sub-settings, r=GuillaumeGomezMatthias Krüger-6/+0
rustdoc: remove unused CSS `.sub-settings` Obsoleted when 9625ed8be7fa66c3ee5f78180a3d5911817096f6 changed the DOM.
2022-12-16Rollup merge of #105756 - notriddle:notriddle/example-wrap-tooltip, ↵Matthias Krüger-12/+6
r=GuillaumeGomez rustdoc: simplify CSS for codeblock tooltips Instead of making its parts `display: none` and then changing it on hover, just make the pseudo-element itself on hover.
2022-12-15rustdoc: name the source page sidebar-toggle `#src-sidebar-toggle`Michael Howell-11/+11
The old name doesn't get across where it's really supposed to be used.
2022-12-15rustdoc: remove unused CSS `.sub-settings`Michael Howell-6/+0
Obsoleted when 9625ed8be7fa66c3ee5f78180a3d5911817096f6 changed the DOM.
2022-12-15rustdoc: simplify CSS for codeblock tooltipsMichael Howell-12/+6
Instead of making its parts `display: none` and then changing it on hover, just make the pseudo-element itself on hover.