| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Remove unused CSS rule
As you can see in the firefox devtools:

It needs the display to be `grid` or `inline-grid`, which isn't the case.
r? `@dns2utf8`
|
|
Fix spelling: Cannonical -> Canonical
|
|
Fix docblock code display on mobile
Fixes https://github.com/rust-lang/rust/issues/89618.
Before:

After:

r? `@jsha`
|
|
|
|
|
|
|
|
Move top part of print_item to Tera templates
Part of #84419.
This moves the first line of each item page (E.g. `Struct foo::Bar .... 1.0.0 [-][src]` into a Tera template.
I also moved template initialization into its own module and added a small macro to reduce duplication and opportunity for errors.
|
|
rustdoc: Cleanup various `clean` types
Cleanup various `clean` types.
|
|
|
|
r=notriddle
Fix invalid HTML generation for higher bounds
Considering this is a bug, I cherry-picked the commit from #89676 so it's merged more quickly.
r? ``@notriddle``
|
|
|
|
|
|
Add print_item.html and the code in print_item.rs to use it.
|
|
Remove special-casing of never primitive in rustdoc-json-types
Fixes https://github.com/rust-lang/rust/issues/89349
r? `@GuillaumeGomez`
|
|
clippy::complexity fixes
|
|
Make rustdoc not highlight `->` and `=>` as operators
It was marking them up as `<span class="op">=</span><span class="op">></span>`,
which is bloaty and wrong (at least, I think `<=` and `=>` should probably be different colors, since they're so different and yet made from the same symbols).
Before:

After:

|
|
|
|
|
|
Prevent error reporting from outputting a recursion error if it finds an ambiguous trait impl during suggestions
Closes #89275
This fixes the compiler reporting a recursion error during another already in progress error by trying to make a conversion method suggestion and encounters ambiguous trait implementations that can convert a the original type into a type that can then be recursively converted into itself via another method in the trait.
Updated OverflowError struct to be an enum so I could differentiate between passes - it's no longer a ZST but I don't think that should be a problem as they only generate when there's an error in compiling code anyway
|
|
Revert "Stabilize `Iterator::intersperse()`"
Reverts rust-lang/rust#88548
First step in resolving https://github.com/rust-lang/rust/issues/88967
|
|
|
|
Make cfg imply doc(cfg)
This is a reopening of #79341, rebased and modified a bit (we made a lot of refactoring in rustdoc's types so they needed to be reflected in this PR as well):
* `hidden_cfg` is now in the `Cache` instead of `DocContext` because `cfg` information isn't stored anymore on `clean::Attributes` type but instead computed on-demand, so we need this information in later parts of rustdoc.
* I removed the `bool_to_options` feature (which makes the code a bit simpler to read for `SingleExt` trait implementation.
* I updated the version for the feature.
There is only one thing I couldn't figure out: [this comment](https://github.com/rust-lang/rust/pull/79341#discussion_r561855624)
> I think I'll likely scrap the whole `SingleExt` extension trait as the diagnostics for 0 and >1 items should be different.
How/why should they differ?
EDIT: this part has been solved, the current code was fine, just needed a little simplification.
cc `@Nemo157`
r? `@jyn514`
Original PR description:
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;
```
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.
|
|
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`).
|
|
are not useful
|
|
* Remove "bool_to_options" feature
* Update version for compiler feature
* rustfmt
|
|
|
|
Issue 89275 fix and test
Fix librustdoc OverflowError usage
rust tidy run
Issue 89275 fix and test
|
|
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)
|
|
r=GuillaumeGomez
Rustdoc migrate to table so the gui can handle >2k constants
Closes #88545.
This PR adds a test for overlapping entries in the `item-table` https://github.com/rust-lang/rust/issues/88545
It currently includes the commit with the workaround from https://github.com/rust-lang/rust/pull/88776
|
|
rustdoc-json: Don't ignore impls for primitive types
Fix the issue discussed at [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.E2.9C.94.20Json.20output.20lacks.20some.20item.20which.20are.20supposed.20to.20be.20there)
r? ``@jyn514``
|
|
rustdoc: Improve doctest pass's name and module's name
As the docs at the top of the file say, it is an overloaded pass and
actually runs two lints.
|
|
|
|
|
|
|
|
|
|
It was marking them up as `<span class="op">=</span><span class="op">></span>`,
which is bloaty and wrong.
|
|
rustdoc: use slice::contains instead of open-coding it
|
|
- Avoid multiple <h1>s on a page.
- The <h#> tags should follow a semantic hierarchy.
- Cap at h6 (no h7)
|
|
I think that before this commit, the path `::std::vec::Vec` would have
rendered as `{{root}}::std::vec::Vec`. Now, it should render correctly
as `::std::vec::Vec`.
|
|
|
|
The new name is more descriptive of what the function does.
|
|
overlay row entries after a UA specific amount of rows
|
|
Co-authored-by: Joshua Nelson <github@jyn.dev>
|
|
|
|
`CACHE_KEY` no longer exists.
|
|
They've barely been updated since this version of `rustdoc` (originally
called `rustdoc_ng`) was checked into the tree!
Note that the formatting of a couple `Type` variants changed; rustfmt
seems to change formatting based on whether all variants have docs.
|
|
|
|
As the docs at the top of the file say, it is an overloaded pass and
actually runs two lints.
|