Skip to content

Rollup of 7 pull requests #142817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jun 21, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

epage and others added 21 commits June 20, 2025 09:12
Added it to the reexported, which is intended
rustdoc behavior, but is apparently untested,
so I also added a test for it.
Alternative candidates for a trait implementation are not printed when
the trait has a diagnostic name, to avoid printing alternatives for
common stdlib traits such as `Copy` or `Debug`. However, this affects
all traits for which a diagnostic item is added.

Here, the list of alternatives candidates for `Step` does not seem
useful, and `Step` is unstable, so this will not be missed.
A lot of these are large! Lots of room for improvement in the future.
A path without generic args, like `Reader`, currently has JSON produced
like this:
```
{"path":"Reader","id":286,"args":{"angle_bracketed":{"args":[],"constraints":[]}}}
```
Even though `types::Path::args` is `Option` and allows for "no args",
instead it gets represented as "empty args". (More like `Reader<>` than
`Reader`.)

This is due to a problem in `clean::Path::from_clean`. It only produces
`None` if the path is an empty string. This commit changes it to also
produce `None` if there are no generic args. The example above becomes:
```
{"path":"Reader","id":286,"args":null}
```
I looked at a few examples and saw this reduce the size of the JSON
output by 3-9%.

The commit also adds an assertion that non-final segments don't have any
generics; something the old code was implicitly relying on.

Note: the original sin here is that `clean::PathSegment::args` is not an
`Option`, unlike `{ast,hir}::PathSegment::args`. I want to fix that, but
it can be done separately.
As per the previous commit, generic args here can only appear on the
final segment. So make the comments obey that constraint.
They show up in three places: once as `Option<Box<GenericArgs>>`, once
as `Box<GenericArgs>`, and once as `GenericArgs`. The first option is
best. It is more compact because generic args are often missing. This
commit changes the latter two to the former.

Example output, before and after, for the `AssocItemConstraint` change:
```
{"name":"Offset","args":{"angle_bracketed":{"args":[],"constraints":[]}},"binding":{...}}
{"name":"Offset","args":null,"binding":{...}}
```
Example output, before and after, for the `Type::QualifiedPath` change:
```
{"qualified_path":{"name":"Offset","args":{"angle_bracketed":{"args":[],"constraints":[]}}, ...}}
{"qualified_path":{"name":"Offset","args":null, ...}}
```
This reduces JSON output size, but not by much (e.g. 0.5%), because
`AssocItemConstraint` and `Type::QualifiedPath` are uncommon.
…gs, r=aDotInTheVoid

rustdoc_json: improve handling of generic args

This PR fixes some inconsistencies and inefficiencies in how generic args are handled by rustdoc-json-types.

r? `@aDotInTheVoid`
…=workingjubilee

error on calls to ABIs that cannot be called

We recently added `extern "custom"`, which cannot be called using a rust call expression. But there are more ABIs that can't be called in that way, because the call does not semantically make sense.

More details are in rust-lang#140566 (comment)

r? `@workingjubilee`

try-job: x86_64-gnu-llvm-19-3
fix(linkcheck): Build using the lockfile

This is to unblock cargo from servo/html5ever#623

I ran `linkcheck.sh` locally and it now works
…y, r=Manishearth,Urgau

Add diagnostic items for Clippy

Clippy still uses some paths to access items from the standard library. Adding the missing diagnostic items allows removing the last remaining paths.

Closes rust-lang/rust-clippy#5393
… r=tgross35

add doc(alias("AsciiChar")) to core::ascii::Char

Added it to the reexported, which is intended rustdoc behavior, but is apparently untested, so I also added a test for it.
Use gen blocks in the compiler instead of `from_coroutine`

r? oli-obk
…ta-in-comments, r=saethlin

Rename `LayoutS` to `LayoutData` in comments

`LayoutS` was renamed to `LayoutData`, but some comments in the compiler were not changed. This updates comments in the compiler (and one section of commented-out code in rust-analyzer) to refer to `LayoutData` instead of `LayoutS`.

cc <rust-lang#132252>, `@workingjubilee`
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Jun 21, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 21, 2025

📌 Commit 4e87031 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2025
@bors
Copy link
Collaborator

bors commented Jun 21, 2025

⌛ Testing commit 4e87031 with merge 6d0c9e2...

bors added a commit that referenced this pull request Jun 21, 2025
Rollup of 7 pull requests

Successful merges:

 - #142502 (rustdoc_json: improve handling of generic args)
 - #142597 (error on calls to ABIs that cannot be called)
 - #142785 (fix(linkcheck): Build using the lockfile)
 - #142787 (Add diagnostic items for Clippy)
 - #142788 (add doc(alias("AsciiChar")) to core::ascii::Char)
 - #142801 (Use gen blocks in the compiler instead of `from_coroutine`)
 - #142804 (Rename `LayoutS` to `LayoutData` in comments)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants