Skip to content

Rollup of 16 pull requests#158953

Closed
GuillaumeGomez wants to merge 47 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-avr9EFF
Closed

Rollup of 16 pull requests#158953
GuillaumeGomez wants to merge 47 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-avr9EFF

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

cammeresi and others added 30 commits May 12, 2026 17:33
None of the existing tests captured a case where non-terminal binds
appeared differently ordered than their definition in their rule, so I
wrote a test for it.

The existing macro parsing code is quite resilient to this kind of
mis-ordering; it took quite a convoluted macro to trigger a case where
the ordering is incorrect today. I've documented the parse tree (based
on my own mental model) that the convoluted macro causes.
The order of `bb_mps` and `next_mps` depends on arbitrary implementation
choices, e.g. the order in which `$(a)? b` causes `a b` and `b` to be
explored. To stop depending on these implementation details, this commit
sorts `bb_mps` and `next_mps` by `mp.idx` (corresponding to the position
in the rule) before presenting error messages.

This makes it easier to refactor the macro parsing implementation.
Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
Storage is still required even if the local is moved out and
immediately moved in again.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
A recent change in InstSimplify is able to skip the `and` in this
codegen, which is strictly an improvement. We accept the new version on
newer LLVM and the old verison on older ones using the revisions system.

The change in array-cmp.rs appears to have come from the same revision,
so I gave it the same treatment. It's weirder to me though, because it
merely changes the order of the phi operands which if I understand right
doesn't actually matter.
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Same as rust-lang/rust/147495, just keeping it up-to-date.
in `is_call_from_compiler_builtins_to_upstream_monomorphization`,
suggested by Saethlin
We'll do this using `-Zforce-intrinsic-fallback` in the main repo going forward
A number of float operations from libm have intrinsics for optimization,
but it is also okay to just call the libm functions directly. Add a
fallback for these cases, including converting to/from another float
size where needed, so the backends don't need to override these.

We do not add a fallback body for intrinsics that have a softfloat
implementation (e.g. sqrt, fma), because it would make them harder
to constify later.
Emscripten targets wasm32 but provides a working POSIX fd layer, including
fcntl(F_DUPFD_CLOEXEC) and dup2(), so it should use the real implementations
rather than the wasm32 UNSUPPORTED_PLATFORM stubs:

- try_clone_to_owned now uses fcntl(F_DUPFD_CLOEXEC) instead of returning
  UNSUPPORTED_PLATFORM
- replace_stdio_fd now uses dup2() instead of the wasm32 fallback
CString::clone_into reuses the target's allocation by moving the buffer into a Vec and growing it. If that growth's allocation fails and the alloc error hook unwinds, the target has to be left as a valid CString, but nothing covered that path.

Add a test in library/alloctests that fails the reallocation under a panicking alloc error hook and checks the target stays valid. The failing allocator is only honored under Miri - a global allocator in a library test doesn't intercept libstd's allocation in a normal build - so the unwind assertion is gated on cfg!(miri); the test still runs and passes as a regular test.
…thercote

Make the ordering of non-terminal binds in ambiguity error messages deterministic

My next PR will rework macro parsing to use a DFS approach instead of a BFS. It will change the order in which the parsing space is explored, and while this does not change the behavior of parsing in success cases, it did cause changes to some error messages; in particular, when an ambiguity error occurs, it would sometimes report non-terminal binds in a different order (e.g. in ```error: local ambiguity when calling macro `foo`: multiple parsing options: built-in NTs ident ('i') or ident ('j').```). I realized that the current macro parsing code does not enforce a particular order for those binds, so this PR 1) adds a test case for strange bind orderings and 2) makes the bind ordering deterministic (in line with the ordering of those binds in the macro definition, which was how binds tended to be ordered anyway).

Ideally reviewed commit-by-commit.

r? @nnethercote
…n-try-from, r=nnethercote

add codegen test for range length bound propagation

Closes rust-lang#114242
…est, r=jieyouxu

Update `browser-ui-test` version to `0.24.1`

Fixes rust-lang#157747.

It includes GuillaumeGomez/browser-UI-test#749.

Hopefully this flaky issue won't be anymore.

r? @jieyouxu
…jhpratt

std: support real fd methods on Emscripten

Emscripten targets wasm32 but provides a working POSIX fd layer, including `fcntl(F_DUPFD_CLOEXEC)` and `dup2()`, so it should use the real implementations rather than the wasm32 `UNSUPPORTED_PLATFORM` stubs:

- `try_clone_to_owned` now uses `fcntl(F_DUPFD_CLOEXEC)` instead of returning `UNSUPPORTED_PLATFORM`
- `replace_stdio_fd` now uses `dup2()` instead of the `wasm32` fallback
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 8, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` O-unix Operating system: Unix-like 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-infra Relevant to the infrastructure 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Jul 8, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@bors r+ p=5 rollup=never

@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c66bbec has been approved by GuillaumeGomez

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 Jul 8, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

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

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 8, 2026
Rollup of 16 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-2
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Replaced with #158958 to include high priority pr

@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 Jul 8, 2026
@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 8, 2026
@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5d4b147 (5d4b147bc638091a8255e3c7aae973f4e07ebe41)
Base parent: 99576cf (99576cf2ebc870c305225e9856b9423228872c56)

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

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` O-unix Operating system: Unix-like 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-infra Relevant to the infrastructure 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.