about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
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-49/+116
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 #105933 - taiki-e:doc-cfg, r=GuillaumeGomezMatthias Krüger-0/+2
Add readable rustdoc display for tvOS and watchOS They are currently displayed as `target_os="..."` in rustdoc, but it would be nice to have readable display like in iOS and other OSs. <img width="487" alt="cfg" src="https://user-images.githubusercontent.com/43724913/208579395-fd5cf276-8171-47ab-bbed-23e40bb7af11.png">
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-20Add readable rustdoc display for tvOS and watchOSTaiki Endo-0/+2
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-15Rollup merge of #105743 - nnethercote:SimplifiedType-cleanups, r=lcnrMatthias Krüger-2/+2
`SimplifiedType` cleanups r? `@lcnr`
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.
2022-12-15Migrate Jump to def links background to CSS variableGuillaume Gomez-11/+7
2022-12-15Rollup merge of #105730 - notriddle:notriddle/item-info-before, r=GuillaumeGomezMatthias Krüger-6/+0
rustdoc: remove no-op CSS `.item-info:before { color }` No content is set, so this pseudo-element does not exist. The CSS was obsoleted by 73d0f7c7b68784f1db0a1f53855c20d118a7e8b0.
2022-12-15Rollup merge of #105724 - ↵Matthias Krüger-1/+0
notriddle:notriddle/scrape-example-src-line-numbers, r=GuillaumeGomez rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }` This is the default CSS for `<pre>` tags in `.code-wrapper` anyway, so this line does nothing.
2022-12-15Rollup merge of #105707 - notriddle:notriddle/kbd-cursor, ↵Matthias Krüger-1/+0
r=jhpratt,GuillaumeGomez rustdoc: remove unnecessary CSS `kbd { cursor: default }` Added along with theme picker changes in https://github.com/rust-lang/rust/pull/47686/files#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413R1144, but no reason seems to have been given at the time for why this particular rule was added. Removing this rule results in `<kbd>` elements getting an I-bar, while the rule causes them to use the "default" arrow, but since selecting the text in these elements works fine, the I-bar is not misleading.
2022-12-14rustdoc: remove no-op CSS `.item-info:before { color }`Michael Howell-6/+0
No content is set, so this pseudo-element does not exist. The CSS was obsoleted by 73d0f7c7b68784f1db0a1f53855c20d118a7e8b0.
2022-12-15Auto merge of #105657 - oli-obk:mk_projection_ty, r=lcnrbors-1/+1
Guard ProjectionTy creation against passing the wrong number of substs r? `@lcnr`
2022-12-15Merge `SimplifiedTypeGen<D>` into `SimplifiedType`.Nicholas Nethercote-2/+2
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't need the generic parameter.
2022-12-14rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }`Michael Howell-1/+0
This is the default CSS for `<pre>` tags in `.code-wrapper` anyway, so this line does nothing.
2022-12-14rustdoc: remove unnecessary CSS `kbd { cursor: default }`Michael Howell-1/+0
Added along with theme picker changes in e78f1392b79779fa184f9a63e7be04ac7074a1c2, but no reason seems to have been given at the time for why this particular rule was added. Removing this rule results in `<kbd>` elements getting an I-bar, while the rule causes them to use the "default" arrow, but since selecting the text in these elements works fine, the I-bar is not misleading.
2022-12-14Rollup merge of #105684 - GuillaumeGomez:improve-rustdoc-var-name, r=notriddleMatthias Krüger-5/+5
Improve rustdoc markdown variable naming Opened on the right repository this time. :laughing: r? `@notriddle`
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-1/+1
2022-12-14Rollup merge of #105676 - notriddle:notriddle/impl-docblock, r=GuillaumeGomezMatthias Krüger-0/+1
rustdoc: add CSS margin between `impl` docblock and its items ## Before ![image](https://user-images.githubusercontent.com/1593513/207471025-c27c298b-4d48-461b-918b-a965b09db4f1.png) ## After ![image](https://user-images.githubusercontent.com/1593513/207471759-1bbabf71-0932-441c-b044-ad0e392ba552.png)
2022-12-14Rollup merge of #105665 - notriddle:notriddle/popover-css-merge, ↵Matthias Krüger-6/+3
r=GuillaumeGomez rustdoc: simplify popover CSS * Merge the color-changing block into the regular rules, which was probably written that way because it used to be in the theme files, but has no reason to be written this way now that it's in rustdoc.css * Get rid of redundant `display: block`, since `position: absolute` blockifies the layout anyway.
2022-12-14Rollup merge of #105664 - notriddle:notriddle/linkwrap, r=GuillaumeGomezMatthias Krüger-2/+2
rustdoc: apply `pre-wrap` CSS to code-wrapped links This is common syntax used for intra-doc links, so fixing it should help with doc formatting.
2022-12-13rustdoc: add CSS margin between `impl` docblock and its itemsMichael Howell-0/+1