Skip to content

Rollup of 10 pull requests #143919

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 29 commits into from
Jul 14, 2025
Merged

Rollup of 10 pull requests #143919

merged 29 commits into from
Jul 14, 2025

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Jul 14, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 29 commits July 9, 2025 14:46
Co-authored-by: Jakub Beránek <[email protected]>
These seem like they were missed in <rust-lang#141224>
…zelmann

Port #[link_ordinal] to the new attribute parsing infrastructure

Ports link_ordinal to the new attribute parsing infrastructure for rust-lang#131229 (comment)
…r=Kobzol

bootstrap/miri: avoid rebuilds for test builds

When building Miri in its own repo, we always build with `--all-targets`:
https://github.com/rust-lang/rust/blob/a00961269107703772c4e8f071f0accbe0f1a7e5/src/tools/miri/miri-script/src/util.rs#L167-L174
This saves a bunch of time since some of Miri's dependencies get more features enabled by some of Miri's dev-dependencies, and they all get built twice otherwise if you do `cargo build && cargo test` (which is typically what you end up doing inside `./miri test` and also inside `./x test miri`).

This applies the same approach to bootstrap, drastically reducing the edit-compile cycle for Miri work here. :)
…r=Kobzol

Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand

This is a followup to rust-lang#142379 to make the bootstrap option `tool.TOOL_NAME.features` work on any subcommand instead of just build (so also run/test/...). I also made the `TOOL_NAME` comparisons look at the tool path instead of the tool name to determine to which tool a `TOOL_NAME` refers to, so you can specify tools by path like in other places of the bootstrap (e.g. `tool."tools/miri".features`).
…g, r=jieyouxu

Compiletest: Simplify {Html,Json}DocCk directive handling

So much more maintainable and extensible.

r? ````@jieyouxu```` as discussed
…t, r=compiler-errors

update issue number for `const_trait_impl`

r? project-const-traits

cc rust-lang#67792 rust-lang#143874
Use zero for initialized Once state

By re-labeling which integer represents which internal state for `Once` we can ensure that the initialized state is the all-zero state. This is beneficial because some CPU architectures (such as Arm) have specialized instructions to specifically branch on non-zero, and checking for the initialized state is by far the most important operation.

As an example, take this:

```rust
use std::sync::atomic::{AtomicU32, Ordering};

const INIT: u32 = 3;

#[inline(never)]
#[cold]
pub fn slow(state: &AtomicU32) {
    state.store(INIT, Ordering::Release);
}

pub fn ensure_init(state: &AtomicU32) {
    if state.load(Ordering::Acquire) != INIT {
        slow(state)
    }
}
```

If `INIT` is 3 (as is currently the state for `Once`), we see the following assembly on `aarch64-apple-darwin`:

```asm
example::ensure_init::h332061368366e313:
        ldapr   w8, [x0]
        cmp     w8, #3
        b.ne    LBB1_2
        ret
LBB1_2:
        b       example::slow::ha042bd6a4f33724e
```

By changing the `INIT` state to zero we get the following:

```asm
example::ensure_init::h332061368366e313:
        ldapr   w8, [x0]
        cbnz    w8, LBB1_2
        ret
LBB1_2:
        b       example::slow::ha042bd6a4f33724e
```

So this PR saves 1 instruction every time a `LazyLock` gets accessed on platforms such as these.
…jieyouxu

Run bootstrap tests sooner in the `x test` pipeline

With the recently added bootstrap snapshot tests, and in general with our plans to test more things in bootstrap, I feel like the original comment isn't accurate anymore. Recently, on several occasions I had to wait for 40+ minutes of CI just to find out that the bootstrap snapshot tests have failed. I think we should run bootstrap tests towards the beginning instead now.

r? ```@jieyouxu```
…-to-allocation, r=oli-obk

Change "allocated object" to "allocation".

These seem like they were missed in <rust-lang#141224>
Tier check cleanup

clippy cleanup + edition 2024
@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Jul 14, 2025
@rustbot rustbot added 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-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 Jul 14, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Jul 14, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 14, 2025

📌 Commit 0d69847 has been approved by Kobzol

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

bors commented Jul 14, 2025

⌛ Testing commit 0d69847 with merge cccf075...

@jdonszelmann
Copy link
Contributor

@rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 14, 2025
@jdonszelmann
Copy link
Contributor

Oh shit that's the wrong pr, I'm so sorry. How do I cancel this?

@Kobzol
Copy link
Member Author

Kobzol commented Jul 14, 2025

That's not really possible 😅 Interesting, I don't think we ever hit this edge case before. Let's see how rustc-perf deals with it :D

@bors
Copy link
Collaborator

