Skip to content

Rollup of 13 pull requests #145644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Aug 20, 2025
Merged

Rollup of 13 pull requests #145644

merged 38 commits into from
Aug 20, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Aug 20, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

miried and others added 30 commits May 5, 2025 13:06
Co-authored-by: Guillaume Gomez <[email protected]>
This is practically a revert of a revert, making the
commit e907456b2e10622ccd854a3bba8d02ce170b5dbb on `stdarch` come around
again with minor fixes, enhancements and adjustments.

An excerpt from the original commit message follows:

Since there's no architectural feature detection on RISC-V (unlike `CPUID`
on x86 architectures and some system registers on Arm/AArch64), runtime
feature detection entirely depends on the platform-specific facility.

As a result, availability of each feature heavily depends on the platform
and its version.

To help users make a decision for feature checking on a RISC-V system, this
commit adds a platform guide with minimum supported platform versions.
We are moving away from `x86_64-apple-darwin`, so soon these docs
won't be available.
Switch to only using aarch64 runners (implying we are now
cross-compiling) and stop running tests. In the future, we could
enable (some?) tests via Rosetta 2.
Implement the accepted ACP for methods that find the index of the least
significant (lowest) and most significant (highest) set bit in an
integer for signed, unsigned, and NonZero types.

Also add unit tests for all these types.
rust-lang#145489 changed `std_detect` to no
longer depend on `cfg-if`, which meant it no longer indirectly pulled in
`rustc-std-workspace-core` via `cfg-if`. That caused it to no longer
depend on `compiler-builtins`.

Change `std_detect` to use `rustc-std-workspace-core` and
`rustc-std-workspace-alloc`, to integrate with the rustc workspace. This
also pulls in `compiler-builtins` via `rustc-std-workspace-core`.

Closes: rust-lang#145594
All dependencies of `std` have dropped the crates.io dependency on
`compiler-builtins`, so this patch is no longer needed.

Closes: RUST-142265
The fallback is to just ignore the arguments. That is a valid implementation because this intrinsic is just a hint.

I also added `miri::intrinsic_fallback_is_spec` annotation, so that miri now supports these operations. A prefetch intrinsic call is valid on any pointer.
Fix parameter order for `_by()` variants of `min` / `max`/ `minmax` in `std::cmp`

We saw a regression introduced in version `1.86` that seems to be coming from switching the order of `v1` and `v2` when calling `comparison` functions in `min_by` / `max_by` / `minmax_by` (cf. this PR: rust-lang#136307)

When the `compare` function is not symmetric in the arguments, this leads to false results. Apparently, the test cases do not cover this scenario currently. While asymmetric comparison may be an edge case, but current behavior is unexpected nevertheless.
…mples-typecheck, r=notriddle

Rustdoc: typecheck scrape-examples.js

more typechecking progress, this time we're mostly held back by the fact that `document.querySelectorAll` can't return nice types if its given a compound query (see the issue linked in a code comment).

Additionally, it seems like the generated `data-locs` attribute has fields that are never used by anything?

r? ```@notriddle```
…, r=davidtwco

mention lint group in default level lint note

### Summary

This PR updates lint diagnostics so that default-level notes now mention the lint group they belong to, if any.
Fixes: rust-lang#65464.

### Example

```rust
fn main() {
    let x = 5;
}
```

Before:

```
= note: `#[warn(unused_variables)]` on by default
```

After:

```
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
```

### Unchanged Cases

Messages remain the same when the lint level is explicitly set, e.g.:

* Attribute on the lint `#[warn(unused_variables)]`:

  ```
  note: the lint level is defined here
  LL | #[warn(unused_variables)]
     |        ^^^^^^^^^^^^^^^^
  ```
* Attribute on the group `#[warn(unused)]:`:

  ```
  = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
  ```
* CLI option `-W unused`:

  ```
  = note: `-W unused-variables` implied by `-W unused`
  = help: to override `-W unused` add `#[allow(unused_variables)]`
  ```
* CLI option `-W unused-variables`:

  ```
  = note: requested on the command line with `-W unused-variables`
  ```
…aheemdev

Clarify EOF handling for `BufRead::skip_until`

This aligns `BufRead::skip_until`'s description more with `BufRead::read_until` in terms of how it handles EOF and extends the doctest to include this behavior.
…win-to-tier-2, r=Kobzol,madsmtm

Demote x86_64-apple-darwin to Tier 2 with host tools

Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2.

This implements the decision from rust-lang/rfcs#3841.
…anieu

add a fallback implementation for the `prefetch_*` intrinsics

related ACP: rust-lang/libs-team#638

The fallback is to just ignore the arguments. That is a valid implementation because this intrinsic is just a hint.

I also added the `miri::intrinsic_fallback_is_spec` annotation, so that miri now supports these operations. A prefetch intrinsic call is valid on any pointer. (specifically LLVM guarantees this https://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic)

Next, I made the `LOCALITY` argument a const generic. That argument must be const (otherwise LLVM crashes), but that was not reflected in the type.

Finally, with these changes, the intrinsic can be safe and `const` (a prefetch at const evaluation time is just a no-op).

cc `@Amanieu`
r? `@RalfJung`
@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 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Aug 20, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Aug 20, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

📌 Commit 816f098 has been approved by jhpratt

It is now in the queue for this repository.

@bors bors 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 20, 2025
@bors
Copy link
Collaborator

bors commented Aug 20, 2025

⌛ Testing commit 816f098 with merge 22a86f8...

@bors
Copy link
Collaborator

bors commented Aug 20, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing 22a86f8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 20, 2025
@bors bors merged commit 22a86f8 into rust-lang:master Aug 20, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 20, 2025
@jhpratt jhpratt deleted the rollup-ypo3zcd branch August 20, 2025 08:26
Copy link
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 f605b57 (parent) -> 22a86f8 (this PR)

Test differences

Show 4006 test diffs

Stage 1

  • nonzero::test_nonzero_highest_one: [missing] -> pass (J0)
  • nonzero::test_nonzero_lowest_one: [missing] -> pass (J0)
  • num::i128::test_highest_one: [missing] -> pass (J0)
  • num::i128::test_lowest_one: [missing] -> pass (J0)
  • num::i16::test_highest_one: [missing] -> pass (J0)
  • num::i16::test_lowest_one: [missing] -> pass (J0)
  • num::i32::test_highest_one: [missing] -> pass (J0)
  • num::i32::test_lowest_one: [missing] -> pass (J0)
  • num::i64::test_highest_one: [missing] -> pass (J0)
  • num::i64::test_lowest_one: [missing] -> pass (J0)
  • num::i8::test_highest_one: [missing] -> pass (J0)
  • num::i8::test_lowest_one: [missing] -> pass (J0)
  • num::u128::test_highest_one: [missing] -> pass (J0)
  • num::u128::test_lowest_one: [missing] -> pass (J0)
  • num::u16::test_highest_one: [missing] -> pass (J0)
  • num::u16::test_lowest_one: [missing] -> pass (J0)
  • num::u32::test_highest_one: [missing] -> pass (J0)
  • num::u32::test_lowest_one: [missing] -> pass (J0)
  • num::u64::test_highest_one: [missing] -> pass (J0)
  • num::u64::test_lowest_one: [missing] -> pass (J0)
  • num::u8::test_highest_one: [missing] -> pass (J0)
  • num::u8::test_lowest_one: [missing] -> pass (J0)
  • [ui] tests/ui/async-await/async-closures/type-name.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/async-await/async-closures/type-name.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.rs: [missing] -> pass (J2)

Additionally, 3980 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 22a86f8280becb12c34ee3efd952baf5cf086fa0 --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. dist-x86_64-apple: 12587.5s -> 6323.3s (-49.8%)
  2. aarch64-apple: 5800.1s -> 7007.9s (20.8%)
  3. x86_64-gnu-aux: 6492.4s -> 7289.2s (12.3%)
  4. dist-aarch64-apple: 6700.6s -> 6042.2s (-9.8%)
  5. x86_64-gnu-llvm-20-2: 6720.3s -> 6157.0s (-8.4%)
  6. x86_64-gnu-tools: 3760.0s -> 3490.1s (-7.2%)
  7. dist-riscv64-linux: 4615.0s -> 4929.9s (6.8%)
  8. i686-gnu-2: 5802.1s -> 6163.2s (6.2%)
  9. x86_64-gnu-llvm-19-1: 3421.2s -> 3623.9s (5.9%)
  10. dist-loongarch64-musl: 5334.8s -> 5053.5s (-5.3%)
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
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139357 Fix parameter order for _by() variants of min / max/ … 5cf4d8a9ae897e24fa0abeacb0414698cc83ec10 (link)
#140314 Rustdoc: typecheck scrape-examples.js 81dfbf5091ed6d2bb3548665582faabffab206cb (link)
#140794 mention lint group in default level lint note 1ff28227d95a2e858b9e9a8e79ec9da0b4349326 (link)
#145006 Clarify EOF handling for BufRead::skip_until 34c7b060ae57f2d54eefbb9c4761885e1fcefc37 (link)
#145252 Demote x86_64-apple-darwin to Tier 2 with host tools d7218745a6f4d9ceeec733782ccc4c0fe616fd76 (link)
#145359 Fix bug where rustdoc-js tester would not pick the right … c8097410301d39cf257e4d248c18c90622628e2f (link)
#145381 Implement feature int_lowest_highest_one for integer and … 8743ccf14ee595193e28162881d2e2926943bfda (link)
#145417 std_detect: RISC-V platform guide documentation bd4f3f2a8b89e4c58a3f577eb8e776f3ac9fb418 (link)
#145531 Add runtime detection for APX-F and AVX10 53f1cb0e4c05a3eb92a97d605a7419d9255d0e92 (link)
#145619 std_detect: Use rustc-std-workspace-* to pull in `compi… 38a19df4d6694ac96eb949f2d835cfccf461af4c (link)
#145622 Remove the std workspace patch for compiler-builtins 93338cdf3b7e98543ff3f5ef1faaa452d64f70de (link)
#145623 Pretty print the name of an future from calling async closu… d424dc3d58dcedfea95b8ca6f5a9215deebcabee (link)
#145626 add a fallback implementation for the prefetch_* intrinsi… d9d898b9b6c5784a8cbe8949c041bc6e594475b4 (link)

previous master: f605b57042

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (22a86f8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.2%, secondary 3.8%)

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

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
3.8% [3.8%, 3.8%] 1
Improvements ✅
(primary)
-1.4% [-1.4%, -1.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-1.4%, 1.1%] 2

Cycles

Results (primary -1.5%)

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

mean range count
Regressions ❌
(primary)
2.8% [2.5%, 3.4%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-6.6% [-7.1%, -5.6%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.5% [-7.1%, 3.4%] 11

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 470.836s -> 470.428s (-0.09%)
Artifact size: 378.15 MiB -> 378.15 MiB (0.00%)

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 merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.