Skip to content

Rollup of 5 pull requests - #161022

Merged
rust-bors[bot] merged 15 commits into
rust-lang:mainfrom
jhpratt:rollup-jXEC06F
Aug 13, 2026
Merged

Rollup of 5 pull requests#161022
rust-bors[bot] merged 15 commits into
rust-lang:mainfrom
jhpratt:rollup-jXEC06F

Conversation

@jhpratt

@jhpratt jhpratt commented Aug 13, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mejrs and others added 15 commits August 11, 2026 23:41
…ghtly` release channel

Tests can use the following comment configuration to mark themselves as only
running on `stable` / `beta` release channels.

```rust
// rustfmt-stable: true
```

> [!NOTE]
> Using `stable` here since we already have an `ustable` variant for nightly
> only tests and I didn't want to refactor things now, but in the future I think
> we should refactor this to be more like:

```rust
// rustfmt-cfg_release_channel: {stable|beta|nightly}
```
These tests show that `cfg_select!` won't be formatted on `stable` or `beta`
release channels.
'hw.optional.AdvSIMD' sysctl key doesn't resolve on macOS 26.5.1 and 26.6,
breaking `asimd` and `sha2`/`sha3` downstream.

Now `asimd` is determined by checking 'hw.optional.AdvSIMD' || 'hw.optional.arm.AdvSIMD' to support old and new envs.
`rhs` is confusing since for the `Shl` and `Shr` traits, that is the
name used for the value to shift by (i.e. `self >> rhs`).
It's a bit easier to understand the results of shifts and otherwise
bitwise operations when leading zeros are present.
Shorten the summary line, cover shifts by zeros, rotates, and panics in
examples, and turn the "Panics" section into a complete sentence.
…matting, r=jieyouxu

rustfmt: restrict `cfg_select!` formatting to the `nightly` release channel

Closes: rust-lang#160944

`cfg_select!` formatting was implemented in rust-lang#154202. The formatting diverged from what was outlined in the original Style FCP (rust-lang/style-team#201 (comment) and rust-lang#144323 (comment)).

Since the 1.99 beta is scheduled to branch from main on August 14 I want to get this nightly formatting gate out so that we can correct the formatting issues before we promote the formatting to the beta / stable release channels.

Style Guide PR: rust-lang#160967

r? @jieyouxu

cc: @traviscross
…mulacrum

core: Improve the documentation for funnel shifts

Change the variable name to make things a bit more clear, then rework funnel shift documentation. Examples now cover shifting by zero and emulating rotates.

Tracking issue: rust-lang#145686
…in-neon-detection, r=Amanieu

Fix asimd/neon detection on aarch64-darwin

Fixes rust-lang#160467

Previously `asimd` (alias for `neon`) for aarch64-darwin target was checked using 'hw.optional.AdvSIMD' key.
As observed on macOS Tahoe 26.5.1 and 26.6:

```console
$ sysctl -n hw.optional.AdvSIMD
sysctl: unknown oid 'hw.optional.AdvSIMD'
```
Key has been replaced with:
```console
$ sysctl -n hw.optional.arm.AdvSIMD
1
```
On latest macOS versions, `asimd` check relying on older key without arm in its path is broken and breaks `sha2`/`sha3` downstream as they depend on `asimd` in [`library/std_detect/src/detect/os/darwin/aarch64.rs`](https://github.com/rust-lang/rust/blob/c98d0cb27cc63afdd62602a52eb4feb8a1c682dd/library/std_detect/src/detect/os/darwin/aarch64.rs#L154-L155):
```rust
enable_feature(Feature::sha2, sha1 && sha256 && asimd);
enable_feature(Feature::sha3, sha512 && sha3 && asimd);
```

Changed [from](https://github.com/rust-lang/rust/blob/c98d0cb27cc63afdd62602a52eb4feb8a1c682dd/library/std_detect/src/detect/os/darwin/aarch64.rs#L39):
```rust
let asimd = _sysctlbyname(c"hw.optional.AdvSIMD");
```

[To](https://github.com/patrikas-sestokas/rust/blob/eb3bf33322c2b8e94e865b2efb33c0e252e70a6b/library/std_detect/src/detect/os/darwin/aarch64.rs#L39):
```rust
let asimd = _sysctlbyname(c"hw.optional.AdvSIMD") || _sysctlbyname(c"hw.optional.arm.AdvSIMD");
```

To support both old and new environments.

## Verification

`main.rs` using fixed version of std_detect:
```rust
#![allow(internal_features)]
#![feature(stdarch_internal)]
use std_detect::is_aarch64_feature_detected;

macro_rules! feature_bug_check {
    ($($f: tt),*) => {
        $(
            print!("{}:", $f);
            is_aarch64_feature_detected!($f).then(|| print!("r"));
            #[cfg(target_feature = $f)]
            print!("c");
            println!();
        )*
    };
}

