summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2021-09-04Remove implementors settingGuillaume Gomez-6/+0
2021-09-04Clean render_impl argumentsGuillaume Gomez-46/+67
2021-09-04Put back "auto-collapse-implementors" settingGuillaume Gomez-0/+6
2021-09-04Put back display of associated items (types and consts)Guillaume Gomez-11/+33
2021-07-27Rustdoc accessibility: use real headers for doc itemsbors-22/+30
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-23Rollup merge of #87376 - Thomasdezeeuw:rustdoc-large-logo, r=GuillaumeGomezYuki Okushi-0/+1
Change rustdoc logo to use the full container size We have a logo in svg that scales nicely to large sizes, but by default is only 5px large, i.e. very small. With the change the logo expands to the full size. By only setting the height to 100% we ensure that the width-height ratio isn't changed.
2021-07-23Rollup merge of #87372 - GuillaumeGomez:move-test_main-calls, r=jyn514Yuki Okushi-15/+20
Move calls to test_main into one function Fixes #86254. cc ``@jyn514`` r? ``@camelid``
2021-07-22Don't hide fields of enum struct variantsNoah Lev-5/+2
* The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
2021-07-22Change rustdoc logo to use the full container sizeThomas de Zeeuw-0/+1
We have a logo in svg that scales nicely to large sizes, but by default is only 5px large, i.e. very small. With the change the logo expands to the full size. By only setting the height to 100% we ensure that the width-height ratio isn't changed.
2021-07-22Move calls to test_main into one functionGuillaume Gomez-15/+20
2021-07-22Rollup merge of #87288 - ijackson:rustdoc-theme, r=GuillaumeGomezGuillaume Gomez-1/+27
rustdoc: Restore --default-theme, etc, by restoring varname escaping In #86157 cd0f93193c84ddc6698f9b65909da71c084dcb74 Use Tera templates for rustdoc. dropped the following transformation from the keys of the default settings element's `data-` attribute names: .map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v))) The `Escape` part is indeed no longer needed, because Tera does that for us. But the massaging of `-` to `_` is needed, for the (bizarre) reasons explained in the new comments. I have tested that the default theme function works again for me. I have also verified that passing (in shell syntax) '--default-theme="zork&"' escapes the value in the HTML. Closes #87263
2021-07-22Rollup merge of #87270 - GuillaumeGomez:item-summary-table, r=notriddleGuillaume Gomez-4/+11
Don't display <table> in item summary Fixes #87231. r? `@notriddle`
2021-07-21Don't render <table> in items' summaryGuillaume Gomez-4/+11
2021-07-21Run rustfmtIan Jackson-2/+4
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-07-21rustdoc: Restore --default-theme, etc, by restoring varname escapingIan Jackson-1/+25
In #86157 cd0f93193c84ddc6698f9b65909da71c084dcb74 Use Tera templates for rustdoc. dropped the following transformation from the keys of the default settings element's `data-` attribute names: .map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v))) The `Escape` part is indeed no longer needed, because Tera does that for us. But the massaging of `-` to `_` is needed, for the (bizarre) reasons explained in the new comments. I have tested that the default theme function works again for me. I have also verified that passing --default-theme="zork&" escapes the value in the HTML. Closes #87263. CC: Jacob Hoffman-Andrews <github@hoffman-andrews.com> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-07-21Rollup merge of #87346 - rylev:rename-force-warn, r=nikomatsakisEric Huss-2/+2
Rename force-warns to force-warn The renames the `--force-warns` option to `--force-warn`. This mirrors other lint options like `--warn` and `--deny` which are in the singular. r? `@nikomatsakis` cc `@ehuss` - this option is being used by Cargo. How do we make sure the transition to using the new name is as smooth as possible?
2021-07-21Rollup merge of #87024 - weihanglo:issue-85494, r=ManishearthEric Huss-12/+34
rustdoc: show count of item contents when hidden Resolves #85494
2021-07-21Rollup merge of #87230 - GuillaumeGomez:docblock-table-overflow, r=notriddleGuillaume Gomez-4/+5
Fix docblock <table> overflow Before: ![Screenshot from 2021-07-18 00-05-23](https://user-images.githubusercontent.com/3050060/126050272-ce08bc5f-74ff-4135-bc12-d708d87470cc.png) After: ![Screenshot from 2021-07-18 00-03-55](https://user-images.githubusercontent.com/3050060/126050273-42f41b4d-ad57-4a87-91de-18e63f8504ec.png) cc `@SergioBenitez` r? `@notriddle`
2021-07-21Rename force-warns to force-warnRyan Levick-2/+2
2021-07-19Auto merge of #86970 - inquisitivecrystal:force-warn, r=davidtwcobors-1/+1
Make `--force-warns` a normal lint level option Now that `ForceWarn` is a lint level, there's no reason `--force-warns` should be treated differently from other options that set lint levels. This merges the `ForceWarn` handling in with the other lint level command line options. It also unifies all of the relevant selection logic in `compiler/rustc_lint/src/levels.rs`, rather than having some of it weirdly elsewhere. Fixes #86958, which arose from the special-cased handling of `ForceWarn` having had an error in it.
2021-07-19Rollup merge of #87251 - GuillaumeGomez:item-info-width, r=notriddleGuillaume Gomez-0/+3
Fix "item info" width Fixes #87202. It now looks again like this: ![Screenshot from 2021-07-18 12-33-27](https://user-images.githubusercontent.com/3050060/126064005-013acabc-7f17-4436-8dfc-cb6b9bc24413.png) cc `@jyn514` r? `@notriddle`
2021-07-19Rollup merge of #87210 - notriddle:notriddle/rustdoc-sidebar-headers, ↵Guillaume Gomez-29/+33
r=GuillaumeGomez Rustdoc accessibility: make the sidebar headers actual headers Part of #87059 Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
2021-07-19Rollup merge of #86230 - GuillaumeGomez:nocapture, r=camelidGuillaume Gomez-1/+25
Add --nocapture option to rustdoc Fixes https://github.com/rust-lang/rust/issues/26309. Fixes #45724. Once this PR is merged, I'll send a PR to cargo to also pass `--nocapture` to rustdoc. cc `@jyn514` r? `@camelid`
2021-07-18Fix item info displayGuillaume Gomez-0/+3
2021-07-18Don't capture child process output at all when --no-capture is usedGuillaume Gomez-4/+10
2021-07-18Add --nocapture option to rustdocGuillaume Gomez-0/+18
2021-07-17Make `--force-warns` a normal lint level optioninquisitivecrystal-1/+1
2021-07-18Rollup merge of #86889 - jyn514:crate-cleanup, r=camelidYuki Okushi-21/+14
rustdoc: Cleanup ExternalCrate - Remove unnecessary CrateNum from Cache.externs - Remove trival impl Clean for CrateNum
2021-07-18Fix <table> overflow in doc blocksGuillaume Gomez-4/+5
2021-07-17Remove redundant CSSMichael Howell-1/+0
2021-07-17Rustdoc accessibility: make the sidebar headers actual headersMichael Howell-29/+34
Part of #87059 Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
2021-07-16Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, ↵Guillaume Gomez-1/+2
r=GuillaumeGomez feat(rustdoc): open sidebar menu when links inside it are focused Fixes #87172 Based on #87167 (which should be merged first) r? ``@GuillaumeGomez`` Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
2021-07-16feat(rustdoc): open sidebar menu when links inside it are focusedMichael Howell-1/+2
Fixes #87172 Based on #87167 (which should be merged first) Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
2021-07-16Auto merge of #87140 - camsteffen:pat-slice-refs, r=oli-obkbors-11/+6
Remove refs from Pat slices Changes `PatKind::Or(&'hir [&'hir Pat<'hir>])` to `PatKind::Or(&'hir [Pat<'hir>])` and others. This is more consistent with `ExprKind`, saves a little memory, and is a little easier to use.
2021-07-16Auto merge of #87182 - GuillaumeGomez:rollup-whwohua, r=GuillaumeGomezbors-4/+9
Rollup of 7 pull requests Successful merges: - #86983 (Add or improve natvis definitions for common standard library types) - #87069 (ExprUseVisitor: Treat ByValue use of Copy types as ImmBorrow) - #87138 (Correct invariant documentation for `steps_between`) - #87145 (Make --cap-lints and related options leave crate hash alone) - #87161 (RFC2229: Use the correct place type) - #87162 (Fix type decl layout "overflow") - #87167 (Fix sidebar display on small devices) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-16Rollup merge of #87167 - GuillaumeGomez:sidebar-display-mobile, r=notriddleGuillaume Gomez-4/+6
Fix sidebar display on small devices Part of #87059. Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users. Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html). r? `@notriddle`
2021-07-16Rollup merge of #87162 - GuillaumeGomez:type-decl-overflow, r=notriddleGuillaume Gomez-0/+3
Fix type decl layout "overflow" Before: ![Screenshot from 2021-07-15 17-56-12](https://user-images.githubusercontent.com/3050060/125822644-c4595211-d75e-4dd7-ba44-183197ee836c.png) After: ![Screenshot from 2021-07-15 17-56-17](https://user-images.githubusercontent.com/3050060/125822648-7b363847-e153-4ff3-9fba-59478e32eced.png) cc ```@SergioBenitez``` r? ```@notriddle```
2021-07-16Auto merge of #86662 - mockersf:fix-86620-link-unknown-location, r=jyn514bors-31/+49
fix dead link for method in trait of blanket impl from third party crate fix #86620 * changes `href` method to raise the actual error it had instead of an `Option` * set the href link correctly in case of an error I did not manage to make a small reproducer, I think it happens in a situation where * crate A expose a trait with a blanket impl * crate B use the trait from crate A * crate C use types from crate B * building docs for crate C without dependencies r? `@jyn514`
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