| Age | Commit message (Collapse) | Author | Lines |
|
Clean up variables in `search.js`
While reviewing https://github.com/rust-lang/rust/pull/118402, I saw a few small clean ups that were needed, mostly about variables creation.
r? ```@notriddle```
|
|
clippy::complexity fixes
filter_map_identity
needless_bool
search_is_some
unit_arg
map_identity
needless_question_mark
derivable_impls
|
|
Add rustX check to codeblock attributes lint
We discovered this issue [here](https://github.com/rust-lang/rust/pull/118802#discussion_r1421815943).
I assume that the issue will be present in other places outside of the compiler so it's worth adding a check for it.
First commit is just a small cleanup about variables creation which was a bit strange (at least more than necessary).
r? ```@notriddle```
|
|
redundant_guards
redundant_slicing
filter_next
needless_borrowed_reference
useless_format
|
|
|
|
filter_map_identity
needless_bool
search_is_some
unit_arg
map_identity
needless_question_mark
derivable_impls
|
|
|
|
|
|
Renamings:
- find -> opt_hir_node
- get -> hir_node
- find_by_def_id -> opt_hir_node_by_def_id
- get_by_def_id -> hir_node_by_def_id
Fix rebase changes using removed methods
Use `tcx.hir_node_by_def_id()` whenever possible in compiler
Fix clippy errors
Fix compiler
Apply suggestions from code review
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Add FIXME for `tcx.hir()` returned type about its removal
Simplify with with `tcx.hir_node_by_def_id`
|
|
|
|
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.
|
|
r=GuillaumeGomez
rustdoc-search: do not treat associated type names as types
[Before](http://notriddle.com/rustdoc-html-demo-6/tor-before/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)
[After](http://notriddle.com/rustdoc-html-demo-6/tor-after/tor_config/list_builder/trait.DirectDefaultEmptyListBuilderAccessors.html?search=DirectDefaultEmptyListBuilderAccessors%3CT%3DT%3E%20-%3E%20Vec%3CT%3E#associatedtype.T)
[Profile](http://notriddle.com/rustdoc-html-demo-6/tor-profile/index.html)
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.
(The second commit is a mostly unrelated bugfix.)
|
|
|
|
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.
|
|
This is an extension of the previous commit. It means the output of
something like this:
```
stringify!(let a: Vec<u32> = vec![];)
```
goes from this:
```
let a: Vec<u32> = vec![] ;
```
With this PR, it now produces this string:
```
let a: Vec<u32> = vec![];
```
|
|
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 `#[rustc_host]`, use internal desugaring
Also removed a way for users to explicitly specify the host param since that isn't particularly useful. This should eliminate any pain with encoding attributes across crates and etc.
r? `@compiler-errors`
|
|
|
|
|
|
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.
|
|
rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`.
They're only used for HTML, so it makes more sense for them to live their.
|
|
Add `never_patterns` feature gate
This PR adds the feature gate and most basic parsing for the experimental `never_patterns` feature. See the tracking issue (https://github.com/rust-lang/rust/issues/118155) for details on the experiment.
`@scottmcm` has agreed to be my lang-team liaison for this experiment.
|
|
|
|
|
|
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).
|