Rollup of 10 pull requests#159422
Closed
JonathanBrouwer wants to merge 24 commits into
Closed
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
…type diverges a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding, and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there. fixes rust-lang#106993
There is now only a single "module asm", not one before each line.
The assume here is not really relevant to the purpose of the test, and it's position changed in LLVM 23.
Codegen changed in: llvm/llvm-project@66c1b6f
This doesn't optimize as desired since: llvm/llvm-project@21f439f
These now have additional !guid metadata.
See RUST-159073, this test has been flaky with ``` /checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file: Couldn't write extended state status: Bad address. ``` on linux CI jobs under various environments and hosts/targets. I tried running this under GDB 15.1 locally (WSL, `x86_64-unknown-linux-gnu`) but could not reproduce. CI typically uses GDB 12.1 with Ubuntu 22.04. So gate this test with min GDB 15.1 which prevents it from running in CI to workaround the flakiness but still allow running it locally under GDB >= 15.1. It's *possible* there's a genuine problem here.
On Arm64EC the variadic portion of a c-variadic call must follow the MS x64 ABI: any argument that does not fit in 8 bytes, or whose size is not 1, 2, 4, or 8 bytes, is passed by reference. rustc's `va_arg` implementation already reads such arguments indirectly, but the caller side in `aarch64::compute_abi_info` passed a scalar `i128` by value (it is not an aggregate, so it bypassed `classify_arg`). The callee then dereferenced the inline value as a pointer, causing an access violation (0xC0000005) at runtime. Mark variadic-tail arguments larger than 8 bytes, or whose size is not a power of two, as indirect on Arm64EC so the caller and the `va_arg` reader agree. Fixed arguments are unaffected: a fixed `i128` is still passed by value, matching MSVC and Clang. Add a codegen test verifying that a variadic `i128` is passed as a pointer while a fixed `i128` is passed by value.
Forwards `clone_from` to `DenseBitSet`'s manual implementation. I don't believe this is currently used but I think it doesn't hurt, since it could be a small performance footgun.
We deprecated these awhile ago, and now all the usages are changed.
…rn-position, r=estebank fix: point at method call chain when a return-position `impl Trait` assoc type diverges a mismatch on `-> impl Iterator<Item = Ty>` only pointed at the signature, not at the call in the returned chain where `Item` actually changed. the failed predicate is useless for this, its already rewritten through the impls it was derived from, so the expected assoc types are read from the opaques own bounds and probed against the returned expression. on divergence the existing `point_at_chain` walk kicks in, same as it does for function arguments. handles the chain at the tail expression, behind a `let` binding and derived through adapters like `flatten`. unrelated failures stay silent since the probe just doesnt resolve there. fixes rust-lang#106993 r? @estebank
…jake Clarify safety requirements for SIMD shl/shr and masked load/store This PR fixes some safety documentation of SIMD functions. These functions are talked in Zulip topic: [Maybe some safety doc need fixs in intrinsics::simd](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Maybe.20some.20safety.20doc.20need.20fixs.20in.20intrinsics.3A.3Asimd/with/609693756). Brief explanation: `simd_shl` and `simd_shr` may accept a `rhs` of negative value, but that value will be interpreted as unsigned and thus violate the requirement that `rhs` is less than `<int>::BITS`. So it's better to add a supplement that `rhs` must be in 0..`<int>::BITS`. Also, the `simd_shl` refer that `shifting in sign bits for signed types`, but left shift always shifts in zero bits. And `simd_masked_load` and `simd_masked_store` need to explicitly state that the corresponding `ptr` must be readable/writable as if by `ptr::read/write`, refering to [portable-simd::core_simd::load_select_ptr](https://doc.rust-lang.org/src/core/portable-simd/crates/core_simd/src/vector.rs.html#451) and [portable-simd::core_simd::store_select_ptr](https://doc.rust-lang.org/src/core/portable-simd/crates/core_simd/src/vector.rs.html#710)
…ypes, r=GuillaumeGomez rustdoc: remove old `--emit` types We deprecated these awhile ago, and now all the usages are changed.
…hanna-kruppe Implement `Debug` helpers via `Cell` Related to rust-lang#149745, but does not fix it (yet). Following @jmillikin's [suggestion](rust-lang#159302 (comment)), the builder logic now lives in the pre-existing non-generic methods taking `&dyn fmt::Debug` (where it used to exist), and each `*_with` method wraps its closure in a private `DebugOnce` struct that implements `Debug` by calling the closure, so the body is compiled once. Just for context: A `dyn FnOnce` [can't be called behind a reference](rust-lang#149745 (comment)), hence the `Cell<Option<..>>` stuff in `DebugOnce`. ###### repro.rs ```rust #![feature(debug_closure_helpers)] #![crate_type = "lib"] use core::fmt; pub struct Point { pub x: u32, pub y: u32, } impl fmt::Debug for Point { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Point") .field_with("x", |f| self.x.fmt(f)) .field_with("y", |f| self.y.fmt(f)) .finish() } } ``` ```bash rustc +nightly --edition=2024 --emit=llvm-ir -Copt-level=0 -o before.ll repro.rs rustc +stage1 --edition=2024 --emit=llvm-ir -Copt-level=0 -o after.ll repro.rs ``` On the repro above, I saw the LLVM IR drop from 739 to 268 lines (an earlier version of this PR using `&mut dyn FnMut` measured 372). Since the stable `&dyn fmt::Debug` methods no longer go through any closure indirection, this should also avoid the potential runtime regression in the `derive(Debug)` microbenchmark. This was the only remaining [blocker](rust-lang#117729 (comment)) for stabilizing `debug_closure_helpers`, so it should unblock rust-lang#146099.
…fJung add a fallback for `fmuladdf*` tracking issue: rust-lang#151770 The `fmuladd` intrinsics were added in rust-lang#124874, since then they don't appear to really be used anywhere. The gcc and cranelift backends don't really have support for them, especially not for `f16` and `f128`. r? RalfJung (because intrinsics, but also to just check this does not negatively interact with miri: it shouldn't, and miri should continue to roll the dice on whether to fuse or not)
Update tests for LLVM 23 Fixes rust-lang#158880. Fixes rust-lang#158572. Fixes rust-lang#156050. One test is disabled on LLVM 23, because it's no longer optimized as expected. Tracked in rust-lang#154141 and llvm/llvm-project#209216.
Update books ## rust-lang/book 2 commits in dd7ab4f4f4541adf4aa2a872cdac06c206b73288..917544888a55e4da7109bdba8c88c893c0da70f4 2026-07-14 01:25:25 UTC to 2026-07-14 01:19:11 UTC - Fix grammatical typo in Chapter 17-05 (rust-lang/book#4754) - hotfix: incorrect link format used in ch17-06 (rust-lang/book#4797) ## rust-lang/edition-guide 1 commits in 53686db907c45268d1b323afd9a3545a37abbced..5a14f7276ebc0bd100974f02b918f30472c782fc 2026-07-16 15:01:27 UTC to 2026-07-16 15:01:27 UTC - Fix failing test due to invalid_runtime_symbol_definitions (rust-lang/edition-guide#386)
…ll, r=workingjubilee Gate `tests/debuginfo/function-call.rs` on min GDB 15.1 ## Summary See rust-lang#159073, this test has been flaky with ``` /checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file: Couldn't write extended state status: Bad address. ``` on linux CI jobs under various environments and hosts/targets. I tried running this under GDB 15.1 locally (WSL, `x86_64-unknown-linux-gnu`) but could not reproduce. CI typically uses GDB 12.1 with Ubuntu 22.04. So gate this test with min GDB 15.1 which prevents it from running in CI to workaround the flakiness but still allow running it locally under GDB >= 15.1. It's *possible* there's a genuine problem here, but this looks like a deep debugging rabbit hole so let's not run this test in CI for now to not have the frequent flakiness. Revert this PR if we figure out where the problem lies. ## Additional context Also asked in [#t-compiler > &rust-lang#96;tests/debuginfo/function-call.rs&rust-lang#96; + gdb recently flaky](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/.60tests.2Fdebuginfo.2Ffunction-call.2Ers.60.20.2B.20gdb.20recently.20flaky/with/611111005).
…tdev [aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC On Arm64EC the variadic portion of a c-variadic call must follow the MS x64 ABI: any argument that does not fit in 8 bytes, or whose size is not 1, 2, 4, or 8 bytes, is passed by reference. rustc's `va_arg` implementation already reads such arguments indirectly, but the caller side in `aarch64::compute_abi_info` passed a scalar `i128` by value (it is not an aggregate, so it bypassed `classify_arg`). The callee then dereferenced the inline value as a pointer, causing an access violation (0xC0000005) at runtime. Mark variadic-tail arguments larger than 8 bytes, or whose size is not a power of two, as indirect on Arm64EC so the caller and the `va_arg` reader agree. Fixed arguments are unaffected: a fixed `i128` is still passed by value, matching MSVC and Clang. Add a codegen test verifying that a variadic `i128` is passed as a pointer while a fixed `i128` is passed by value.
…kingjubilee Manually implement Clone for GrowableBitSet Forwards `clone_from` to `DenseBitSet`'s manual implementation. I don't believe this is currently used but I think it doesn't hurt, since it could be a small performance footgun.
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 17, 2026
Rollup of 10 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-*
Contributor
|
⌛ Testing commit 8d649f9 with merge 3ac07ba... Workflow: https://github.com/rust-lang/rust/actions/runs/29561560449 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 17, 2026
…uwer Rollup of 10 pull requests Successful merges: - #159365 (fix: point at method call chain when a return-position `impl Trait` assoc type diverges) - #159402 (Clarify safety requirements for SIMD shl/shr and masked load/store) - #159410 (rustdoc: remove old `--emit` types) - #159302 (Implement `Debug` helpers via `Cell`) - #159386 (add a fallback for `fmuladdf*`) - #159391 (Update tests for LLVM 23) - #159400 (Update books) - #159401 (Gate `tests/debuginfo/function-call.rs` on min GDB 15.1) - #159404 ([aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC) - #159405 (Manually implement Clone for GrowableBitSet)
Contributor
Contributor
Author
|
Seems stuck, the job did succeed quickly in the try jobs so spurious? |
Contributor
|
This pull request was unapproved due to being closed. Auto build was cancelled due to the PR being closed. Cancelled workflows: |
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.
Successful merges:
impl Traitassoc type diverges #159365 (fix: point at method call chain when a return-positionimpl Traitassoc type diverges)--emittypes #159410 (rustdoc: remove old--emittypes)Debughelpers viaCell#159302 (ImplementDebughelpers viaCell)fmuladdf*#159386 (add a fallback forfmuladdf*)tests/debuginfo/function-call.rson min GDB 15.1 #159401 (Gatetests/debuginfo/function-call.rson min GDB 15.1)r? @ghost
Create a similar rollup