Skip to content

Rollup of 13 pull requests #145795

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

Closed
wants to merge 29 commits into from

Conversation

samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Aug 23, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ognevny and others added 29 commits July 19, 2025 14:19
when building LLVM it's obvious that in case of shared build rustc doesn't need to be recompiled,
but with static builds it would be better to compile rustc again to ensure we linked proper library.
maybe I didn't understand the pipeline correctly, but it was strange for me to see that in Stage 5
LLVM is built while rustc is not
Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte > INT_MAX`.
The case `nbyte == INT_MAX` is valid, so the subtraction can be removed.
By construction, `subpatterns` contains all fields in order. Witness
patterns are constructed with all fields in order by
`WitnessPat::wild_from_ctor` and `WitnessStack::apply_constructor`, and
the order is preserved at `write_struct_like`'s call-site in
`print_witness_pat`. It's thus no longer necessary to go looking for
fields or handle missing fields.
Save a few instructions in `encode_utf8_raw_unchecked` by performing
manual CSE.
By updating rustfmt to use `dirs-6.0.0`.
We also depend on `toml-0.7.8` and `toml-0.8.23`, but this one is easy
to get rid of.
To avoid workspace warnings.
* make attributes render inside code elements and inside divs with class `code-attribute`
* render attributes for macros, associated constants, and struct/union fields
…Kobzol

opt-dist: rebuild rustc when doing static LLVM builds

when building LLVM it's obvious that in case of shared build rustc doesn't need to be recompiled, but with static builds it would be better to compile rustc again to ensure we linked proper library.
maybe I didn't understand the pipeline correctly, but it was strange for me to see that in Stage 5 LLVM is built while rustc is not

r? `@Kobzol`

try-job: dist-x86_64-msvc
try-job: dist-x86_64-linux
…, r=ChrisDenton

std/sys/fd: Relax `READ_LIMIT` on Darwin

Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte > INT_MAX`. The case `nbyte == INT_MAX` is valid, so the subtraction (`- 1`) in
```rust
const READ_LIMIT: usize = if cfg!(target_vendor = "apple") {
    libc::c_int::MAX as usize - 1 // <- HERE
} else {
    libc::ssize_t::MAX as usize
};
```
can be removed.

I tested that the case `nbyte == INT_MAX` is valid on various versions of macOS, including old one like Mac OS X 10.5.

The man page says:
- read() and pread() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/read.2.html)
- write() and pwrite() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/write.2.html)

Here are links to Darwin's code:
- [macOS 15.5] https://github.com/apple-oss-distributions/xnu/blob/e3723e1f17661b24996789d8afc084c0c3303b26/bsd/kern/sys_generic.c#L307
- [Mac OS X 10.2] https://github.com/apple/darwin-xnu/blob/d738f900846ed2d5f685e18bf85ce63b0176f61a/bsd/kern/sys_generic.c#L220

Related PR: rust-lang#38622.
match exhaustiveness diagnostics: show a trailing comma on singleton tuple consructors in witness patterns (and clean up a little)

Constructor patterns of type `(T,)` are written `(pat,)`, not `(pat)`. However, exhaustiveness/usefulness diagnostics would print them as `(pat)` when e.g. providing a witness of non-exhaustiveness and suggesting adding arms to make matches exhaustive; this would result in an error when applied.
rust-analyzer already prints the trailing comma, so it doesn't need changing.

This also includes some cleanup in the second commit, with justification in the commit message.
…f8, r=Mark-Simulacrum

Optimize `char::encode_utf8`

Save a few instructions in `encode_utf8_raw_unchecked` by performing manual CSE.
interpret/allocation: get_range on ProvenanceMap

Helper method to grab all provenances in a given address range for an allocation, making some logic in Miri nicer.
port `sanitize` attribute to the new parsing infrastructure
…iler-errors

next-solver: fix `feature(const_trait_impl)` bootstrap

rarw

r? `@compiler-errors` `@fee1-dead`
…artwright

Remove two duplicated crates

These commits remove `toml-0.5.11` and `dirs-sys-0.4.1`. There are later versions of those same crates already in the tree. Found with `cargo tree -d`.

