Skip to content

Rollup of 5 pull requests - #162532

Merged
rust-bors[bot] merged 45 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-ovIus25
Sep 9, 2026
Merged

Rollup of 5 pull requests#162532
rust-bors[bot] merged 45 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-ovIus25

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

bjorn3 and others added 30 commits August 19, 2026 19:39
so that we can specify more than one i32 of padding.
Remove LD_STATIC_TLS_EXTRA workaround from FreeBSD CI
make `pad_i32` of `PassMode::cast` an integer

so that we can specify more than one i32 of padding. This PR only adds the functionality but does not yet use it: there should be no functional changes.

This is needed for the ABI of `Complex<{ float }>` on 32-bit powerpc. Other mechanisms, e.g. using `PassMode::prefixed` don't appear to work.

More discussion is in [#t-compiler/help > power complex abi](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/power.20complex.20abi/with/613294420).
Co-Authored-By: Mads Marquart <mads@marquart.dk>
…ptions to help message

The `query-cache-hit-count` option was forgotten to be added to the help text when it was added.

The new help text also documents which of the options are part of `default`,
and now conveys the information that `args` is also a compound/group option as well as what it contains.
* Implement Reborrow as a recursive operation

If Reborrow finds '&'a mut T' fields then it inserts
a Deref and borrow of the T, and likewise if it finds a
'T: Reborrow' field then the field type is recursed into.

This makes Reborrow always produce the correct borrow checking logic at
the cost of most probably being inconsiderately expensive. The thinking
is that performance will be a followup consideration.
* PhantomDeref
* Simpler deref test

* Add more PhantomDeref unreachability assertions
* Write out lifetime omission
* Document ProjectionElem::PhantomDeref
* Comment half of reborrow tests
* fix PhantomDeref conflicting with AccessDepth::Shallow
* Recheck CoerceShared in borrowck TypeChecker to ensure its lifetimes make sense
* Fix rebase
* Changes... but where to?
* Typo fix

* Improve comment
* Use fully_perform_op to evaluate CoerceShared trait in borrowck
* More CoerceShared comment
* Comment rest of Reborrow tests

Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
…ce, r=oli-obk

fix(reborrow): recursive implementation

If Reborrow finds '&'a mut T' fields where 'a is the Reborrowed type's first lifetime parameter (currently the only lifetime that is allowed to reborrow) then it inserts a Deref and borrow of the T, and likewise if it finds a 'T: Reborrow' field then the field type is recursed into.

This makes Reborrow always produce the correct borrow checking logic at the cost of most probably being inconsiderately expensive. The thinking is that performance will be a followup consideration.

r? @oli-obk
I added this flag back in 2017 to enable benchmarking of the saturating
semantics when it was newly implemented and still experimental. But
saturation has been the official semantics for float<->int `as` casts
for years now. A flag for turning it off no longer serves any purpose,
it's just `-Zplease-miscompile-casts` now.
…eature, r=Amanieu

support `#[target_feature(enable = ...)]` on `#[naked]` functions

fixes rust-lang#136280

Instructions that are part of a target feature require a special directive on some targets. This PR adds those for the most common targets.

This is very WIP, but I'm hoping to collect some feedback on what is (not) supported and how to report that to users.

r? @ghost

cc @taiki-e @Amanieu
…ncs, r=folkertdev

Make sin, cos, exp, exp2, log, log2, log10 generic

Rebased and smaller version of rust-lang#153934

Following `fabs`, make the `sin`, `cos`, `exp`, `exp2`, `log`, `log2` and `log10` intrinsics generic over the float type, rather than having four variants per float type.

The first two commits are purely stylistic:
- reorganised Cranelift code to make following changes simpler
- moved a misplaced comment in `compiler/rustc_codegen_llvm/src/intrinsic.rs` that caused `x fmt` to give up

The last commit actually makes them generic! Most code is a bit simpler, ~~and this will also hopefully simplify adding support for these intrinsics for the future [`bf16` type](rust-lang#160859 :)

Unfortunately both GCC and Cranelift backend changes are a bit churny. Their code is a bit, opaque, to put it kindly, and I didn't want to refactor those here.

r? @folkertdev
cc @RalfJung
…RalfJung

Remove -Zsaturating-float-casts flag

I added this flag back in 2017 (rust-lang#45205) to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
Facilitates scalable vector support in inline assembly.
…O is enabled

The parallel frontend makes the cookies nondeterministic in their
current form, resulting in nondeterministic outputs when bitcode is
emitted or LTO is used.

Causes minor diagnostic regression for inline asm in release builds.
nnethercote and others added 11 commits September 8, 2026 15:25
We have `DiagCtxt`, `DiagCtxtInner`, and `DiagCtxtHandle`. They're all
necessary, but the method placement is inconsistent. This commit
establishes a clearer rule: methods should *not* go on `DiagCtxt`
whenever possible.

Benefits:

- Simpler rule for deciding where to put a method.

- `impl Deref for DiagCtxtHandle` can be removed, including its
  non-standard double-reference `&&'a DiagCtxt` return value.
  This makes it impossible to accidentally discard a taint target by
  calling `handle` on a `DiagCtxtHandle`.

- Catches some places where we were calling `dcx.handle()` when `dcx`
  was already a handle.
This makes their test environment consistent between runs inside the
cg_clif and rust repos.
…bjorn3

Subtree sync for rustc_codegen_cranelift

The main highlight this time is an update to Cranelift 0.135, which should fix crates like linkme on macOS.

r? @ghost

@rustbot label +A-codegen +A-cranelift +T-compiler +subtree-sync
miri: enforce proper types for c-variadic arguments in shims

This adds proper type checks for c-variadic argument handling in Miri shims. So far we would have ICEd for many type mismatches since the innards of the interpreter generally assume that things are well-typed. The checks we are using are the same as for [`next_arg`](https://doc.rust-lang.org/nightly/std/ffi/struct.VaList.html#method.next_arg).

This uncovered some interesting points:
-  We should accept `&mut` as equivalent to `*mut`. We don't allow `&mut` as a type in `next_arg` but we do allow it for c-variadic calls, so this change also affects a bit more code in const-eval (if the caller passes an `&mut` and the callee expects a `*mut`). Even CFI is okay with treating `&mut` and `*mut` as equivalent so this should be fine. Cc @folkertdev
- Some places in the standard library futex handling used types for their variadic arguments that are not quite correct according to these rules. I fixed those. Cc @m-ou-se
- One variadic function takes pointers to `libc::timespec`. A program with a libc dependency has two copies of libc (one in the sysroot, and the normal dependency). When Miri looks up the expected argument type, it picks one of them, leading to Miri seeing a type mismatch when there is a call using the other copy. C generally considers two copies of the same type to be identical, so I implemented logic that does the same: two `repr(C)` types are "identical" if the names of the types, and the names and types of all fields, are identical. I then also used that logic for the normal ABI checks, where it will also help since we had similar trouble there in the past (that we had to find other work-arounds for).
…, r=tiif

Add missing option to `-Zself-profile-event` help message as well as information about what the default options are

The `query-cache-hit-count` option was forgotten to be added to the help text when it was added.

The new help text also documents which of the options are part of `default`, and now conveys the information that `args` is also a compound/group option and what it contains.
…r=oli-obk

Minimize `DiagCtxt` methods

We have `DiagCtxt`, `DiagCtxtInner`, and `DiagCtxtHandle`. They're all necessary, but the method placement is inconsistent. This commit establishes a clearer rule: methods should *not* go on `DiagCtxt` whenever possible.

Benefits:

- Simpler rule for deciding where to put a method.

- `impl Deref for DiagCtxtHandle` can be removed, including its non-standard double-reference `&&'a DiagCtxt` return value. This makes it impossible to accidentally discard a taint target by calling `handle` on a `DiagCtxtHandle`.

- Catches some places where we were calling `dcx.handle()` when `dcx` was already a handle.

r? @oli-obk
…docs, r=oli-obk

Add a mention to docs about promoting and demoting platform support

I wanted to jump from the target support page and learn about how these targets are promototed/demoted but couldn't find a direct link for that.

Would it make sense to link the (great) [forge docs](https://forge.rust-lang.org/compiler/proposals-and-stabilization.html#targets) about that?

r? @jieyouxu

No LLM was harmed when writing these 2 sentences.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 9, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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. labels Sep 9, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 20886ac has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 9, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 9, 2026
@rust-bors

rust-bors Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 3m 58s
Pushing 88acefd to main...

@rust-bors
rust-bors Bot merged commit 88acefd into rust-lang:main Sep 9, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 55c4dfe (parent) -> 88acefd (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 88acefdf6c6b4ddaab64e27299c3b191b4ffdc32 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-pr-check-1: 22m 22s -> 44m 1s (+96.8%)
  2. test-x86_64-gnu-gcc-core-tests: 11m 29s -> 18m 41s (+62.7%)
  3. test-x86_64-gnu-next-trait-solver-polonius: 42m 19s -> 1h 5m (+54.2%)
  4. dist-x86_64-llvm-mingw: 1h 35m -> 2h 20m (+47.6%)
  5. test-x86_64-gnu-llvm-21: 40m 31s -> 59m 44s (+47.4%)
  6. test-x86_64-rust-for-linux: 42m 19s -> 1h 1m (+45.1%)
  7. test-x86_64-msvc-ext2: 1h 16m -> 1h 47m (+40.9%)
  8. test-x86_64-gnu-llvm-21-3: 1h 26m -> 1h 57m (+36.0%)
  9. test-x86_64-gnu-stdlib-semver-check: 13m 40s -> 17m 59s (+31.6%)
  10. test-x86_64-gnu-nopt: 2h 31m -> 1h 47m (-28.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-bors

rust-bors Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#162470 Subtree sync for rustc_codegen_cranelift 45fae0991ba4f6f73968d75c0093e9461bb10b86
(link)
#161734 miri: enforce proper types for c-variadic arguments in shims cc36e9feacd58af1c97a8dd22585e5cd67511876
(link)
#161821 Add missing option to -Zself-profile-event help message a… c1d5598fdc6689084c2398fd542933bca0bfbec1
(link)
#162453 Minimize DiagCtxt methods 687b830b9224cb430c01fd4ae672efc4d37e0665
(link)
#162528 Add a mention to docs about promoting and demoting platform… ac2a228119550fe0748422411950043fd4a0c161
(link)

parent commit: 55c4dfed75

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (88acefd): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [0.8%, 0.8%] 1

Cycles

Results (primary 0.0%, secondary -3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.6% [0.4%, 0.8%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.1% [-2.0%, -0.6%] 4
Improvements ✅
(secondary)
-3.7% [-3.7%, -3.7%] 1
All ❌✅ (primary) 0.0% [-2.0%, 0.8%] 11

Binary size

Results (primary -0.0%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 8
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 8

Bootstrap: 480.775s -> 480.225s (-0.11%)
Artifact size: 403.36 MiB -> 403.27 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.