Skip to content

Rollup of 15 pull requests - #165134

Closed
JonathanBrouwer wants to merge 33 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-PLp2402
Closed

JonathanBrouwer wants to merge 33 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-PLp2402

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Warning

This rollup conflicts with pending auto build #165130 and may need to be recreated if the pending build succeeds.

r? @ghost

Create a similar rollup

hina-kura49 and others added 30 commits September 26, 2026 19:20
When a format string is not a literal in the source, e.g. when it is
produced by `concat!`, the offsets of printf- and shell-style
specifiers are relative to the expanded string rather than to the
source. `check_foreign!` still used them to place a machine-applicable
suggestion, which could rewrite unrelated source text such as turning
`concat!` into `c{}cat!`, or ICE when the span landed inside a
multibyte character.

When the format string is not a source literal, explain the
translation in a note instead, e.g. "`%d` should be written as `{}`",
and don't emit the suggestion. For specifiers that cannot be
translated, point the note at the whole format string argument
instead of a span computed from those offsets; the output is the same
as before. The output for format strings written as literals is
unchanged.
These are always checked in attribute parsing
```
error: expected expression, found `let` statement
 --> issue-87291.rs:2:5
  |
2 | -   let a = opt1.map(|_| {
  | -   ^^^
  | |
  | expected an expression after this
  |
  = note: only supported directly in conditions of `if` and `while` expressions
```
fixup cranelift
This would allow more flexibility in how we implement getting randomness
in Redox OS by only requiring changes to relibc and randd. In addition
it reduces the amount of Redox specific code libstd uses.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
…f, r=khyperia

Remove GenericArgRef

This removes `GenericArgsRef`, renaming it to `GenericArgs`. `GenericArgs` used to be an unsized version of `GenericArgsRef`, the reference being just a type alias, but really having access to this unsized type available was not necessary.

This also makes `GenericArgs` a tuple struct, giving us the possibility to change its representation in the future.

r? @khyperia

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
… r=Amanieu

Fix the floating point clobbers of RISC-V `clobber_abi`

On RISC-V, callee-saved floating point registers are only callee-saved up to ABI_FLEN bits; the rest of the register is considered temporary. For `clobber_abi("C")`, as LLVM doesn't support partial register clobbers, this requires the callee-saved floating point registers to be clobbered.

