Skip to content

Rollup of 7 pull requests #145223

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 14 commits into from
Aug 10, 2025
Merged

Rollup of 7 pull requests #145223

merged 14 commits into from
Aug 10, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Aug 10, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

okaneco and others added 14 commits August 7, 2025 15:11
Add codegen test for issue where `valid_index.saturating_sub(X)` produced an
extra bounds check.
This was fixed by the LLVM upgrade.
The `security_attributes` function is marked as safe despite taking a raw pointer which will later be used. Fortunately this function is only used internally and only in one place that has been basically the same for a decade now.

However, we only ever set one bool so it's easy enough to replace with something that's actually safe.
…=jieyouxu

Rehome 32 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

rust-lang#143902 divided into smaller, easier to review chunks.

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
…tests, r=nikic

Add regression test for `saturating_sub` bounds check issue

Add codegen test for issue where `valid_index.saturating_sub(X)` produced an extra bounds check.
This was fixed by the LLVM upgrade.

Closes rust-lang#139759
…rd-party-siphash, r=Kobzol

bootstrap: `x.py dist rustc-src` should keep LLVM's siphash

Fixes rust-lang#145117
…crum

Replace unsafe `security_attributes` function with safe `inherit_handle` alternative

The `security_attributes` function is marked as safe despite taking a raw pointer which will later be used. Fortunately this function is only used internally and only in one place that has been basically the same for a decade now. However, we only ever set one bool so it's easy enough to replace with something that's actually safe.

In the future we might want to expose the ability for users to set security attributes. But that should be properly designed (and safe!).
Use `eq_ignore_ascii_case` to avoid heap alloc in `detect_confuse_type`

A small optimization has been made, using `to_ascii_lowercase()` instead of `to_lowercase().to_string()`.

r? compiler
…nieu

Fix typo with paren rustc_llvm/build.rs

The current parenthesis looks suspect: it means that OpenHarmony is always excluded whereas it looks like it was intended to only be excluded if the architecture was Arm.

Since Rust doesn't support the other architectures with OpenHarmony, there currently isn't a bug but this cleans up some suspicious code and avoids a potential future annoyance for someone trying to bring up a new triple.

r? `@Amanieu`
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Aug 10, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Aug 10, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 10, 2025

📌 Commit c9847db 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 10, 2025
@bors
Copy link
Collaborator

bors commented Aug 10, 2025

⌛ Testing commit c9847db with merge c8ca44c...

@bors
Copy link
Collaborator

bors commented Aug 10, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 10, 2025
@bors bors merged commit c8ca44c into rust-lang:master Aug 10, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 10, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#144553 Rehome 32 tests/ui/issues/ tests to other subdirectories … a0c0b148919bdc8b5e6860e3ebfaee018d5594af (link)
#145064 Add regression test for saturating_sub bounds check issue c6417ac20ff34093b8a2f3f890ef0d5f47fda714 (link)
#145121 bootstrap: x.py dist rustc-src should keep LLVM's siphash ee46a0e27bdf48999a13605004b9ecf8d529ac86 (link)
#145150 Replace unsafe security_attributes function with safe `in… 64f87d2788511d42c6af9f4cd80f3d19de5268e9 (link)
#145152 Use eq_ignore_ascii_case to avoid heap alloc in `detect_c… ce3ffb8f0843dd0f1451676430fd500ee55c5172 (link)
#145200 mbe: Fix typo in attribute tracing 67f21ea176e9fc1ce058da6313cc16383e3f95f5 (link)
#145222 Fix typo with paren rustc_llvm/build.rs 6f22206bb44b2c4ebc014804fff4a81440769575 (link)

previous master: 29737cb44b

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 29737cb (parent) -> c8ca44c (this PR)

Test differences

Show 135 test diffs

Stage 1

  • [ui] tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs: [missing] -> pass (J0)
  • [ui] tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs: [missing] -> pass (J0)
  • [ui] tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs: [missing] -> pass (J0)
  • [ui] tests/ui/cast/constant-expression-cast-9942.rs: [missing] -> pass (J0)
  • [ui] tests/ui/closures/closure-type-inference-in-context-9129.rs: [missing] -> pass (J0)
  • [ui] tests/ui/coercion/trait-object-coercion-distribution-9951.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs: [missing] -> pass (J0)
  • [ui] tests/ui/cross-crate/generic-newtypes-cross-crate-usage-9155.rs: [missing] -> pass (J0)
  • [ui] tests/ui/deref/dereferenceable-type-behavior-22992.rs: [missing] -> pass (J0)
  • [ui] tests/ui/drop/multiple-drop-safe-code-25549.rs: [missing] -> pass (J0)
  • [ui] tests/ui/editions/edition-specific-identifier-shadowing-53333.rs: [missing] -> pass (J0)
  • [ui] tests/ui/enum-discriminant/enum-discriminant-const-eval-truncation-9837.rs: [missing] -> pass (J0)
  • [ui] tests/ui/enum/single-variant-enum-deref-error-9814.rs: [missing] -> pass (J0)
  • [ui] tests/ui/enum/zero-variant-enum-pattern-matching-3037.rs: [missing] -> pass (J0)
  • [ui] tests/ui/imports/pub-use-link-errors-9968.rs: [missing] -> pass (J0)
  • [ui] tests/ui/issues/issue-21655.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-23442.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-24365.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-25386.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-25549-multiple-drop.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-29710.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-30236.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-3037.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-30756.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-53333.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9047.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9110.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9129.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-91489.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9155.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9243.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9249.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-92741.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9725.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9814.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9837.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9906.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9942.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9951.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-9968.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issues/issue-99838.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lifetimes/struct-with-lifetime-parameters-9259.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs: [missing] -> pass (J0)
  • [ui] tests/ui/loops/loop-with-label-9047.rs: [missing] -> pass (J0)
  • [ui] tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs: [missing] -> pass (J0)
  • [ui] tests/ui/packed/misaligned-reference-drop-field-99838.rs: [missing] -> pass (J0)
  • [ui] tests/ui/pattern/unit-variant-pattern-matching-29383.rs: [missing] -> pass (J0)
  • [ui] tests/ui/structs/struct-field-access-errors-24365.rs: [missing] -> pass (J0)
  • [ui] tests/ui/typeck/unused-type-parameter-span-30236.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/issues/saturating-sub-index-139759.rs: [missing] -> ignore (ignored when the LLVM version 19.1.1 is older than 21.0.0) (J3)

