Skip to content

Rollup of 8 pull requests#158946

Closed
jhpratt wants to merge 22 commits into
rust-lang:mainfrom
jhpratt:rollup-P8T76vu
Closed

Rollup of 8 pull requests#158946
jhpratt wants to merge 22 commits into
rust-lang:mainfrom
jhpratt:rollup-P8T76vu

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

cammeresi and others added 22 commits May 12, 2026 17:33
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>
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
… r=RalfJung,saethlin

intrinsics: Add a fallback for non-const libm float functions

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.
…cjgillot

Fix coroutine MIR saved local remapping

The unsound analysis was found while I was working on the `async-drop` code. Apparently the counter variable in the array drop glue is not correctly identified as a saved local.

Also we did not patch up indices in `ProjectionElem::Index` when they are saved locals.

The reproduction is in the older commit with the expected output.
…ingjubilee

Carry the `b_offset` inside `BackendRepr::ScalarPair`

Inspired by rust-lang/compiler-team#1007 but doesn't actually change any of the layout rules just yet.

This turned out to be a nice change even if we didn't use the extra flexibility, IMHO, because it allowed so many things like

```diff
@@ -222,12 +224,12 @@ fn from_const_alloc<Bx: BuilderMethods<'a, 'tcx, Value = V>>(
                 let val = read_scalar(offset, size, s, bx.immediate_backend_type(layout));
                 OperandRef { val: OperandValue::Immediate(val), layout, move_annotation: None }
             }
-            BackendRepr::ScalarPair(
-                a @ abi::Scalar::Initialized { .. },
-                b @ abi::Scalar::Initialized { .. },
-            ) => {
+            BackendRepr::ScalarPair {
+                a: a @ abi::Scalar::Initialized { .. },
+                b: b @ abi::Scalar::Initialized { .. },
+                b_offset,
+            } => {
                 let (a_size, b_size) = (a.size(bx), b.size(bx));
-                let b_offset = (offset + a_size).align_to(b.default_align(bx).abi);
                 assert!(b_offset.bytes() > 0);
                 let a_val = read_scalar(
                     offset,
```

as *oh my* was that little magic incantation copy-pasted all over the place.

Apologies for the pretty-giant PR.  I tried to make it as direct a change as I could: if it was `(..)` before it's `{ .. }` now, if it was `(_, _)` before it's `{ a: _, b: _, b_offset: _ }` now.  I kept the names the same so the code lines were unchanged even if normally I might have just renamed things, etc.  I'll add some inline notes for places of particular interest.

r? @workingjubilee
…-ld, r=lqd

Update wasm-component-ld to 0.5.26

Same as rust-lang#147495, just keeping it up-to-date.
wrapping_sh* methods: clarify underspecified reference

Reading these docs, it was not clear to me whether "the behavior" here refers to the behavior described in the previous sentence, or the behavior of this method. Let's clarify that.

Cc @scottmcm who wrote these docs (rust-lang#149837)
…nthey

Stabilize `VecDeque::retain_back` from `truncate_front`

Tracking issue: rust-lang#140667
Closes: rust-lang#140667

@rustbot label -T-libs +T-libs-api +needs-fcp +S-waiting-on-fcp

r? t-libs-api
…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. labels Jul 8, 2026
@rustbot rustbot added 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. labels Jul 8, 2026
@jhpratt

jhpratt commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 787853d has been approved by jhpratt

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
@GuillaumeGomez

Copy link
Copy Markdown
Member

Closing in favour of bigger rollup: #158953

@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 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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.