Skip to content

Rollup of 6 pull requests - #161846

Closed
jhpratt wants to merge 13 commits into
rust-lang:mainfrom
jhpratt:rollup-47JqUig
Closed

Rollup of 6 pull requests#161846
jhpratt wants to merge 13 commits into
rust-lang:mainfrom
jhpratt:rollup-47JqUig

Conversation

@jhpratt

@jhpratt jhpratt commented Aug 27, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

ywxt and others added 13 commits August 25, 2026 16:33
This check is called from a few different places when coverage is enabled, so
we should probably let the query system take care of memoizing results and
tracking dependencies.
```
warning: explicit `package.readme` can be inferred
  --> compiler/rustc_thread_pool/Cargo.toml:11:1
   |
11 | readme = "README.md"
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `cargo::manual_readme` is set to `warn` by default
help: consider removing `package.readme`
warning: `rustc_thread_pool` (manifest) generated 1 warning
```

See
<https://triage.rust-lang.org/gha-logs/rust-lang/rust/98030530980#L2026-08-26T03:05:00.5401170Z-L2026-08-26T03:05:00.5402963Z>
```
warning: unused dependency `unified-diff`
  --> src/tools/compiletest/Cargo.toml:37:1
   |
37 | unified-diff = "0.2.1"
   | ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `cargo::unused_dependencies` is set to `warn` by default
help: consider removing the dependency on `unified-diff`
warning: `compiletest` (manifest) generated 1 warning
```

See
<https://triage.rust-lang.org/gha-logs/rust-lang/rust/98030530980#L2026-08-26T03:05:07.8912904Z-L2026-08-26T03:05:07.8915112Z>
Add SVE-accelerated Vec::retain_mut for aarch64

The PR adds SVE support for specified width types(8, 16, 32 and 64 bits) in `Vec::retain_mut`. Due to [pointer provenance being stripped by intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/208962-t-libs.2Fstdarch/topic/MaybeUninit.20lane.20variants.20for.20vector.20data-movement.20intrinsic/with/615526760)) here it has to use inline asm instead of sve intrinsics.

## 1. retain half (ns/iter)

| Elements | u32 SVE | u32 scalar | Change | u64 SVE | u64 scalar | Change |
|---|---|---|---|---|---|---|
| 4 | 10.32 | 12.36 | / | 10.25 | 11.83 | / |
| 8 | 12.93 | 15.08 | / | 13.40 | 14.74 | / |
| 16 | 18.66 | 19.46 | / | 19.08 | 18.89 | / |
| 32 | 31.84 | 31.12 |/ | 31.78 | 31.26 | / |
| 64 | 32.99 | 59.17 | **-44.2%** | 59.86 | 59.44 | / |
| 1,000 | 471.51 | 811.71 | **-41.9%** | 820.98 | 827.16 | / |
| 10,000 | 4,660 | 7,990 | **-41.7%** | 5,836 | 8,242 | **-29.2%** |
| 100,000 | 46,414 | 79,608 | **-41.7%** | 57,561 | 82,861 | **-30.5%** |

## 2. retain whole

| Elements | u32 SVE | u32 scalar | Change | u64 SVE | u64 scalar | Change |
|---|---|---|---|---|---|---|
| 4 | 3.46 | 3.11 | / | 3.45 | 3.45 | / |
| 8 | 4.90 | 4.49 | / | 4.83 | 6.22 | / |
| 16 | 8.44 | 8.14 | / | 8.44 | 11.74 | / |
| 32 | 15.83 | 15.51 | / | 15.83 | 22.79 | / |
| 64 | 21.57 | 30.66 | **-29.6%** | 30.72 | 44.89 | / |
| 1,000 | 358.53 | 483.33 | **-25.8%** | 469.18 | 696.43 | / |
| 10,000 | 3,127 | 4,745 | **-34.1%** | 5,082 | 6,912 | **-26.5%** |
| 100,000 | 32,509 | 49,501 | **-34.3%** | 49,484 | 79,749 | **-38.0%** |

r? @Amanieu
…ethlin

interpret: ensure that calls via no-unwind ABIs do not unwind

According to our [ABI docs](https://doc.rust-lang.org/nightly/std/primitive.fn.html#abi-compatibility), programs like this are okay:
```rust
extern "C-unwind" fn does_not_unwind_but_could() {}

fn main() {
    let f: extern "C-unwind" fn() = does_not_unwind_but_could;
    let f: extern "C" fn() = unsafe { std::mem::transmute(f) };
    f();
}
```
So let's add a test for that.

And also, let's adjust the checks in Miri's shims accordingly (see `src/tools/miri/src/shims/sig.rs`). We used to reject calls to functions that *might* unwind with a signature that does not allow unwinding, even if no unwinding occurred. I don't think we have an actual example of a potentially-unwinding shim with an ABI that has a compatible ABI that does not allow unwinding ("C-unwind" and "C"), so we can't add a test for this.
…_aliases, r=adwinwhite

borrowck: Normalize non-rigid aliases in NLL type relating

Fixes rust-lang#160652

With `-Znext-solver=globally`, yielding from an `impl Iterator` without an explicit `Item` bound ICEs in borrowck. The coroutine defining type returned by `type_of` is unnormalized, so its yield type remains `<impl Iterator as Iterator>::Item`. Skipping normalization propagates that non-rigid alias into both MIR's `CoroutineInfo` and borrowck's `UniversalRegions`; NLL type relating then hits its invariant that non-rigid aliases must already have been normalized.

Deeply normalize the instantiated defining type when MIR construction creates `CoroutineInfo` and when borrowck reconstructs `DefiningTy`. That makes the coroutine yield and resume types rigid before NLL compares them.

This is intentionally gated to the next solver. The old solver keeps the existing skip-normalization path because deeply normalizing defining types there causes regressions.
…they

Use `drop_guard` in some places in {core,alloc,std}

- Tracking issue: rust-lang#144426
- Will conflict with rust-lang#161520
- rust-lang#161550 would also be cool occasionally

Didn't touch the places where manual `impl Drop`s had `#[inline]` on their `fn drop` or where the guard type had other `impl`s beside `Drop` and/or was named a lot.

No LLMs used, only pure human slop.
…ouwer

Change `is_eligible_for_coverage` from a hook to a query

- Inspired by seeing rust-lang#161808 add more eligibility conditions
---

This check is called from a few different places when coverage is enabled, so we should probably let the query system take care of memoizing results and tracking dependencies.

(It was made a hook in rust-lang#122322, but I didn't have strong reasons for making it a hook and not a query, other than it being relatively small and simple.)

There should be no user-visible change to compiler behaviour.
chore: fix cargo lints

Fixes two cargo lint erros found during <rust-lang#161789 (comment)>.

See each commit message respectively for details.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 27, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 27, 2026
@jhpratt

jhpratt commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 87c5daa 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 Aug 27, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 27, 2026
Rollup of 6 pull requests

Successful merges:

 - #161034 (Add SVE-accelerated Vec::retain_mut for aarch64)
 - #161628 (interpret: ensure that calls via no-unwind ABIs do not unwind)
 - #161012 (borrowck: Normalize non-rigid aliases in NLL type relating)
 - #161702 (Use `drop_guard` in some places in {core,alloc,std})
 - #161813 (Change `is_eligible_for_coverage` from a hook to a query)
 - #161842 (chore: fix cargo lints)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-msvc-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling getopts v0.2.24
error[E0308]: mismatched types
  --> library\std\src\sys\process\windows\tests.rs:40:48
   |
40 |     let mut p = DropGuard::new(p.unwrap(), |p| p.kill());
   |                                                ^^^^^^^^ expected `()`, found `Result<(), Error>`
   |
   = note: expected unit type `()`
                   found enum `core::result::Result<(), core::io::Error>`
help: consider using a semicolon here
   |
40 |     let mut p = DropGuard::new(p.unwrap(), |p| { p.kill(); });
   |                                                +         +++
help: consider using `Result::expect` to unwrap the `core::result::Result<(), core::io::Error>` value, panicking if the value is a `Result::Err`
   |
40 |     let mut p = DropGuard::new(p.unwrap(), |p| p.kill().expect("REASON"));
   |                                                        +++++++++++++++++

[RUSTC-TIMING] getopts test:false 1.801
For more information about this error, try `rustc --explain E0308`.
[RUSTC-TIMING] std test:true 9.243
---
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src --skip=src/tools/linkchecker`
Currently active steps:
test::Crate { build_compiler: Compiler { stage: 2, host: x86_64-pc-windows-msvc, forced_compiler: false }, target: x86_64-pc-windows-msvc, mode: Std, crates: ["alloc", "alloctests", "compiler_builtins", "core", "coretests", "panic_abort", "panic_unwind", "proc_macro", "profiler_builtins", "rustc-std-workspace-core", "std", "std_detect", "sysroot", "test", "unwind"] } at src\bootstrap\src\core\build_steps\test.rs:3523
Build completed unsuccessfully in 1:14:35
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Thu Aug 27 04:35:02 CUT 2026
  network time: Thu, 27 Aug 2026 04:35:03 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@rust-bors rust-bors Bot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 27, 2026
@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 Aug 27, 2026
@rust-bors

rust-bors Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

💔 Test for c582238 failed: CI. Failed job:

@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 Aug 27, 2026
@rust-bors

rust-bors Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 27, 2026
@jhpratt jhpratt closed this Aug 27, 2026
@jhpratt
jhpratt deleted the rollup-47JqUig branch August 27, 2026 08:29
@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 Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. 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.

9 participants