| Age | Commit message (Collapse) | Author | Lines |
|
Move test to rustdoc-ui
Fix test writing to wrong directory
Formatting
Fix test
Add FIXME
Remove raw multiline strings
|
|
* Move call location logic from function constructor to rendering
* Fix issue with macro spans in scraping examples
* Clean up example loading logic
Documentation / newtype for DecorationInfo
Fix line number display
Serialize edition of call site, other small cleanup
|
|
Tweak colors
Tabs
New link heading style
|
|
issues
Remove repository url
Fix formatting
Fix file_span in print_src
Formatting
|
|
Continue migrating JS functionality
Cleanup
Fix compile error
Clean up the diff
Set toggle font to sans-serif
|
|
Improve styling
Start to clean up code, add comments
|
|
Add display name
Fix remaining merge conflicts
Only embed code for items containing examples
|
|
Simplify toggle UI logic, add workspace root for URLs
|
|
Clean up tidy checks
|
|
Move rendering of examples into
Finalize design
Cleanup, rename found -> scraped
Softer yellow
Clean up dead code
Document scrape_examples
More simplification and documentation
Remove extra css
Test
|
|
librustdoc: Use correct heading levels.
Closes #89309
This fixes the `<h#>` header tags throughout the docs to reflect a semantic hierarchy.
- I ran a script to manually check that we don't have any files with multiple `<h1>` tags.
- Also checked that we never incorrectly nest e.g. a `<h2>` under an `<h3>`.
- I also spot-checked a bunch of pages (`trait.Read`, `enum.Ordering`, `primitive.isize`, `trait.Iterator`).
|
|
By adding #![doc(cfg_hide(foobar))] to the crate attributes the cfg
#[cfg(foobar)] (and _only_ that _exact_ cfg) will not be implicitly
treated as a doc(cfg) to render a message in the documentation.
|
|
This is only active when the `doc_cfg` feature is active.
The implicit cfg can be overridden via #[doc(cfg(...))], so e.g. to
hide a #[cfg] you can use something like:
```rust
#[cfg(unix)]
#[doc(cfg(all()))]
pub struct Unix;
```
(since `all()` is always true, it is never shown in the docs)
|
|
|
|
|
|
|
|
|
|
- Avoid multiple <h1>s on a page.
- The <h#> tags should follow a semantic hierarchy.
- Cap at h6 (no h7)
|
|
overlay row entries after a UA specific amount of rows
|
|
|
|
In-line:remove_visible_path_from_allowed_deprecated_lint, r=jyn514
Remove visible path calculation from allowed deprecation lint
|
|
|
|
The change to `impl Clean<Path> for hir::TraitRef<'_>` was necessary to
fix a test failure for `src/test/rustdoc/trait-alias-mention.rs`.
Here's why:
The old code path was through `impl Clean<Type> for hir::TraitRef<'_>`,
which called `resolve_type`, which in turn called `register_res`. Now,
because `PolyTrait` uses a `Path` instead of a `Type`, the impl of
`Clean<Path>` was being run, which did not call `register_res`, causing
the trait alias to not be recorded in the `external_paths` cache.
|
|
It should only ever be a `ResolvedPath`, so this (a) enforces that, and
(b) reduces the size of `Impl`.
I had to update a test because the order of the rendered auto trait impl
bounds changed. I think the order changed because rustdoc sorts auto
trait bounds using their `Debug` output.
|
|
|
|
|
|
rustdoc: Cleanup `clean` part 2
Split out from #88379. This contains the following commits from that PR:
- Remove `Type::ResolvedPath.is_generic`
- Rename `is_generic()` to `is_assoc_ty()`
r? `@jyn514`
|
|
|
|
|
|
|
|
rustdoc: reduce number of copies when using parallel IO
This is Windows-only for now; I was getting really bad slowdowns from this on linux for some reason.
Helps with https://github.com/rust-lang/rust/issues/82741. Follow-up to https://github.com/rust-lang/rust/pull/60971.
|
|
|
|
The new name is more accurate than the previous one.
|
|
It can be computed on-demand.
|
|
rustdoc: Cleanup `clean` part 1
Split out from #88379.
These commits are completely independent of each other, and each is a fairly
small change (the last few are new commits; they are not from #88379):
- Remove unnecessary `Cache.*_did` fields
- rustdoc: Get symbol for `TyParam` directly
- Create a valid `Res` in `external_path()`
- Remove unused `hir_id` parameter from `resolve_type`
- Fix redundant arguments in `external_path()`
- Remove unnecessary `is_trait` argument
- rustdoc: Cleanup a pattern match in `external_generic_args()`
r? ``@jyn514``
|
|
|
|
Change more x64 size checks to not apply to x32.
Commit 95e096d6 changed a bunch of size checks already, but more have
been added, so this fixes the new ones the same way: the various size
checks that are conditional on target_arch = "x86_64" were not intended
to apply to x86_64-unknown-linux-gnux32, so add
target_pointer_width = "64" to the conditions.
|
|
r=GuillaumeGomez
Workaround blink/chromium grid layout limitation of 1000 rows
I made this in case we don't come up with a better solution in time.
See https://github.com/rust-lang/rust/issues/88545 for more details.
A rendered version of the standard library is hosted here:
https://data.estada.ch/rustdoc-nightly_497ee321af_2021-09-09/core/arch/arm/index.html
r? `@GuillaumeGomez` `@jsha`
|
|
Fix table in docblocks
"Overwrite" of #88702.
Instead of adding a z-index to the sidebar (which only hides the issue, doesn't fix it), I wrap `<table>` elements inside a `<div>` and limit all chidren of `.docblock` elements' width to prevent having the scrollbar on the whole doc block.

Thanks `@nbdd0121` for `overflow-x: auto;`. ;)
r? `@notriddle`
|
|
rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields
Fixes #88600.
```rust
pub struct H;
pub struct S;
pub enum FooEnum {
HiddenTupleItem(#[doc(hidden)] H),
MultipleHidden(#[doc(hidden)] H, #[doc(hidden)] H),
MixedHiddenFirst(#[doc(hidden)] H, S),
MixedHiddenLast(S, #[doc(hidden)] H),
HiddenStruct {
#[doc(hidden)]
h: H,
s: S,
},
}
```
Generates

|
|
They can be obtained by accessing the `TyCtxt` where they are needed.
|
|
|
|
See https://github.com/rust-lang/rust/issues/88545 for more details
|
|
Rustdoc: Report Layout of enum variants
Followup of #83501, Fixes #86253.
cc `@camelid`
`@rustbot` label A-rustdoc
|
|
|
|
this also renders them as `_`, which rustdoc previously did not.
|
|
|
|
Avoid invoking the hir_crate query to traverse the HIR
Walking the HIR tree is done using the `hir_crate` query. However, this is unnecessary, since `hir_owner(CRATE_DEF_ID)` provides the same information. Since depending on `hir_crate` forces dependents to always be executed, this leads to unnecessary work.
By splitting HIR and attributes visits, we can avoid an edge to `hir_crate` when trying to visit the HIR tree.
|
|
Commit 95e096d6 changed a bunch of size checks already, but more have
been added, so this fixes the new ones the same way: the various size
checks that are conditional on target_arch = "x86_64" were not intended
to apply to x86_64-unknown-linux-gnux32, so add
target_pointer_width = "64" to the conditions.
|
|
|