fn main() {
    feature_bug_check!(
        "neon", "sha2", "sha3", "crc", "fp16", "fcma", "dotprod", "rdm", "lse", "rcpc", "dit",
        "dpb", "dpb2", "jsconv", "paca", "pacg", "frintts", "flagm", "sb", "ssbs"
    );
}
```

`.cargo/config.toml` statically disabling `neon` to force runtime check:
```toml
[target.'cfg(target_arch = "aarch64")']
rustflags = ["-C", "target-feature=-neon"]
```

`cargo run`:
```console
neon:r
sha2:r
sha3:r
crc:rc
fp16:r
fcma:r
dotprod:r
rdm:r
lse:rc
rcpc:rc
dit:rc
dpb:rc
dpb2:rc
jsconv:r
paca:rc
pacg:rc
frintts:rc
flagm:rc
sb:rc
ssbs:rc
```

Changing `std_detect::is_aarch64_feature_detected` to `std::arch::is_aarch64_feature_detected` reproduces rust-lang#160467:
```console
neon:
sha2:
sha3:
crc:rc
fp16:r
fcma:r
dotprod:r
rdm:r
lse:rc
rcpc:rc
dit:rc
dpb:rc
dpb2:rc
jsconv:r
paca:rc
pacg:rc
frintts:rc
flagm:rc
sb:rc
ssbs:rc
```
dogfood `#[diagnostic::unknown]` in the compiler

This makes the error for not-found symbols a lot nicer :)

```
error[E0425]: cannot find value `better_rust` in module `sym`
   --> compiler\rustc_feature\src\unstable.rs:799:16
    |
157 |                 name: sym::$feature,
    |                            -------- due to this macro variable
...
799 |     (unstable, better_rust, "2.0.0", Some(42)),
    |                ^^^^^^^^^^^ `better_rust` is not a pre-interned symbol
    |
    = note: consider adding `better_rust` to the `symbols!` invocation in compiler/rustc_span/src/symbol.rs
```

(only works when building stage 2 for now, the necessary changes haven't landed in beta yet)
Add regression test for const fn returning Vec of boxed dyn Any

Closes rust-lang#84170
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 13, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Aug 13, 2026
@jhpratt

jhpratt commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 536383f 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 13, 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 Aug 13, 2026
@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 10m 38s
Pushing 79ef636 to main...

@rust-bors
rust-bors Bot merged commit 79ef636 into rust-lang:main Aug 13, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 13, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#160998 rustfmt: restrict cfg_select! formatting to the nightly 4aed83af99fd68b0ea605eba5bdb55896c354842 (link)
#154150 core: Improve the documentation for funnel shifts 7851a8dec3810b35d65b863e5e91497c4c867907 (link)
#161009 Fix asimd/neon detection on aarch64-darwin fbcf5221062c52061b94606b651dc5eba18b841c (link)
#160950 dogfood #[diagnostic::unknown] in the compiler a397881ae72023c455d9bd2195f9a092cfed7aca (link)
#161010 Add regression test for const fn returning Vec of boxed dyn… 6f293481ae3e2e80df0a6872890629587ce5b444 (link)

previous master: 52d0866480

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

@github-actions

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 52d0866 (parent) -> 79ef636 (this PR)

Test differences

Show 3438 test diffs

Stage 1

  • [ui (polonius)] tests/ui/consts/const-fn-vec-box-dyn-any-84170.rs: [missing] -> pass (J0)
  • [ui] tests/ui/consts/const-fn-vec-box-dyn-any-84170.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/consts/const-fn-vec-box-dyn-any-84170.rs: [missing] -> pass (J1)

Additionally, 3435 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 79ef636a60b0f5ca061b09122bbbca3c7b4a3b70 --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. x86_64-gnu-stdlib-semver-check: 5m 11s -> 10m 51s (+108.8%)
  2. x86_64-gnu-gcc-core-tests: 6m 14s -> 11m 13s (+80.0%)
  3. dist-i686-msvc: 1h 15m -> 2h 6m (+67.4%)
  4. x86_64-gnu-gcc: 49m 29s -> 1h 20m (+63.2%)
  5. x86_64-gnu-stable: 1h 45m -> 2h 35m (+47.9%)
  6. x86_64-gnu-miri: 57m 11s -> 1h 22m (+44.5%)
  7. i686-msvc-1: 2h 9m -> 3h 1m (+40.9%)
  8. i686-gnu-2: 1h 17m -> 1h 38m (+27.4%)
  9. x86_64-gnu-nopt: 1h 49m -> 2h 18m (+26.4%)
  10. aarch64-apple-macos-26-2: 2h 10m -> 2h 42m (+24.7%)
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-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (79ef636): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.7%, secondary 3.1%)

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

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

Cycles

Results (primary 1.8%)

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

mean range count
Regressions ❌
(primary)
1.8% [1.7%, 2.0%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [1.7%, 2.0%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 459.695s -> 455.642s (-0.88%)
Artifact size: 396.45 MiB -> 396.40 MiB (-0.01%)

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

8 participants