Stage 2

  • [ui] tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs: [missing] -> pass (J1)
  • [ui] tests/ui/autoref-autoderef/auto-deref-on-cow-regression-91489.rs: [missing] -> pass (J1)
  • [ui] tests/ui/binding/struct-destructuring-repeated-bindings-9725.rs: [missing] -> pass (J1)
  • [ui] tests/ui/coercion/trait-object-coercion-distribution-9951.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/try-from-with-const-genericsrs-98299.rs: [missing] -> pass (J1)
  • [ui] tests/ui/cross-crate/reexported-structs-impls-link-error-9906.rs: [missing] -> pass (J1)
  • [ui] tests/ui/deref/dereferenceable-type-behavior-22992.rs: [missing] -> pass (J1)
  • [ui] tests/ui/drop/static-variable-with-drop-trait-9243.rs: [missing] -> pass (J1)
  • [ui] tests/ui/enum/single-variant-enum-deref-error-9814.rs: [missing] -> pass (J1)
  • [ui] tests/ui/imports/pub-use-link-errors-9968.rs: [missing] -> pass (J1)
  • [ui] tests/ui/issues/issue-22992.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-23442.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-24365.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-25549-multiple-drop.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-29710.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-3037.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-53333.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-88150.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9047.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9110.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9129.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-91489.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9155.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9243.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9249.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9259.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-92741.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9737.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9814.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-98299.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9837.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9906.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9951.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-9968.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-99838.rs: pass -> [missing] (J1)
  • [ui] tests/ui/iterators/for-loop-over-mut-iterator-21655.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/unused-results-lint-triggered-by-derive-debug-29710.rs: [missing] -> pass (J1)
  • [ui] tests/ui/loops/loop-with-label-9047.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/macro-expansion-module-structure-9110.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/macro-invocation-with-variable-in-scope-9737.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/private-struct-member-macro-access-25386.rs: [missing] -> pass (J1)
  • [ui] tests/ui/mismatched_types/newlines-in-diagnostic-fix-suggestions-92741.rs: [missing] -> pass (J1)
  • [ui] tests/ui/packed/misaligned-reference-drop-field-99838.rs: [missing] -> pass (J1)
  • [ui] tests/ui/pattern/unit-variant-pattern-matching-29383.rs: [missing] -> pass (J1)
  • [ui] tests/ui/structs/struct-field-access-errors-24365.rs: [missing] -> pass (J1)
  • [ui] tests/ui/thread-local/thread-local-with-attributes-30756.rs: [missing] -> pass (J1)
  • [ui] tests/ui/typeck/unused-type-parameter-span-30236.rs: [missing] -> pass (J1)
  • [ui] tests/ui/uninhabited/uninhabited-type-layout-computation-88150.rs: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/issues/saturating-sub-index-139759.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/issues/saturating-sub-index-139759.rs: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J4)

(and 33 additional test diffs)

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 c8ca44c98eade864824a3c0a15fbdc1edb7f9dd4 --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-aarch64-linux: 5790.9s -> 8024.5s (38.6%)
  2. x86_64-apple-2: 5631.9s -> 3918.3s (-30.4%)
  3. x86_64-apple-1: 8080.9s -> 9553.5s (18.2%)
  4. dist-aarch64-apple: 5490.8s -> 6231.4s (13.5%)
  5. dist-various-2: 2948.5s -> 3212.1s (8.9%)
  6. x86_64-gnu-llvm-20-2: 6000.8s -> 6483.7s (8.0%)
  7. tidy: 107.0s -> 115.1s (7.5%)
  8. dist-x86_64-apple: 9227.9s -> 8566.4s (-7.2%)
  9. dist-x86_64-msvc-alt: 8885.9s -> 9493.0s (6.8%)
  10. pr-check-2: 2645.5s -> 2825.8s (6.8%)
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 (c8ca44c): 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 (secondary 2.7%)

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.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.5%, secondary -0.6%)

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.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
-2.5% [-2.8%, -2.2%] 3
Improvements ✅
(secondary)
-2.3% [-2.5%, -2.1%] 2
All ❌✅ (primary) -2.5% [-2.8%, -2.2%] 3

Binary size

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

Bootstrap: 464.526s -> 464.929s (0.09%)
Artifact size: 377.35 MiB -> 377.32 MiB (-0.01%)

@jhpratt jhpratt deleted the rollup-xcqbwqe branch August 12, 2025 18:09
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. 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.