r? `@jieyouxu`
…compiler-errors

miri: also detect aliasing of in-place argument and return place

This is a follow-up to rust-lang#145585 where I forgot to deal with the case of the return place aliasing an in-place argument -- as `@Amanieu` mentioned in rust-lang#71117 (comment), that case must also be forbidden.

r? `@compiler-errors`
…lt-opts-method, r=Kobzol

Remove default opts from config

We forgot to remove this method in rust-lang#145352. This PR removes that.

r? ``@Kobzol``
Remove profile section from Clippy

To avoid workspace warnings.

[This](rust-lang#145749) subtree sync started causing warnings in Rust builds (rust-lang#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust.

This PR removes the profile section again.

Fixes: rust-lang#145777
…ributes-rendering, r=GuillaumeGomez

rustdoc: make attributes render consistently

While working on rust-lang#132304, I discovered that even standard attributes aren't consistently rendered.
For some constructs/fields, attributes were missing entirely, and the attributes were only sometimes wrapped in a code-attribute divs so they appear greyed out.

In short this PR:
* makes attributes render inside code elements and inside divs with class `code-attribute`
* renders attributes for macros, associated constants, and struct/union fields

Attributes in `Fields` and `Variants` sections are still not rendered (see struct and enum screenshots), because I wasn't sure we want that.

[Compirison of tests/rustdoc/attributes.rs](https://github.com/karolzwolak/rust/blob/90aa25a1c5dbae1e94099b1a2015dfb83783dbe0/tests/rustdoc/attributes.rs)
Before (left) / after (right):

<img width="279" height="97" alt="image" src="https://github.com/user-attachments/assets/baca4b75-f809-4a76-8ac1-e3aa6389aad4" />
<img width="363" height="112" alt="image" src="https://github.com/user-attachments/assets/14970fb0-6fe5-474f-983e-5a95e16175c5" />

<img width="368" height="492" alt="image" src="https://github.com/user-attachments/assets/f9a25583-10e3-49c7-961b-34f3587b552e" />
<img width="415" height="515" alt="image" src="https://github.com/user-attachments/assets/f2fe4aa0-c731-4f2f-a3c2-04e524a858d1" />

<img width="383" height="483" alt="image" src="https://github.com/user-attachments/assets/bccc1b6e-f236-4948-8557-f9b25cad8a07" />
<img width="402" height="528" alt="image" src="https://github.com/user-attachments/assets/2cea9250-37e1-439e-8010-0603905d0f52" />

<img width="372" height="485" alt="image" src="https://github.com/user-attachments/assets/cd49bc0a-90e1-4d08-af0f-084c42af1834" />
<img width="406" height="542" alt="image" src="https://github.com/user-attachments/assets/67fb4ac7-746b-4e20-9c80-97702a71def8" />

<img width="357" height="131" alt="image" src="https://github.com/user-attachments/assets/42769532-1e4d-486d-bdca-6ecc409554b9" />
<img width="366" height="161" alt="image" src="https://github.com/user-attachments/assets/0b4d01d4-dd8e-4467-8cfc-ad58200ba0d7" />

<img width="291" height="65" alt="image" src="https://github.com/user-attachments/assets/43f61335-8eff-491b-a297-1953d17bbfc0" />
<img width="259" height="57" alt="image" src="https://github.com/user-attachments/assets/598618a3-e52f-4a4e-b790-2c8d5f1b4c77" />

r? `@GuillaumeGomez`
…=Kobzol

citool: cleanup `mismatched_lifetime_syntaxes` warnings

Those lifetimes are implicit earlier in the same signature, and should not be hidden in the output type.
@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Aug 23, 2025
@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Aug 23, 2025
@samueltardieu
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 23, 2025

📌 Commit 223c3d7 has been approved by samueltardieu

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 Aug 23, 2025
@samueltardieu
Copy link
Member Author

Closing in favor of #145796
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 23, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 23, 2025
@samueltardieu samueltardieu deleted the rollup-9jzvwkl branch August 23, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.