Skip to content

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Mar 17, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

hkBst and others added 13 commits January 31, 2025 17:29
I can't find any dedicated tests that actually exercises the stability
gating (via `-Z unstable-options`) of print requests, so here's a
dedicated one.

I coalesced `tests/ui/feature-gates/feature-gate-print-check-cfg.rs`
into this test, because AFAICT that print request is not feature gated,
but only `-Z unstable-options`-gated just like other unstable print
requests.
… into helpers

To avoid duplicating stability check logic and make the print request
collection logic more straightforward.
…on,TargetSpecJson}`

To correspond to their actual print request names, `target-spec-json`
and `all-target-specs-json`, and for consistency with other print name
<-> print kind mappings.
It's bitflags in practice, so an enum is unsound, as an enum must only
have the described values. The x86_64 psABI declares it as a `typedef
int _Unwind_Action`, which seems reasonable. I made a newtype first but
that was more annoying than just a typedef. We don't really use this
value for much other than a short check.
document capacity for ZST as example

The main text already covers this, although it provides weaker guarantees, but I think an example in the right spot does not hurt. Fixes rust-lang#80747
doc all differences of ptr:copy(_nonoverlapping) with memcpy and memmove

Fixes rust-lang#79430
…-cleanup, r=aDotInTheVoid

refactor `notable_traits_button` to use iterator combinators  instead of for loop

~Small cleanup.
Use `Iterator::any` instead of `for` loop with `predicate = true;`.
I think this makes the code more readable... and also has the additional benefit of short-circuiting the iterator when a notable trait is found (a `break` statement was missing in the `for` loop version, I think). Probably won't be significant enough to show on perf results, though.~

Three commits, each attempting to optimize `notable_trait_buttons` by a little bit.
…=Urgau

Misc print request handling cleanups + a centralized test for print request stability gating

I was working on implementing `--print=supported-crate-types`, then I noticed some things that were mildly annoying me, so I pulled out these changes. In this PR:

- First commit adds a centralized test `tests/ui/print/stability.rs` that is responsible for exercising stability gating of the print requests.
    - AFAICT we didn't have any test that systematically checks this.
    - I coalesced `tests/ui/feature-gates/feature-gate-print-check-cfg.rs` (for `--print=check-cfg`) into this test too, since `--print=check-cfg` is only `-Z unstable-options`-gated like other unstable print requests, and is not additionally feature-gated. cc ``@Urgau`` in case you have any concerns.
- Second commit alphabetically sorts the `PrintKind` enum for consistency because the `PRINT_KINDS` list (using the enum) is *already* alphabetically sorted.
- Third commit pulls out two helpers:
    1. A helper `check_print_request_stability` for checking stability of print requests and the diagnostics for using unstable print requests without `-Z unstable-options`, to avoid repeating the same logic over and over.
    2. A helper `emit_unknown_print_request_help` for the unknown print request diagnostics to make print request collection control flow more obvious.
- Fourth commit renames `PrintKind::{TargetSpec,AllTargetSpecs}` to `PrintKind::{TargetSpecJson,AllTargetSpecsJson}` to better reflect their actual print names, `--print={target-spec-json,all-target-specs-json}`.

r? ``@nnethercote`` (or compiler/reroll)
…, r=workingjubilee

Make `_Unwind_Action` a type alias, not enum

It's bitflags in practice, so an enum is unsound, as an enum must only have the described values. The x86_64 psABI declares it as a `typedef int _Unwind_Action`, which seems reasonable. I made a newtype first but that was more annoying than just a typedef. We don't really use this value for much other than a short check.

I ran `x check library --target aarch64-unknown-linux-gnu,x86_64-pc-windows-gnu,x86_64-fortanix-unknown-sgx,x86_64-unknown-haiku,x86_64-unknown-fuchsi
a,x86_64-unknown-freebsd,x86_64-unknown-dragonfly,x86_64-unknown-netbsd,x86_64-unknown-openbsd,x86_64-unknown-redox,riscv64-linux-android,armv7-unknown-freebsd` (and some more but they failed to build for other reasons :D)

fixes rust-lang#138558

r? workingjubilee have fun
@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-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 Mar 17, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Mar 17, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Mar 17, 2025

📌 Commit 5144055 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 Mar 17, 2025
@bors
Copy link
Collaborator

bors commented Mar 17, 2025

⌛ Testing commit 5144055 with merge 10bcdad...

@bors
Copy link
Collaborator

bors commented Mar 17, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing 10bcdad to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2025
@bors bors merged commit 10bcdad into rust-lang:master Mar 17, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 17, 2025
@jhpratt jhpratt deleted the rollup-h699hty branch March 17, 2025 06:53
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#136293 document capacity for ZST as example 4841e8348e548c79961fa13f47149a220edd67d1 (link)
#136359 doc all differences of ptr:copy(_nonoverlapping) with memcp… b69e86bba7fc092ffc4c344e26a572887c5f6759 (link)
#136816 refactor notable_traits_button to use iterator combinator… 4563114b5ee8fb0968be00aa4b598c755c8176d4 (link)
#138552 Misc print request handling cleanups + a centralized test f… edb2a5315f2727587d281224939aba62d3c58952 (link)
#138573 Make _Unwind_Action a type alias, not enum a17c2ffb1eb0bc82cc02b68feacfb2851648ecea (link)

previous master: c3dd4eefd6

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

Copy link
Contributor

This is an experimental post-merge analysis report. You can ignore it.

Post-merge report

Comparing c3dd4ee (base) -> 10bcdad (this PR)

Test differences

  • [ui] tests/ui/feature-gates/feature-gate-print-check-cfg.rs: pass -> [missing] (J0)
  • [ui] tests/ui/print-request/stability.rs#all_target_specs_json: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#calling_conventions: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#cfg: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#check_cfg: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#code_models: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#crate_name: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#file_names: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#host_tuple: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#link_args: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#native_static_libs: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#relocation_models: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#split_debuginfo: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#stack_protector_strategies: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#target_cpus: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#target_features: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#target_libdir: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#target_list: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#target_spec_json: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#tls_models: [missing] -> pass (J0)
  • [ui] tests/ui/print-request/stability.rs#deployment_target: [missing] -> pass (J1)
  • [ui] tests/ui/print-request/stability.rs#deployment_target: [missing] -> ignore (only executed when the target vendor is Apple) (J2)

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

Job group index

  • J0: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-18-3, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-llvm-19-3, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J1: aarch64-apple, x86_64-apple-2
  • J2: aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-18-3, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-llvm-19-3, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (10bcdad): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

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

Max RSS (memory usage)

Results (primary 0.2%, secondary 0.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)
4.0% [4.0%, 4.0%] 1
Regressions ❌
(secondary)
2.0% [1.6%, 2.2%] 3
Improvements ✅
(primary)
-3.5% [-3.5%, -3.5%] 1
Improvements ✅
(secondary)
-2.4% [-2.5%, -2.3%] 2
All ❌✅ (primary) 0.2% [-3.5%, 4.0%] 2

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: 774.875s -> 775.561s (0.09%)
Artifact size: 365.12 MiB -> 365.14 MiB (0.00%)

github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 26, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang#136293 (document capacity for ZST as example)
 - rust-lang#136359 (doc all differences of ptr:copy(_nonoverlapping) with memcpy and memmove)
 - rust-lang#136816 (refactor `notable_traits_button` to use iterator combinators  instead of for loop)
 - rust-lang#138552 (Misc print request handling cleanups + a centralized test for print request stability gating)
 - rust-lang#138573 (Make `_Unwind_Action` a type alias, not enum)

r? `@ghost`
`@rustbot` modify labels: rollup
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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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-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.

8 participants