Skip to content

Conversation

@github-actions
Copy link

Please close and re-open this PR to trigger CI, then enable auto-merge.

bors and others added 20 commits July 8, 2025 06:32
Use `join_with_double_colon` in `write_shared.rs`.

For consistency. Also, it's faster because `join_with_double_colon` does a better job estimating the allocation size than `join` from `itertools`.

r? `@camelid`
…ss35

Simplify num formatting helpers

Noticed `ilog10` was being open-coded when looking at this diff: https://github.com/rust-lang/rust/pull/143423/files/85d6768f4c437a0f3799234df20535ff65ee17c2..76d9775912ef3a7ee145053a5119538bf229d6e5#diff-6be9b44b52d946ccac652ddb7c98146a01b22ea0fc5737bc10db245a24796a45
That, and two other small cleanups 😁

(should probably go through perf just to make sure it doesn't regress formatting)
Apply effects to `otherwise` edge in dataflow analysis

This allows `ElaborateDrops` to remove drops when a `match` wildcard arm covers multiple no-Drop enum variants. It modifies dataflow analysis to update the `MaybeUninitializedPlaces` and `MaybeInitializedPlaces` data for a block reached through an `otherwise` edge.

Fixes rust-lang/rust#142705.
Remove false label when `self` resolve failure does not relate to macro

Fixes rust-lang/rust#143134

In the first commit, I did some code-clean, moving `suggest*` to `suggestions/` dir.
In the second, commit, I added ui test.
In the third, I change the code, and present the test result.

r? compiler
Respect endianness correctly in CheckEnums test suite

The endianness can change the test expectation for the enum check. This change is fixing the failing tests on big endian by changing the tests so that they behave the same as on little endian.

Fixes rust-lang/rust#143332.
clippy fix: indentation

Fixes indentation of markdown comments.
tests: Use `cfg_target_has_reliable_f16_f128` in `conv-bits-runtime-const`

`conv-bits-runtime-const` gates `f16` and `f128` tests behind `x86_64`, but this isn't always accurate. In particular, x86 `MinGW` has an ABI bug [1] which means things work when linked to our Rust math libraries but don't work with host libraries. RUST-143405 slightly adjusts which targets we provide `f16` and `f128` symbols for and effectively removes MinGW from that list, meaning host libraries start getting linked, meaning `f16` and `f128` tests start to fail.

Account for this by changing the gates in one such test to `cfg(target_has_reliable_{f16,f128})` which is the way we should be gating all behavior related to the types going forward.

`rustfmt` also seems to have formatted the macros which is fine.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054
…dtwco

Don't call `predicates_of` on a dummy obligation cause's body id

See the test for a brief explanation

Fixes rust-lang/rust#143481.
Fix perf regression caused by tracing

See rust-lang/rust#143334, this is another alternative that may be worth benchmarking as suggested in rust-lang/rust#143334 (comment).

r? ``@RalfJung``
More carefully consider span context when suggesting remove `&mut`

Use `find_ancestor_inside` to compute a relative span that is macro-aware, rather than falling back to using BytePos arithmetic which is wrong for `&mut`.

Fixes rust-lang/rust#143523
configure.py: Write last key in each section

The loop that writes the keys in each section of bootstrap.toml accumulates all the commented lines before a given key and emits them when it reaches the next key in the section.  This ends up dropping lines accumulated for the last key

Fixes rust-lang/rust#143605
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#142357 (Simplify LLVM bitcode linker in bootstrap and add tests for it)
 - rust-lang/rust#143177 (Remove false label when `self` resolve failure does not relate to macro)
 - rust-lang/rust#143339 (Respect endianness correctly in CheckEnums test suite)
 - rust-lang/rust#143426 (clippy fix: indentation)
 - rust-lang/rust#143475 (tests: Use `cfg_target_has_reliable_f16_f128` in `conv-bits-runtime-const`)
 - rust-lang/rust#143499 (Don't call `predicates_of` on a dummy obligation cause's body id)
 - rust-lang/rust#143520 (Fix perf regression caused by tracing)
 - rust-lang/rust#143532 (More carefully consider span context when suggesting remove `&mut`)
 - rust-lang/rust#143606 (configure.py: Write last key in each section)

r? `@ghost`
`@rustbot` modify labels: rollup
`rustc_pattern_analysis`: always check that deref patterns don't match on the same place as normal constructors

In rust-lang/rust#140106, deref pattern validation was tied to the `deref_patterns` feature to temporarily avoid affecting perf. However:
- As of rust-lang/rust#143414, box patterns are represented as deref patterns in `rustc_pattern_analysis`. Since they can be used by enabling `box_patterns` instead of `deref_patterns`, it was possible for them to skip validation, resulting in an ICE. This fixes that and adds a regression test.
- External tooling (e.g. rust-analyzer) will also need to validate matches containing deref patterns, which was not possible. This fixes that by making `compute_match_usefulness` validate deref patterns by default.

In order to avoid doing an extra pass for anything with patterns, the second commit makes `RustcPatCtxt` keep track of whether it encounters a deref pattern, so that it only does the check if so. This is purely for performance. If the perf impact of the first commit is negligible and the complexity cost introduced by the second commit is significant, it may be worth dropping the latter.

r? `@Nadrieril`
Let `rvalue_creates_operand` return true for *all* `Rvalue::Aggregate`s

~~Draft for now because it's built on Ralf's rust-lang/rust#143291~~

Inspired by rust-lang/rust#138759 (comment) where I noticed that we were nearly at this point, plus the comments I was writing in rust-lang/rust#143410 that reminded me a type-dependent `true` is fine.

This PR splits the `OperandRef::builder` logic out to a separate type, with the updates needed to handle SIMD as well.  In doing so, that makes the existing `Aggregate` path in `codegen_rvalue_operand` capable of handing SIMD values just fine.

As a result, we no longer need to do layout calculations for aggregate result types when running the analysis to determine which things can be SSA in codegen.
Instantiate auto trait/`Copy`/`Clone`/`Sized` before computing constituent types binder

This makes the binder logic w.r.t. coroutines a bit simpler.

r? lcnr
Update the `compiler-builtins` subtree

Update the Josh subtree to rust-lang/compiler-builtins@8aba4c899ee8.

r? `@ghost`
@rustbot rustbot closed this Jul 10, 2025
@rustbot rustbot reopened this Jul 10, 2025
@RalfJung RalfJung enabled auto-merge July 10, 2025 06:33
@RalfJung RalfJung added this pull request to the merge queue Jul 10, 2025
Merged via the queue into master with commit aecc469 Jul 10, 2025
13 checks passed
@RalfJung RalfJung deleted the rustup-2025-07-10 branch July 10, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants