Skip to content

Rollup of 7 pull requests #144562

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 21 commits into from
Jul 28, 2025
Merged

Rollup of 7 pull requests #144562

merged 21 commits into from
Jul 28, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 28, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

usamoi and others added 21 commits July 19, 2025 22:17
Make it clearer where unit tests are allowed and restrict standard
library unit tests inside the same package to std_detect, std and test.
* Fix riscv testing. Previously the mod tests; would be looking for
  src/detect/os/tests.rs.
* Replace a test with an unnamed const item. It is testing that no
  warnings are emitted. It doesn't contain any checks that need to run
  at runtime. Replacing the test allows removing the tidy:skip directive
  for test locations.
Remove usage of Any, reduce visibility of fields and remove unused
backend arguments.
Mark `floor_char_boundary`, `ceil_char_boundary` const
Simplify the implementations, reducing the number of arithmetic operations
Nobody seems to actually use this, while still adding some extra
complexity to the already rather complex codegen coordinator code.
It is also not supported by any backend other than the LLVM backend.
In obscure circumstances, we would sometimes emit a covfun record for a
function with no physical coverage counters, causing `llvm-cov` to fail with
the cryptic error message:

    malformed instrumentation profile data: function name is empty

We can eliminate this mismatch by removing `instances_used` entirely, and
instead inferring its contents from the keys of `pgo_func_name_var_map`.

This makes it impossible for a "used" function to lack a PGO name entry.
update `Atomic*::from_ptr` and `Atomic*::as_ptr` docs

Since rust-lang#128778, it's allowed to perform atomic read and non-atomic read on the same atomic at the same time. Update the `Atomic*::from_ptr` and `Atomic*::as_ptr` documentation to remove expressions such as `not allowed to mix atomic and non-atomic accesses`.