bors commented Jul 14, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing cccf075 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 14, 2025
@bors bors merged commit cccf075 into rust-lang:master Jul 14, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 14, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143217 Port #[link_ordinal] to the new attribute parsing infrastru… fc4a71ae42849aa4d69510e82ac5bb8830eb5c28 (link)
#143681 bootstrap/miri: avoid rebuilds for test builds 9f4f9162bfc6d963c8c15be8ef1ee5caafd662e8 (link)
#143724 Tidy cleanup d01b2000b3be9af8a4be13bfe1040675db7f99d1 (link)
#143733 Change bootstrap's tool.TOOL_NAME.features to work on any… 63bba3af3f9baa4707736fab1a20e523cb6f64a2 (link)
#143850 Compiletest: Simplify {Html,Json}DocCk directive handling a02a92d1c311aa395e319f62c23859d5f830afa8 (link)
#143875 update issue number for const_trait_impl 8432bf8cea0c5500a1ad6541b129e4ac0959a9e2 (link)
#143881 Use zero for initialized Once state 7960f7a5c54c597086f99a44be7588c2cc1e26da (link)
#143887 Run bootstrap tests sooner in the x test pipeline a80ba38ab2e0d90f987b72a5fb3a1ca5652c1b5f (link)
#143917 Change "allocated object" to "allocation". a232161c5c69e2c80606dc348405fbfd6230bb71 (link)
#143918 Tier check cleanup 6f53241f084ba256a57d47a631a7d3bc54732b1f (link)

previous master: 64b185edda

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

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 64b185e (parent) -> cccf075 (this PR)

Test differences

Show 44 test diffs

Stage 1

  • errors::verify_codegen_ssa_aarch64_softfloat_neon_128: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_aarch64_softfloat_neon_130: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_aix_strip_not_used_124: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_aix_strip_not_used_126: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_compiler_builtins_cannot_call_122: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_compiler_builtins_cannot_call_124: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_dlltool_fail_import_library_118: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_dlltool_fail_import_library_120: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_calling_dlltool_120: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_calling_dlltool_122: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_creating_import_library_123: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_creating_import_library_125: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_creating_remark_dir_121: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_creating_remark_dir_123: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_writing_def_file_119: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_writing_def_file_121: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_failed_to_get_layout_117: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_failed_to_get_layout_119: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_feature_not_valid_133: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_feature_not_valid_135: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_forbidden_ctarget_feature_131: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_forbidden_ctarget_feature_133: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_forbidden_target_feature_attr_116: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_forbidden_target_feature_attr_118: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_illegal_link_ordinal_format_116: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_link_ordinal_nargs_115: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_no_mangle_nameless_132: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_no_mangle_nameless_134: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_target_feature_safe_trait_115: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_target_feature_safe_trait_117: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_unknown_ctarget_feature_prefix_129: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_unknown_ctarget_feature_prefix_131: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_unstable_ctarget_feature_130: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_unstable_ctarget_feature_132: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_xcrun_failed_invoking_125: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_failed_invoking_127: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_xcrun_sdk_path_warning_127: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_sdk_path_warning_129: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_xcrun_unsuccessful_126: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_unsuccessful_128: pass -> [missing] (J0)
  • session_diagnostics::verify_attr_parsing_link_ordinal_out_of_range_40: [missing] -> pass (J0)

Stage 2

  • [run-make] tests/run-make/compressed-debuginfo-zstd: ignore (ignored if LLVM wasn't build with zstd for ELF section compression (we want LLVM/LLD to be built with zstd support)) -> pass (J1)

Additionally, 2 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 cccf075eba88363269e8589ebb8d40874cc542d8 --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: 11081.5s -> 6973.3s (-37.1%)
  2. tidy: 55.2s -> 73.2s (32.5%)
  3. dist-aarch64-apple: 5014.2s -> 6609.3s (31.8%)
  4. aarch64-apple: 7150.4s -> 5339.5s (-25.3%)
  5. x86_64-gnu-tools: 4337.7s -> 3577.3s (-17.5%)
  6. x86_64-rust-for-linux: 3588.2s -> 3023.7s (-15.7%)
  7. i686-gnu-1: 7361.8s -> 8518.4s (15.7%)
  8. pr-check-1: 2191.6s -> 1862.3s (-15.0%)
  9. armhf-gnu: 6007.1s -> 5207.9s (-13.3%)
  10. x86_64-gnu: 8074.4s -> 7024.1s (-13.0%)
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

Finished benchmarking commit (cccf075): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (primary -2.3%)

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

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

Cycles

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

Binary size

Results (primary 0.0%, secondary 0.0%)

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

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

Bootstrap: 463.69s -> 463.324s (-0.08%)
Artifact size: 374.63 MiB -> 374.63 MiB (-0.00%)

@Kobzol Kobzol deleted the rollup-acyaygs branch July 14, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend 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. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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-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.