-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
matthiaskrgr
wants to merge
21
commits into
rust-lang:master
Choose a base branch
from
matthiaskrgr:rollup-mrobovy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rollup of 7 pull requests #142817
+1,635
−425
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is to unblock cargo from servo/html5ever#623
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`
@bors r+ rollup=never p=5 |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
from_coroutine
#142801 (Use gen blocks in the compiler instead offrom_coroutine
)LayoutS
toLayoutData
in comments #142804 (RenameLayoutS
toLayoutData
in comments)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup