Skip to content
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

Rollup of 6 pull requests #136000

Merged
merged 46 commits into from
Jan 24, 2025
Merged

Rollup of 6 pull requests #136000

merged 46 commits into from
Jan 24, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jieyouxu and others added 30 commits January 23, 2025 20:51
- Change test to check only.
- Don't ignore `wasm` or `sgx`.
- Gate test to be Unix only because Unix `CommandExt` influences the
  suggestion.
- Run rustfix on the suggestion.
- Remove already stabilized feature gate and
  `#![allow(stable_features)]`.
- Convert `ignore-windows` to `only-unix`.
- Convert `ignore-*` to `needs-subprocess`.
- Convert `ignore-windows` to `only-unix`.
- Convert `ignore-*` to `needs-subprocess`.
- Remove already stable feature gate and `#![allow(stable_features)]`.
- Replace `ignore-windows` with `only-unix`.
- Replace `ignore-*` with `needs-subprocess`.
- Remove redundant `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Replace `ignore-windows` -> `only-unix` since the test exercises Unix
  signals and `ExitStatus::code` behavior that's specific to Unix.
- Replace `ignore-*` with `needs-subprocess`.
- Remove already stable feature gate and remove
  `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Remove unnecessary `#![allow(unused_imports)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Replace `ignore-windows` with `only-unix`.
- Replace `ignore-*` with `needs-subprocess`.
- Replace `ignore-windows` with `only-unix`.
- Replace `ignore-*` with `needs-subprocess`.
- Remove unnecessary `mut` and remove `#![allow(unused_mut)]`.
- Replace `ignore-*` with `needs-process`.
- Remove already stable feature gate and remove
  `#![allow(stable_features)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Unwrap a must-use I/O result and remove `#![allow(unused_must_use)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Ignore an unused variable and remove `#![allow(unused_variables)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Ignore unused value, remove `#![allow(unused_variable)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Remove unnecessary `mut`, remove `#[allow(unused_mut)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Ignore unused value, remove `#![allow(unused_variable)]`.
- Replace `ignore-*` with `needs-subprocess`.
….rs`

- Ignore unused value, remove `#![allow(unused_variable)]`.
- Replace `ignore-*` with `needs-subprocess`.
- Use `only-unix` instead of `ignore-windows`.
- Replace `ignore-*` with `needs-subprocess`.
- Use `needs-threads` instead of `ignore-sgx`.
- Remove unnecessary import and `#![allow(unused_import)]`.
- Convert `run-pass` to `check-pass`, the test is about closure
  inference based on expected type, does not need to run-pass.
- Dropped unnecessary ignores.
These types are unlikely to ever contain type information in the foreseeable
future, so excluding them from TypeFoldable/TypeVisitable avoids some unhelpful
derive boilerplate.
Kobzol and others added 10 commits January 24, 2025 09:35
Python 3.13 has been released a few months ago.
coverage: Prepare for upcoming changes to counter creation

This is a collection of smaller changes to coverage instrumentation code that have been extracted from a larger PR that I'm still working on, in order to hopefully make review easier.

Each individual change should hopefully be mostly self-explanatory. One of the big goals of the upcoming PR will be to defer certain parts of counter-creation until codegen, via the query system, so that ends up being a recurring theme in these changes. Several of the changes are follow-ups to rust-lang#135481.

There should be no observable change in compiler output.
…r=oli-obk

Implement `needs-subprocess` directive, and cleanup a bunch of tests to use `needs-{subprocess,threads}`

### Summary

Closes rust-lang#128295.

- Implements `//@ needs-subprocess` directive in compiletest as requested in rust-lang#128295. However, compiletest is a host tool, so we can't just try to spawn process because that spawns the process on *host*, not the *target*, under cross-compilation scenarios.
    - The short-term solution is to add *Yet Another* list of allow-list targets.
    - The long-term solution is to first check if a `$target` supports std, then try to run a binary to do run-time capability detection *on the target*. But that is tricky because you have to build-and-run a binary *for the target*.
    - This PR picks the short-term solution, because the long-term solution is highly non-trivial, and it's already an improvement over individual `ignore-*`s all over the place.
    - Opened an issue about the long-term solution in rust-lang#135928.
- Documents `//@ needs-subprocess` in rustc-dev-guide.
- Replace `ignore-{wasm,wasm32,emscripten,sgx}` with `needs-{subprocess,threads}` where suitable in tests.
- Some drive-by test changes as I was trying to figure out if I could use `needs-{subprocess,threads}` and found some bits needlessly distracting.

Count of tests that use `ignore-{wasm,wasm32,emscripten,sgx}` before and after this PR:

| State | `ignore-sgx` | `ignore-wasm` | `ignore-emscripten` |
| - | - | - | - |
| Before this PR | 96 | 88 | 207 |
| After this PR | 36 | 38 | 61 |

<details>
<summary>Commands used to find out locally</summary>

```
--- before

[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-sgx" tests | wc -l
96
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-wasm" tests | wc -l
88
[17:40] Joe:rust (fresh) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
207

--- after

[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-sgx" tests | wc -l
36
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-wasm" tests | wc -l
38
[17:39] Joe:rust (needs-subprocess-thread) | rg --no-ignore -l "ignore-emscripten" tests | wc -l
61
```
</details>

### Review advice

- Best reviewed commit-by-commit.
- Non-trivial test changes (not mechanically simple replacements) are split into individual commits to help with review. Their individual commit messages give some basic description of the changes.
- I *could* split some test changes out into another PR, but I found that I needed to change some tests to `needs-threads`, some to `needs-subprocess`, and some needed to use *both*, so they might conflict and become very annoying.

---

r? ``@ghost`` (need to run try jobs)

try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: i686-mingw
try-job: x86_64-mingw-1
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: test-various
try-job: armhf-gnu
…=onur-ozkan

Tidy Python improvements

Fixes display of Python formatting diffs in tidy, and refactors the code to make it simpler and more robust. Also documents Python formatting and linting in the Rustc dev guide.

Fixes: rust-lang#135942

r? `@onur-ozkan`
Make `Vec::pop_if` a bit more presentable

rust-lang#135488 minus stabilization.

As suggested in rust-lang#135488 (comment).

r? tgross35
…ngjubilee

[AIX] Allow different sized load and store in `tests/assembly/powerpc64-struct-abi.rs`

Sometimes in the llvm backend generates 2 different copy assembly sequence.

1. `lxvd2x` followed immediately by `stxvd2x` (Load VSX Vector 2 Dword, Store VSX Vector 2 Dword) is semantically equivalent to;
2. `lxvw4x` followed immediately by `stxvw4x` (Load VSX Vector 4 Word, Store VSX Vector 4 Word)
Doc difference between extend and extend_from_slice

fixes rust-lang#97119
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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. rollup A PR which is a rollup labels Jan 24, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 24, 2025

📌 Commit ed77bf7 has been approved by matthiaskrgr

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 Jan 24, 2025
@bors
Copy link
Contributor

bors commented Jan 24, 2025

⌛ Testing commit ed77bf7 with merge 1e9b017...

@bors
Copy link
Contributor

bors commented Jan 24, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 1e9b017 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 24, 2025
@bors bors merged commit 1e9b017 into rust-lang:master Jan 24, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 24, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#135873 coverage: Prepare for upcoming changes to counter creation 90f031501ae4fccd5b899a58ef8990b3b12bba40 (link)
#135926 Implement needs-subprocess directive, and cleanup a bunch… 6a5c2316a6dae93ae7a77f4ded050c3f3b672f12 (link)
#135950 Tidy Python improvements 0d2d726f52fa32b10440a20f1243817f7c2e7394 (link)
#135956 Make Vec::pop_if a bit more presentable ca82e91f2eddf61ef77a390d4e3f94408f75ba0d (link)
#135966 [AIX] Allow different sized load and store in `tests/assemb… 9785d1e49329ab0545b82820035de63883c59fb5 (link)
#135983 Doc difference between extend and extend_from_slice fc378f614699e4b77764708952bbd95a77384eb4 (link)

previous master: 8231e8599e

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 (1e9b017): 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 1.2%, secondary 5.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Cycles

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

Binary size

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

Bootstrap: 773.257s -> 772.08s (-0.15%)
Artifact size: 325.79 MiB -> 325.82 MiB (0.01%)

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-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants