| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Add more eslint rules
This PR adds more eslint rules. Here are the explanations for each of them:
* [space-infix-ops](https://eslint.org/docs/rules/space-infix-ops)
* [space-before-function-paren](https://eslint.org/docs/rules/space-before-function-paren)
* [space-before-blocks](https://eslint.org/docs/rules/space-before-blocks)
* [comma-dangle](https://eslint.org/docs/rules/comma-dangle)
* [comma-style](https://eslint.org/docs/rules/comma-style)
* [max-len](https://eslint.org/docs/rules/max-len)
* [eol-last](https://eslint.org/docs/rules/eol-last)
r? `@notriddle`
|
|
Allow to click on setting text
You can test it [here](https://rustdoc.crud.net/imperio/gui-settings-text-click/doc/foo/index.html).
This PR allows to click on the text alongside the toggle to change it.
r? `@jsha`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rustdoc: fix few clippy lints
Fix few clippy lints: second commit - perf ones, first - other ones.
|
|
Update minifier-rs version to 0.1.0
It fixes a bug with regex parsing.
r? `@notriddle`
|
|
Remove unused brush image
r? `@notriddle`
|
|
|
|
|
|
|
|
Lifetime variance fixes for rustdoc
#97287 migrates rustc to a `Ty` type that is invariant over its lifetime `'tcx`, so I need to fix a bunch of places that assume that `Ty<'a>` and `Ty<'b>` can be unified by shortening both to some common lifetime.
This is doable, since everything is already `'tcx`, so all this PR does is be a bit more explicit that elided lifetimes are actually `'tcx`.
Split out from #97287 so the rustdoc team can review independently.
|
|
|
|
|
|
rustdoc: Remove fields_stripped fields (and equivalents)
Fixes #90588.
r? `@camelid`
|
|
Add new eslint rule to prevent whitespace before function call paren
It prevents `foo ()` basically. :)
r? `@notriddle`
|
|
Co-authored-by: Michael Howell <michael@notriddle.com>
|
|
rustdoc: shrink GenericArgs/PathSegment with boxed slices
This PR also contains a few cleanup bits and pieces, but one of them is a broken intra-doc link, and the other is removing an unused Hash impl. The last commit is the one that matters.
|
|
|
|
|
|
|
|
Implement proper stability check for const impl Trait, fall back to unstable const when undeclared
Continuation of #93960
`@jhpratt` it looks to me like the test was simply not testing for the failure you were looking for? Your checks actually do the right thing for const traits?
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #97190 (Add implicit call to from_str via parse in documentation)
- #97218 (Add eslint checks)
- #97219 (make ptr::invalid not the same as a regular int2ptr cast)
- #97223 (Remove quadratic behaviour from -Zunpretty=hir-tree.)
- #97232 (typo)
- #97237 (Add some more weird-exprs)
- #97238 (Bump LLVM fetched from CI to fix run-make)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Add eslint checks
The first check is to ensure that `=>` is always surrounded with whitespaces.
The second is to ensure that the dict objects looks like this: `{"a": 2}` and not `{"a" : 2}` or `{"a":2}`.
r? ``@notriddle``
|
|
rustdoc: Reduce clean::Type size
There is no need to keep the `DefId` around since it's allow used to compute if we should show a cast or not. As such, we can simply directly store the boolean.
I think it's not what you had in mind `@camelid` but I guess it's still an improvement? :wink:
It was discussed in https://github.com/rust-lang/rust/pull/93941.
r? `@camelid`
|
|
|
|
|
|
|
|
Add new lint to enforce whitespace after keywords
r? `@notriddle`
|
|
rustdoc: show implementations on `#[fundamental]` wrappers
Fixes #92940
|
|
|
|
This avoids an ambiguity (when reading) where `.level.is_stable()` is
not immediately clear whether it is general stability or const
stability.
|
|
|
|
Search GUI fixes
The first fix is about the duplicated "in":

The second fix is about the `<select>` broken style:


You can test it [here](https://rustdoc.crud.net/imperio/search-ui-fixes/doc/foo/index.html?search=test).
r? `@notriddle`
|
|
rustdoc: don't build `rayon` for non-windows targets
`rayon` used only on windows targets, so no need to build it otherwise.
|
|
rustdoc-json: Fix HRTBs for WherePredicate::BoundPredicate
Information about HRTBs are already present for `GenericBound:: TraitBound` and `FunctionPointer`. This PR adds HRTB info also to `WherePredicate::BoundPredicate`.
Use the same field name and type as for the other ones (`generic_params: Vec<GenericParamDef>`). I have verified that this gives rustdoc JSON clients the data they need and in a format that is easy to work with (see https://github.com/Enselic/public-api/pull/92).
I will be happy to add tests for this change (and bump `FORMAT_VERSION` which I just realized I forgot), but it is always nice to get one round of feedback first, so that I don't put a lot of effort into tests that then have to be discarded.
`@rustbot` modify labels: +T-rustdoc +A-rustdoc-json
|
|
Simplify rustdoc search test
Previously, rustdoc search attempted to parse search.js and extract out only certain methods and variables.
This change makes search.js and search-index.js loadable as [CommonJS modules](https://nodejs.org/api/modules.html#modules-commonjs-modules), so they can be loaded directly.
As part of that change, I had to separate execSearch from interacting with the DOM. This wound up being a nice cleanup that made more explicit what inputs it was taking.
I removed search.js' dependency on storage.js by moving hasOwnPropertyRustdoc directly into search.js, and replacing onEach with forEach in a path that is called by the tester.
r? `@GuillaumeGomez`
Demo: https://rustdoc.crud.net/jsha/rustdoc-search-refactor/std/?search=foo
|
|
Previously, search.js relied on the DOM and the `window` object. It can now be
loaded in the absence of the DOM, for instance by Node. The same is true of
search-index.js.
This allows removing a lot of code from src/tools/rustdoc-js/tester.js that
tried to parse search.js and extract specific functions that were needed for
testing.
|
|
|
|
|
|
Retire `ItemLikeVisitor` trait
Issue #95004
cc `@cjgillot`
|