see also [std::sync::atomic](https://doc.rust-lang.org/std/sync/atomic/index.html#memory-model-for-atomic-accesses)
`tests/ui/issues/`: The Issues Strike Back [1/N]

I believe I’ve finally brought [my program](https://github.com/Kivooeo/test-manager) to life -- it now handles multiple test moves in one go: plain moves first, then a gentle touch on each file depends on given options. The process should be much smoother now.

Of course, I won’t rush through everything in a few days -- that would be unkind to `@Oneirical.` I’ll pace myself. And also I can't have more than one such PR because `issues.txt` will conflict with previous parts after merging them which is not fun as well.

This PR is just that: first commit - moves; second - regression comments and the occasional .stderr reblesses, also issue.txt and tidy changes. Nothing special, but progress nonetheless. This is for the purpose of preserving test file history during restructuring

Part of rust-lang#133895.

r? `@jieyouxu`
…ges, r=Mark-Simulacrum

Add a ratchet for moving all standard library tests to separate packages

rust-lang#136642 is the previous PR in this series. See rust-lang#135937 for the rationale of wanting to move all standard library tests to separate packages.

This also fixes std_detect testing on riscv.
str: Mark unstable `round_char_boundary` feature functions as const

Mark `floor_char_boundary`, `ceil_char_boundary` const
Simplify the implementations, reducing the number of arithmetic operations

It seems unnecessary to do the lower/upper bounds calculations and extra slicing when we can jump straight to inspecting the bytes, assuming the underlying data is valid UTF-8.

Tracking issue rust-lang#93743
Various refactors to the codegen coordinator code (part 3)

Continuing from rust-lang#144062 this removes an option without any known users, uses the object crate in favor of LLVM for getting the LTO bitcode and improves the coordinator channel handling.
coverage: Infer `instances_used` from `pgo_func_name_var_map`

In obscure circumstances involving macro-expanded spans, we would sometimes emit a covfun record for a function with no physical coverage counters, and therefore no corresponding entry in the “PGO names” section of the binary. The absence of that name entry causes `llvm-cov` to fail with the cryptic error message:

```text
malformed instrumentation profile data: function name is empty
```

We can eliminate this mismatch by removing `instances_used` entirely, and instead inferring its contents from the keys of `pgo_func_name_var_map`.

This makes it impossible for a "used" function to lack a PGO name entry.

---

This is an attempt to eliminate the cause of rust-lang#141577 when re-landing changes like rust-lang#144298 in the future.

I haven't been able to reproduce the underlying issue in an in-tree test, because the only known repro involves a non-trivial derive proc-macro that relies on `syn` and `proc-macro2`. But I have manually verified in a separate branch that this change would have prevented the reoccurrence of rust-lang#141577 (comment).
@rustbot rustbot added 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 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 Jul 28, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 28, 2025

📌 Commit c462895 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 Jul 28, 2025
@bors
Copy link
Collaborator

bors commented Jul 28, 2025

⌛ Testing commit c462895 with merge 65b6cdb...

@bors
Copy link
Collaborator

bors commented Jul 28, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 65b6cdb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 28, 2025
@bors bors merged commit 65b6cdb into rust-lang:master Jul 28, 2025
1 check passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 28, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#144072 update Atomic*::from_ptr and Atomic*::as_ptr docs aa0b67a49beaf10d732ec2dced0713ba535b9bb7 (link)
#144151 tests/ui/issues/: The Issues Strike Back [1/N] 60798d63c2de7cb84be69c7158cb55ad0c6ad9e0 (link)
#144300 Clippy fixes for miropt-test-tools 3579c932186d6143cd275ff912f13fcb1b641b8e (link)
#144399 Add a ratchet for moving all standard library tests to sepa… 33174e0647f88770c76dc1c2a7b96699246149af (link)
#144472 str: Mark unstable round_char_boundary feature functions … b6dca512928e9c5bcb19bf132a2faf6e0b28ace9 (link)
#144503 Various refactors to the codegen coordinator code (part 3) 2286c250beac921fe5cd05646166e5d9177e4d58 (link)
#144530 coverage: Infer instances_used from `pgo_func_name_var_ma… 1851747759365dfd89eaed7bc832ad732557bd52 (link)

previous master: d242a8bd5a

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 d242a8b (parent) -> 65b6cdb (this PR)

Test differences

Show 1037 test diffs

Stage 1

  • [ui] tests/ui/borrowck/closure-borrow-conflict-11192.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/trait-object-arrays-11205.rs: [missing] -> pass (J0)
  • [ui] tests/ui/diagnostics-infra/primary-fluent-bundle-missing.rs: [missing] -> pass (J0)
  • [ui] tests/ui/drop/conditional-drop-10734.rs: [missing] -> pass (J0)
  • [ui] tests/ui/drop/trait-object-drop-10802.rs: [missing] -> pass (J0)
  • [ui] tests/ui/extern/extern-rust-fn-type-error-10764.rs: [missing] -> pass (J0)
  • [ui] tests/ui/imports/use-declaration-no-path-segment-prefix.rs: [missing] -> pass (J0)
  • [ui] tests/ui/inference/fnonce-closure-call.rs: [missing] -> pass (J0)
  • [ui] tests/ui/inference/generic-type-inference-10436.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-10228.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10291.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10396.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10412.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10456.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10465.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10545.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10718.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10734.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10764.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10767.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10802.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10853.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10877.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-10902.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11004.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11047.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11085.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11192.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11205.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11267.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-11374.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lifetimes/array-pattern-matching-10396.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/closure-lifetime-bounds-10291.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/container-lifetime-error-11374.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/enum-lifetime-container-10228.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/keyword-self-lifetime-error-10412.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/tuple-struct-vs-struct-with-fields-borrowck-10902.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/missing-doc-unsugard-doc-attr-10853.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/doc-comment-parsing.rs: [missing] -> pass (J0)
  • [ui] tests/ui/pattern/premature-match-scrutinee-temporary-drop-10683.rs: [missing] -> pass (J0)
  • [ui] tests/ui/privacy/struct-field-and-impl-expose-10545.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/blanket-impl-trait-object-10456.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/nested-mod-trait-method-lookup-leak-10465.rs: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias/dummy-binder-102964.rs: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias/static-method-type-alias-11047.rs: [missing] -> pass (J0)
  • [ui] tests/ui/unsafe/raw-pointer-field-access-error.rs: [missing] -> pass (J0)
  • detect::arch::aarch64::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::arm::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::loongarch::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::mips64::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::mips::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::powerpc64::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::powerpc::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::riscv::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::s390x::unexpected_cfgs: pass -> [missing] (J1)
  • detect::arch::x86::unexpected_cfgs: pass -> [missing] (J1)

Stage 2

  • [ui] tests/ui/borrowck/closure-borrow-conflict-11192.rs: [missing] -> pass (J2)
  • [ui] tests/ui/cfg/conditional-compilation-struct-11085.rs: [missing] -> pass (J2)
  • [ui] tests/ui/coercion/trait-object-arrays-11205.rs: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostics-infra/primary-fluent-bundle-missing.rs: [missing] -> pass (J2)
  • [ui] tests/ui/drop/conditional-drop-10734.rs: [missing] -> pass (J2)
  • [ui] tests/ui/drop/trait-object-drop-10802.rs: [missing] -> pass (J2)
  • [ui] tests/ui/extern/extern-rust-fn-type-error-10764.rs: [missing] -> pass (J2)
  • [ui] tests/ui/extern/foreign-fn-pattern-error-10877.rs: [missing] -> pass (J2)
  • [ui] tests/ui/inference/fnonce-closure-call.rs: [missing] -> pass (J2)
  • [ui] tests/ui/inference/generic-type-inference-10436.rs: [missing] -> pass (J2)
  • [ui] tests/ui/issues/issue-10228.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10291.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10396.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10436.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10456.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10465.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10545.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10638.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10683.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10767.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10802.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10853.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10877.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-10902.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11004.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11047.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11085.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11192.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11205.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11267.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-11374.rs: pass -> [missing] (J2)
  • [ui] tests/ui/lifetimes/array-pattern-matching-10396.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lifetimes/closure-lifetime-bounds-10291.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lifetimes/container-lifetime-error-11374.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lifetimes/enum-lifetime-container-10228.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lifetimes/tuple-struct-vs-struct-with-fields-borrowck-10902.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lint/missing-doc-unsugard-doc-attr-10853.rs: [missing] -> pass (J2)
  • [ui] tests/ui/parser/doc-comment-parsing.rs: [missing] -> pass (J2)
  • [ui] tests/ui/pattern/premature-match-scrutinee-temporary-drop-10683.rs: [missing] -> pass (J2)
  • [ui] tests/ui/privacy/struct-field-and-impl-expose-10545.rs: [missing] -> pass (J2)
  • [ui] tests/ui/structs/mutable-unit-struct-borrow-11267.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/nested-mod-trait-method-lookup-leak-10465.rs: [missing] -> pass (J2)
  • [ui] tests/ui/type-alias/dummy-binder-102964.rs: [missing] -> pass (J2)
  • [ui] tests/ui/unsafe/raw-pointer-field-access-error.rs: [missing] -> pass (J2)

(and 18 additional test diffs)

Additionally, 919 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 65b6cdb6a6d33987b9d642a4882283c71fbe3957 --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-apple-2: 6836.7s -> 4791.6s (-29.9%)
  2. dist-x86_64-apple: 11534.9s -> 8190.2s (-29.0%)
  3. dist-aarch64-linux: 8372.6s -> 6130.7s (-26.8%)
  4. aarch64-apple: 7092.1s -> 5589.3s (-21.2%)
  5. dist-i686-mingw: 7855.0s -> 8874.2s (13.0%)
  6. dist-aarch64-apple: 6899.2s -> 7587.6s (10.0%)
  7. x86_64-apple-1: 8425.8s -> 7842.6s (-6.9%)
  8. dist-aarch64-msvc: 5324.2s -> 5688.7s (6.8%)
  9. aarch64-gnu-debug: 4124.2s -> 4373.4s (6.0%)
  10. dist-i586-gnu-i586-i686-musl: 5966.8s -> 5608.6s (-6.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 (65b6cdb): comparison URL.

Overall result: ❌ regressions - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.9% [0.9%, 1.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.4%, secondary 1.4%)

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)
4.7% [4.7%, 4.7%] 1
Improvements ✅
(primary)
-1.4% [-1.6%, -1.3%] 2
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) -1.4% [-1.6%, -1.3%] 2

Cycles

Results (secondary -0.1%)

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)
2.4% [2.1%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.8%, -2.5%] 2
All ❌✅ (primary) - - 0

Binary size

Results (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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.1%, -0.0%] 32
All ❌✅ (primary) - - 0

Bootstrap: 465.115s -> 468.035s (0.63%)
Artifact size: 376.87 MiB -> 376.82 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 28, 2025
@lqd
Copy link
Member

lqd commented Jul 28, 2025

match-stress is being noisy, and returned to normal on the next merge

image

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jul 28, 2025
@lqd
Copy link
Member

lqd commented Jul 28, 2025

the perfbot should wait for the next merge before notifying people :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.