Automatic Rustup - #5257
Closed
workflows-miri[bot] wants to merge 24 commits into
Closed
Conversation
Convert `tests/debuginfo/pretty-std.rs` to `lldb-repr` Two things of note: * I had to fix another small issue with msvc template args * Enabling this test on `windows-gnu` caused the GDB test to fail because GDB decodes the emoji to raw bytes when working with wtf-8 strings. There's not an easy way to handle wtf-8 in python i think? So i just replaced the emoji with a wildcard. The target-specific differences should also fix itself once `gdb-repr` is implemented r? @jieyouxu, @Kobzol --- try-job: aarch64-apple* try-job: aarch64-apple-macos-26*
…jgillot
Simplify `MaybeBorrowedLocals`
It is implemented as a `Visitor`, but it only uses `visit_statement`, `visit_terminator`, and `visit_rvalue`. Visiting statements and terminators is trivial without a `Visitor`, and visiting rvalues is almost as easy because they can only appear at the top-level of a `StatementKind::Assign`. So a `Visitor` is overkill, because we don't have to worry about nesting (like we would with expressions, for example).
So this commit restructures `MaybeBorrowedLocals` to not use a `Visitor`, which makes the analysis shorter and simpler. `gen_statement` and `gen_terminator` are added to do most of the work, and are called from several places. They are similar to the equivalent `visit_*` methods but `gen_statement` doesn't do any kills. So how are kills for statements handled?
- In `Self::apply_primary_statement_effect` we now explicitly kill (on a `StorageDead` stmt) after calling `gen_statement`.
- `borrowed_locals` doesn't do kills; in fact it currently has its own custom `GenKill` to avoid killing anything. So `gen_{statement,terminator}` are enough for it.
- `MaybeRequiresStorage::apply_early_statement_effect` already has an explicit kill. (I.e. it killed each local a second time, after calling the transfer function.)
r? @cjgillot
Assorted bootstrap LLVM refactors (part 2/N) Continuation of rust-lang/rust#160645. This PR removes dependence on implicit LLVM CI paths, and generally tries to make depending on various LLVM things more explicit wherever possible. One nice outcome of that is that we no longer override the LLVM config during config parsing when using `download-ci-llvm` 🎉 We also no longer dynamically download LLVM from CI when someone asks what is the LLVM linkage mode, lol (well, we still need to do it in a few places, but now at least it is explicit). I tried to ensure that `x check compiler` does not build or even checkout the LLVM submodule. That being said, there might be some cases where calling `get_llvm_build_status` might now checkout the LLVM submodule (but it shouldn't happen for `x test mir-opt --bless`, which was fixed in rust-lang/rust#130918 - that PR introduced a boolean flag, but it was difficult to understand where it should be set to `false`/`true`). The next thing after this is to try getting rid of the `llvm_out` function, though that will be probably quite painful. And also explicitly depending on the output of `LlvmFromCi`, rather than reading `llvm_ci_mode`. I printed some step traces using commands like this: ``` BOOTSTRAP_TRACING=STEP=trace BOOTSTRAP_TRACING_SKIP_TIME=1 ./x build compiler 2> post-cg_default-build-compiler.txt ``` with this PR and on `main`. The `BOOTSTRAP_TRACING_SKIP_TIME` thing was added in the first commit to make it easier to compare step traces. But later I realized that we should also normalize source code locations of the steps, otherwise if you modify something in a given file with the step, its location will change and it will perturb the diff. Anyway, I can drop the first commit if you want. Best reviewed commit-by-commit (in fact I don't think it can be really reviewed in another way, lol). r? jieyouxu
Upgrade and deduplicate dependencies - Upgrade from `getrandom v0.4.2` to `v0.4.3` to drop its `wasip2` and `wasip3` dependencies and many transitives. - Upgrade from `gimli v0.33` to `v0.34` as a direct dependency and through a `thorin-dwp` upgrade. - Upgrade from `object v0.37` and `v0.38` to `v0.39` as a direct dependency and via `ar_archive_writer` and `thorin-dwp` upgrades. - Upgrade `libloading` and `wasmparser` to match other dependencies. This also consolidates from `hashbrown v0.15`, `v0.16`, and `v0.17` to just `v0.17.1`, which is the same that `std` currently uses.
Library: enforce clippy deref lints in CI Best reviewed commit by commit. The output is from `clippy --fix` but I've reviewed the changes and am feeling confident there are no behaviour changes. Still, a second pair of eyes would be useful.
std: fix unix socket address truncation without a trailing NUL getsockname(2) and friends do not count the trailing NUL in the length they report on freebsd, netbsd and qnx, and a caller may bind(2) without one anywhere, so shortening the path by one byte dropped its last character. scan for the NUL within the reported length instead, which is the rule unix(7) gives and subsumes the qnx case the old cfg handled. Fixes rust-lang/rust#118925
[CI] Build newer `binutils` before building `gcc` Hopefully will unblock the GCC sync. This PR builds a newer `binutils`, unlocking all blocked `gcc` features that we need. Needs rust-lang/ci-mirrors#55 to be merged first. r? @Kobzol
…jieyouxu Add documentation for BPF targets BPF targets, despite being Tier 3, were lacking documentation. Add it, describing how the targets work. Nominate @nagisa and myself as maintainers.
std: guard against unwinds in queue-based `Once` While the public `thread::park` guards against unwinds, the inner `Thread::park` method does not. In the unlikely but plausible scenario that it did, this would lead to undefined behaviour in the queue-based `Once`; a thread's waiter node must be removed from the list before it can be freed. To fix this, promote unwinds to aborts, just like the queue-based `RwLock` [does](https://github.com/rust-lang/rust/blob/874e6f2a533b28b77892709ba774614a96686840/library/std/src/sys/sync/rwlock/queue.rs#L428-L429).
miri subtree update Subtree update of `miri` to ac0adc4. Created using https://github.com/rust-lang/josh-sync. r? @ghost
…crum
std: retry waitid on EINTR in the pidfd wait path
The pidfd-backed `Child::wait()` and `try_wait()` share a `waitid` helper that calls `waitid` through plain `cvt`, so an `EINTR` reaches the caller as `ErrorKind::Interrupted`. The legacy `waitpid` path that the pidfd path stands in for retries instead: `wait()` there uses `cvt_r`. So a child spawned with a pidfd can see `Interrupted` from `wait()` where the same call without one wouldn't.
Both callers go through the one helper, so this wraps the `waitid` call in `cvt_r` to match the legacy `wait()`:
```rust
let r = cvt_r(|| unsafe {
libc::waitid(libc::P_PIDFD, self.0.as_raw_fd() as u32, &mut siginfo, options)
});
```
For the blocking `wait()` that's the fix. `try_wait()` passes `WNOHANG`, and `waitid` only returns `EINTR` when it isn't set, from
[`wait(2)`](https://www.man7.org/linux/man-pages/man2/wait.2.html#ERRORS):
> EINTR WNOHANG was not set and an unblocked signal or a SIGCHLD was caught; see signal(7).
I didn't add a test, since landing an `EINTR` in the wait window needs a signal to arrive at the right moment and isn't practical to reproduce.
r? libs
…nder_sugg, r=mejrs diagnostics: Suggest fn binding type for unstable closure for<> binders Fixes rust-lang/rust#160431 `for<'a> |x: &'a T| -> U { ... }` currently just says "consider removing for<...>", which idk is kinda useless when someone landed there while fighting HRTB errors. This rewrites the obvious case to `let cl: for<'a> fn(...) = |x| { ... }` instead. Visitor emits the gate so we have AST context for the rewrite, and we still keep a pre-expansion fallback for `#[cfg(false)]` etc. MachineApplicable only when we're pretty sure: by-value bindings, lifetime-only unbounded binders, no `_` in the sig, no macro expansion. Capture checking is a conservative single-segment free-path heuristic since this runs pre-resolution/pre-typeck; when that looks uncertain we fall back to MaybeIncorrect (or just "consider removing"). imo that's the right tradeoff here: better a maybe-wrong help than rustfix auto-applying into E0308. fyi free-fn / `None` / `Some` cases also hit MaybeIncorrect for the same reason. ltm if the heuristic feels too conservative and y'all want it tightened later.
Add regression test for borrow of array drop type in const Closes rust-lang/rust#86672
Add regression test for path printing with infinitely many visible names Closes rust-lang/rust#57500
Add regression test for unstable def_ident_span fingerprint with incremental recompilation Closes rust-lang/rust#95945
cleanup: rip out unnecessary `iter().last()` and `iter().next()` Continuation of rust-lang/rust#145402
Add BPF test for Rust ABI stack arguments
Switch to c8a EC2 runner for auto merges I *think* this is the only line that needs changing to switch? I expect we'll want to clean up the codebuild stuff, but I think it makes sense to leave it in place until this has merged successfully and run for a few weeks. r? Kobzol
[rustdoc] Put back one removed flaky GUI test (which hopefully isn't flaky anymore) Part of rust-lang/rust#152197 You can see the original code of this test in rust-lang/rust#152194 (where it was removed). The `browser-ui-test` update comes from GuillaumeGomez/browser-UI-test#759. We can now use the `click` command to click on an `option` inside a `select` (surprisingly enough, it needs to be special-cased in puppeteer...). That update allowed me to replace all the `press-key` with one `click`. Starting from this change, I couldn't reproduce the failure, so hopefully it's gone. cc @notriddle @JonathanBrouwer r? @Urgau
Add back flaky gui rustdoc test `tests/rustdoc-gui/headers-color.goml` Part of rust-lang/rust#152197. This PR adds back `tests/rustdoc-gui/headers-color.goml` with a little tweak: instead of using `go-to` command to change the focused element, we click on the anchors. r? @Urgau
…uwer Rollup of 17 pull requests Successful merges: - rust-lang/rust#161017 (Library: enforce clippy deref lints in CI) - rust-lang/rust#160416 (std: fix unix socket address truncation without a trailing NUL) - rust-lang/rust#161006 ([CI] Build newer `binutils` before building `gcc`) - rust-lang/rust#161141 (Add documentation for BPF targets) - rust-lang/rust#161157 (bootstrap: Move several items out of the crate root) - rust-lang/rust#161185 (std: guard against unwinds in queue-based `Once`) - rust-lang/rust#161186 (miri subtree update) - rust-lang/rust#159855 (std: retry waitid on EINTR in the pidfd wait path) - rust-lang/rust#160478 (diagnostics: Suggest fn binding type for unstable closure for<> binders) - rust-lang/rust#161053 (Add regression test for borrow of array drop type in const) - rust-lang/rust#161073 (Add regression test for path printing with infinitely many visible names) - rust-lang/rust#161099 (Add regression test for unstable def_ident_span fingerprint with incremental recompilation) - rust-lang/rust#161103 (cleanup: rip out unnecessary `iter().last()` and `iter().next()`) - rust-lang/rust#161136 (Add BPF test for Rust ABI stack arguments) - rust-lang/rust#161146 (Switch to c8a EC2 runner for auto merges) - rust-lang/rust#161148 ([rustdoc] Put back one removed flaky GUI test (which hopefully isn't flaky anymore)) - rust-lang/rust#161181 (Add back flaky gui rustdoc test `tests/rustdoc-gui/headers-color.goml`)
This updates the rust-version file to 2c39ff499469be916d4e45506d1afed69bbaddb7.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@2c39ff4 Filtered ref: 6a102d2 Upstream diff: rust-lang/rust@67854e5...2c39ff4 This merge was created using https://github.com/rust-lang/josh-sync.
This was referenced Aug 17, 2026
Closed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge ref '2c39ff499469' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: rust-lang/rust@2c39ff4
Filtered ref: 6a102d2
Upstream diff: rust-lang/rust@67854e5...2c39ff4
This merge was created using https://github.com/rust-lang/josh-sync.