| Age | Commit message (Collapse) | Author | Lines |
|
|
|
The `c === "="` was redundant when `isSeparatorCharacter` already
checks that.
The function `isStopCharacter` and `isEndCharacter` functions
did exactly the same thing and have synonymous names.
There doesn't seem much point in having both.
|
|
|
|
Before: http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/
After: http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/
Profile: http://notriddle.com/rustdoc-html-demo-6/tor-profile/
As a bit of background information: in type-based queries, a type
name that does not exist gets treated as a generic type variable.
This causes a counterintuitive behavior in the `tor_config` crate,
which has a trait with an associated type variable called `T`.
This isn't a searchable concrete type, but its name still gets stored
in the typeNameIdMap, as a convenient way to intern its name.
|
|
detects redundant imports that can be eliminated.
for #117772 :
In order to facilitate review and modification, split the checking code and
removing redundant imports code into two PR.
|
|
rustdoc: remove unused parameter `reversed` from onEach(Lazy)
This feature was added in edec5807ac5ba90cbc0c61a5ec7b80f29e1eea33 to support JavaScript-based toggles that were later replaced with HTML `<details>`.
|
|
[rustdoc] Fix display of features
Fixes https://github.com/rust-lang/rust/issues/118615.
It now looks like this:

We can't use flex without breaking the flow, meaning we can't vertically align items as we want. Because of that, the `min-height` was problematic as it rendered weirdly and therefore needed to be removed.
r? `@notriddle`
|
|
This feature was added in edec5807ac5ba90cbc0c61a5ec7b80f29e1eea33
to support JavaScript-based toggles that were later replaced with
HTML `<details>`.
|
|
|
|
|
|
|
|
Remove mention of rust to make the error message generic.
The deprecation notice is used when in crates as well. This applies to versions Rust or Crates.
Relates #118148
|
|
|
|
|
|
putting an anchor to their left side
|
|
The deprecation notice is used when in crates as well. This applies to versions Rust or Crates.
Fixes #118148
Signed-off-by: Harold Dost <h.dost@criteo.com>
|
|
[rustdoc] Don't generate the "Fields" heading if there is no field displayed
Fixes https://github.com/rust-lang/rust/issues/118195.
If no field is displayed, we should not generate the `Fields` heading in enum struct variants.
r? ``@notriddle``
|
|
rustdoc: do not escape quotes in body text
Escaping quote marks is only needed in attributes, not text.
```console
$ du -hs doc-old/ doc-new/
670M doc-old/
669M doc-new/
```
|
|
|
|
Escaping quote marks is only needed in attributes, not text.
```console
$ du -hs doc-old/ doc-new/
670M doc-old/
669M doc-new/
```
|
|
|
|
rustdoc: `div.where` instead of fmt-newline class
This is about equally readable, a lot more terse, and stops special-casing functions and methods.
```console
$ du -hs doc-old/ doc-new/
671M doc-old/
670M doc-new/
```
|
|
This is about equally readable, a lot more terse, and stops
special-casing functions and methods.
```console
$ du -hs doc-old/ doc-new/
671M doc-old/
670M doc-new/
```
|
|
r=GuillaumeGomez
rustdoc: remove small from `small-section-header`
There's no such thing as a big section header, so I don't know why the name was used.
|
|
There's no such thing as a big section header, so I don't know why the
name was used.
|
|
This way, most of the parsing code doesn't need to be designed to handle
it, since they should always be treated exactly the same anyhow.
|
|
This is already covered by the normal unexpected char path.
|
|
This restriction made sense back when spaces separated function
parameters, but now that they separate path components, there's
no real ambiguity any more.
Additionally, the Rust language allows it.
|
|
|
|
They're only used for HTML, so it makes more sense for them to live
their.
|
|
Rollup of 3 pull requests
Successful merges:
- #118322 (skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`)
- #118325 (Fix Rustdoc search docs link)
- #118338 (Backticks fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix Rustdoc search docs link
This link has been outdated since #112725 moved the search docs to their own page
|
|
r=notriddle
rustdoc: Remove space from fake-variadic fn ptr impls
before: `for fn (T₁, T₂, …, Tₙ) -> Ret`
after: `for fn(T₁, T₂, …, Tₙ) -> Ret`
I don't think we usually have spaces there, so it looks weird.
cc `@notriddle` since you added the space in https://github.com/rust-lang/rust/pull/98180 (or rather, added the feature with a space included).
|
|
|
|
before: `for fn (T₁, T₂, …, Tₙ) -> Ret`
after: `for fn(T₁, T₂, …, Tₙ) -> Ret`
|
|
rustdoc: replace `elemIsInParent` with `Node.contains`
According to [MDN], this function is compatible with:
* Chrome 16 and Edge 12
* Firefox 9
* Safari 1.1 and iOS Safari 1
These browsers are well within our [support matrix], which requires compatibility with Chrome 118, Firefox 115, Safari 17, and Edge 119.
[MDN]: https://developer.mozilla.org/en-US/docs/Web/API/Node/contains#browser_compatibility
[support matrix]: https://browsersl.ist/#q=last+2+Chrome+versions%2C+last+1+Firefox+version%2C+Firefox+ESR%2C+last+1+Safari+version%2C+last+1+iOS+version%2C+last+1+Edge+version%2C+last+1+UCAndroid+version
|
|
cleanup
|
|
`is_{some,ok}_and` for rustdoc
slightly more fluent-reading code
r? fmease
|
|
According to [MDN], this function is compatible with:
* Chrome 16 and Edge 12
* Firefox 9
* Safari 1.1 and iOS Safari 1
These browsers are well within our [support matrix], which requires
compatibility with Chrome 118, Firefox 115, Safari 17, and Edge 119.
[MDN]: https://developer.mozilla.org/en-US/docs/Web/API/Node/contains#browser_compatibility
[support matrix]: https://browsersl.ist/#q=last+2+Chrome+versions%2C+last+1+Firefox+version%2C+Firefox+ESR%2C+last+1+Safari+version%2C+last+1+iOS+version%2C+last+1+Edge+version%2C+last+1+UCAndroid+version
|
|
|
|
|
|
Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`
Requested by `@fmease` in https://github.com/rust-lang/rust/pull/118226#pullrequestreview-1747432292.
There is also a much larger number of `option.map_or(false, cond)` that can be changed separately if someone wants.
r? fmease
|
|
Fixes #118242
|
|
|
|
|
|
Test for presence rather than absence
Remove redundant tests
Issues in those parts will likely be caught by other parts of the test suite.
|
|
|
|
The search sorting code already sorts by item type discriminant,
putting things with smaller discriminants first. There was
also a special case for sorting keywords and primitives earlier,
and this commit removes it by giving them lower discriminants.
The sorting code has another criteria where items with descriptions
appear earlier than items without, and that criteria has higher
priority than the item type. This shouldn't matter, though,
because primitives and keywords normally only appear in the
standard library, and it always gives them descriptions.
|
|
This computes the same result with less code by computing many of
the old checks at once:
* It won't enter the loop if clength > length, because then the
result of length - clength will be negative and the
loop conditional will fail.
* i + clength will never be greater than length, because it
starts out as i = length - clength, implying that i + clength
equals length, and it only goes down from there.
* The aborted variable is replaced with control flow.
|
|
|