These issues are noticeable in beta but not stable due to the recent stabilisation of the f and d target features (tracking issue: rust-lang#150257) so this probably needs a beta backport unless the stabilisation is reverted.
…ubilee

Use getrandom instead of /scheme/rand on Redox OS

This would allow more flexibility in how we implement getting randomness in Redox OS by only requiring changes to relibc and randd. In addition it reduces the amount of Redox specific code libstd uses.
…cat, r=wesleywiser

Don't suggest replacing foreign format specifiers in `concat!` output

Found while working on rust-lang#163368, which fixes the same class of bug for the format string parser's suggestions.

When a format string is not a literal in the source, e.g. when it is
produced by `concat!`, the offsets of printf- and shell-style
specifiers are relative to the expanded string rather than to the
source. `check_foreign!` still used them to place a machine-applicable
suggestion, which could rewrite unrelated source text such as turning
`concat!` into `c{}cat!`, or ICE when the span landed inside a
multibyte character.

When the format string is not a source literal, explain the
translation in a note instead, e.g. "`%d` should be written as `{}`",
and don't emit the suggestion. For specifiers that cannot be
translated, point the note at the whole format string argument
instead of a span computed from those offsets; the output is the same
as before. The output for format strings written as literals is
unchanged.
…der, r=adwinwhite

fix RegionEq direction in canonical query responses

fixes rust-lang#162850

`make_query_region_constraints` was reversing the regions in `RegionEq` which caused the next solver to overflow during fixpoint evaluation
we can keep the region order consistent with `make_eqregion`
omit unconditionally invoking crate level limits query

These are always checked in attribute parsing
Point at prior token on `let` when expression is expected

```
error: expected expression, found `let` statement
 --> issue-87291.rs:2:5
  |
2 | -   let a = opt1.map(|_| {
  | -   ^^^
  | |
  | expected an expression after this
  |
  = note: only supported directly in conditions of `if` and `while` expressions
```

Fix rust-lang#87291.
…ync-drop, r=oli-obk

use adt_async_drop_tys for nested ADTs in needs_async_drop

Fixes rust-lang#164901
Fixes rust-lang#142155

needs_async_drop used the ordinary drop query for nested structs and enums. This incorrectly treated wrapped values with a normal Drop implementation as needing async cleanup, causing their cleanup to be skipped when a future was cancelled.

The change uses adt_async_drop_tys during async-drop analysis and keeps adt_drop_tys for ordinary drop analysis. The regression test covers plain and wrapped values.
…abiguator, r=nnethercote

Use a fixed-length encoding for hash disambiguators in v0 symbols

This is yet another follow-up to my other PRs adding and using the Hash64/Hash128 types, such as rust-lang#137095.

@panstromek identified some binary size jitter especially in stm32f410 https://rust-lang.zulipchat.com/#narrow/channel/247081-t-compiler.2Fperformance/topic/stm32.20binary.20size.20artifact.20noise/with/635524811 and since we are indeed pushing hashes into a variable-length encoding on disk, the changes here definitely fix one cause of artifact size fluctuations. I do not know if they fix all such causes.

This does change how names mangle, so if somebody has a demangler out there that does not handle this correctly I'm sorry. I think this is not a breaking change because v0 symbol names already change whenever the compiler version changes.
…r=oli-obk

reflection: doc attributes from adts, fields, and variants

Adds intrinsics and methods to get the raw doc comment strings from adts, fields, and variants. As noted in the tracking issue rust-lang#146922, before stabilizing the interface we should consider whether these methods get the raw strings.

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

use native interpreter impl for funnel shifts intrinsics

We need a native funnel shift implementation anyway for simd_funnel_shl/shr. So let's also use that for the scalar version -- seems better to consistently use and test the same implementation for both.

That also avoids the need for the fallback body of those intrinsics to be const-compatible, which simplifies a few things as well.

The const intrinsics already have tests:
https://github.com/rust-lang/rust/blob/320b5e08c45f948f859c0705f33b5b3a5486dd98/library/coretests/tests/num/uint_macros.rs#L106-L117

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

remove unnecessary fast path from borrowck

following up on rust-lang#160902 (review), this removes a fast path that was found in rust-lang#163150 to have a negligible performance impact.
…-obk

fix MaybeDangling validity logic for ZST at usize::MAX

Fixes rust-lang/miri#5515 (comment)
r? @oli-obk
…ee, r=jieyouxu

Fix ICE in prelude edition lint

fixes rust-lang#163374
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 29, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 29, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu,test-x86_64-gnu-llvm-22-3,test-aarch64-msvc-2

@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 019aec1 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 Oct 29, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 29, 2026
Rollup of 15 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
try-job: test-aarch64-msvc-2
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_codegen_llvm v0.0.0 (/checkout/compiler/rustc_codegen_llvm)
error[E0308]: mismatched types
   --> compiler/rustc_const_eval/src/const_eval/machine.rs:804:73
    |
804 | ...                   def.field_representing_type_info(ecx.tcx(), args) =>
    |                           ----------------------------            ^^^^ expected `GenericArgs<'_>`, found `&GenericArgs<'_>`
    |                           |
    |                           arguments to this method are incorrect
    |
note: method defined here
   --> compiler/rustc_middle/src/ty/adt.rs:228:12
    |
228 |     pub fn field_representing_type_info(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider dereferencing the borrow
    |
804 |                             def.field_representing_type_info(ecx.tcx(), *args) =>
    |                                                                         +

For more information about this error, try `rustc --explain E0308`.
[RUSTC-TIMING] rustc_const_eval test:false 4.398
error: could not compile `rustc_const_eval` (lib) due to 1 previous error

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-armhf-gnu failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_const_eval v0.0.0 (/checkout/compiler/rustc_const_eval)
error[E0308]: mismatched types
   --> compiler/rustc_const_eval/src/const_eval/machine.rs:804:73
    |
804 | ...                   def.field_representing_type_info(ecx.tcx(), args) =>
    |                           ----------------------------            ^^^^ expected `GenericArgs<'_>`, found `&GenericArgs<'_>`
    |                           |
    |                           arguments to this method are incorrect
    |
note: method defined here
   --> compiler/rustc_middle/src/ty/adt.rs:228:12
    |
228 |     pub fn field_representing_type_info(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: consider dereferencing the borrow
    |
804 |                             def.field_representing_type_info(ecx.tcx(), *args) =>
    |                                                                         +

For more information about this error, try `rustc --explain E0308`.
[RUSTC-TIMING] rustc_const_eval test:false 3.618
error: could not compile `rustc_const_eval` (lib) due to 1 previous error

@rust-bors rust-bors Bot 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 Oct 29, 2026
@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

PR #165094, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@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 Oct 29, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 29, 2026
@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 812ccd4 failed: CI. Failed jobs:

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. T-rustdoc Relevant to the rustdoc 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.