Skip to content

Rollup of 7 pull requests #140633

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 20 commits into from
May 4, 2025
Merged

Rollup of 7 pull requests #140633

merged 20 commits into from
May 4, 2025

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented May 4, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xizheyin and others added 20 commits April 25, 2025 18:58
Fix the test for s390x by enabling s390x vector extension via
`target_feature(enable = "vector")`(rust-lang#127506). As this is is still
gated by `#![feature(s390x_target_feature)]` we need that attribute
also.
To avoid having target-dependent "unwinding panics are not supported
without std" errors, without regressing test intention.
Add the AVX10 target features

Parent rust-lang#138843

Adds the `avx10_target_feature` feature gate, and `avx10.1` and `avx10.2` target features.

It is confirmed that Intel is dropping AVX10/256 (see [this comment](rust-lang#111137 (comment))), so this should be safe to implement now.

The LLVM fix for llvm/llvm-project#135394 was merged, and has been backported to LLVM20, and the patch has also been propagated to rustc in rust-lang#140502

`@rustbot` label O-x86_64 O-x86_32 A-target-feature A-SIMD
Check if format argument is identifier to avoid error err-emit

Fixes rust-lang#139104

When `argument` is not an identifier, it should not be considered a field access. I checked this and if not emit an invalid format string error. I think we could do with a little finer error handling, I'll open an issue to track this down later.

The first commit submits the ui test, the second commits the code and the changes to the test output.

r? compiler
…ins_dyn, r=wesleywiser

Fix test simd/extract-insert-dyn on s390x

Fix the test for s390x by enabling s390x vector extension via `target_feature(enable = "vector")`(rust-lang#127506). As this is is still gated by `#![feature(s390x_target_feature)]` we need that attribute also.
Move some tests out of tests/ui

r? `@jieyouxu`
Adjust some ui tests re. target-dependent errors

Alternatives to optional error annotations in rust-lang#140586:

- Continue to ignore target-dependent additional errors in `tests/ui/panic-runtime/{two-panic-runtimes.rs,tests/ui/panic-runtime/want-abort-got-unwind.rs,tests/ui/panic-runtime/want-abort-got-unwind2.rs}` -- but explain why some targets have more errors than others.
- Use `-Cpanic=abort` for `tests/ui/cfg/cfg_false_no_std-2.rs`. In that test, the panic strategy does not matter w.r.t. test intention.
- Adjust FIXMEs in `tests/ui/debuginfo/debuginfo-type-name-layout-ice-94961-2.rs` to track it in rust-lang#140620.

---

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

Report the `unsafe_attr_outside_unsafe` lint at the closest node

This PR have `AstValidation` track a linting node id and then uses it when reporting the `unsafe_attr_outside_unsafe` lint, so that instead of being bound at the crate-root, `#[allow]` of the lint works at any node.

Fixes rust-lang#140602
r? `@jieyouxu`
…manieu

allow `#[rustfmt::skip]` in combination with `#[naked]`

fixes rust-lang#140623

We very deliberately use an allowlist to prevent weird interactions with `#[naked]`, hopefully we've now found all of the useful combinations.

cc `@Amanieu`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. rollup A PR which is a rollup labels May 4, 2025
@Zalathar
Copy link
Contributor Author

Zalathar commented May 4, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 4, 2025

📌 Commit 1239f49 has been approved by Zalathar

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 May 4, 2025
@bors
Copy link
Collaborator

bors commented May 4, 2025

⌛ Testing commit 1239f49 with merge 622ac043764d5d4ffff8de8cf86a1cc938a8a71b...

@bors
Copy link
Collaborator

bors commented May 4, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing 622ac04 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 4, 2025
@bors bors merged commit 622ac04 into rust-lang:master May 4, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 4, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139675 Add the AVX10 target features 7d485f8b93f6341239248c61866d2d60bd7d12ea (link)
#140286 Check if format argument is identifier to avoid error err-e… 4841a77acc628772c10bcda8583ce758bd952319 (link)
#140456 Fix test simd/extract-insert-dyn on s390x 38cb96bffa76e3d504e06d0b7035c55ec651c341 (link)
#140551 Move some tests out of tests/ui cecfdc0645a3d9f0f412f72bbd476d344b537895 (link)
#140588 Adjust some ui tests re. target-dependent errors 39b732da7384ceae448f4fc1e142a0737d202ad2 (link)
#140617 Report the unsafe_attr_outside_unsafe lint at the closest… 9a2955be70eedfbc39fd6122f232fbc6590a8892 (link)
#140626 allow #[rustfmt::skip] in combination with #[naked] e2346b3ff1f9be052bd2fd19db82d041427e7da7 (link)

previous master: 1bea580f36

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

github-actions bot commented May 4, 2025

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 1bea580 (parent) -> 622ac04 (this PR)

Test differences

Show 45 test diffs

Stage 1

  • [ui] tests/ui/attributes/no_link/multiple-crates-and-no_link.rs: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/no_link/no-link-unknown-crate.rs: [missing] -> pass (J1)
  • [ui] tests/ui/cross-crate/inline-cross-crate.rs: [missing] -> pass (J1)
  • [ui] tests/ui/cross-crate/llvm-miscompile-MarkValue-MaybeLive.rs: [missing] -> pass (J1)
  • [ui] tests/ui/feature-gates/feature-gate-avx10_target_feature.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-privacy-xc-1.rs: pass -> [missing] (J1)
  • [ui] tests/ui/inner-static.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issue-13560.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issue-18502.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issue-24106.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issue-76387-llvm-miscompile.rs: pass -> [missing] (J1)
  • [ui] tests/ui/macros/non-fmt-panic.rs: [missing] -> pass (J1)
  • [ui] tests/ui/no-link-unknown-crate.rs: pass -> [missing] (J1)
  • [ui] tests/ui/non-fmt-panic.rs: pass -> [missing] (J1)
  • [ui] tests/ui/parser/issues/invalid-parse-format-issue-139104.rs: [missing] -> pass (J1)
  • [ui] tests/ui/pattern/cross-crate-enum-pattern.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/impl-privacy-cross-crate-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/impl-privacy-cross-crate-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/impl-privacy-xc-2.rs: pass -> [missing] (J1)
  • [ui] tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-allow.rs: [missing] -> pass (J1)
  • [ui] tests/ui/statics/inner-static.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/attributes/no_link/no-link-unknown-crate.rs: [missing] -> pass (J0)
  • [ui] tests/ui/cross-crate/inline-cross-crate.rs: [missing] -> pass (J0)
  • [ui] tests/ui/cross-crate/llvm-miscompile-MarkValue-MaybeLive.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-privacy-xc-1.rs: pass -> [missing] (J0)
  • [ui] tests/ui/inner-static.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issue-18502.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issue-24106.rs: pass -> [missing] (J0)
  • [ui] tests/ui/issue-76387-llvm-miscompile.rs: pass -> [missing] (J0)
  • [ui] tests/ui/macros/non-fmt-panic.rs: [missing] -> pass (J0)
  • [ui] tests/ui/no-link-unknown-crate.rs: pass -> [missing] (J0)
  • [ui] tests/ui/non-fmt-panic.rs: pass -> [missing] (J0)
  • [ui] tests/ui/parser/issues/invalid-parse-format-issue-139104.rs: [missing] -> pass (J0)
  • [ui] tests/ui/pattern/cross-crate-enum-pattern.rs: [missing] -> pass (J0)
  • [ui] tests/ui/privacy/impl-privacy-cross-crate-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/privacy/impl-privacy-cross-crate-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/privacy/impl-privacy-xc-2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/rust-2024/unsafe-attributes/unsafe-attributes-allow.rs: [missing] -> pass (J0)
  • [ui] tests/ui/statics/inner-static.rs: [missing] -> pass (J0)
  • [ui] tests/ui/feature-gates/feature-gate-avx10_target_feature.rs: [missing] -> pass (J2)
  • [ui] tests/ui/issue-13560.rs: pass -> [missing] (J3)
  • [ui] tests/ui/attributes/no_link/multiple-crates-and-no_link.rs: [missing] -> ignore (skipping test as target does not support all of the crate types ["dylib"]) (J4)
  • [ui] tests/ui/issue-13560.rs: ignore (ignored when cross-compiling ((needs dylibs and compiletest doesn't have a more specific header))) -> [missing] (J5)
  • [ui] tests/ui/feature-gates/feature-gate-avx10_target_feature.rs: [missing] -> ignore (only executed when the architecture is x86_64) (J6)
  • [ui] tests/ui/attributes/no_link/multiple-crates-and-no_link.rs: [missing] -> pass (J7)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 622ac043764d5d4ffff8de8cf86a1cc938a8a71b --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-apple-various: 6832.9s -> 5647.8s (-17.3%)
  2. x86_64-apple-1: 7779.5s -> 6868.4s (-11.7%)
  3. dist-arm-linux: 4806.3s -> 5266.8s (9.6%)
  4. dist-x86_64-mingw: 7463.5s -> 8166.4s (9.4%)
  5. aarch64-apple: 3621.5s -> 3920.1s (8.2%)
  6. x86_64-msvc-1: 9364.2s -> 8612.9s (-8.0%)
  7. x86_64-apple-2: 4535.9s -> 4220.9s (-6.9%)
  8. x86_64-rust-for-linux: 2691.2s -> 2543.0s (-5.5%)
  9. test-various: 3957.0s -> 4167.7s (5.3%)
  10. dist-aarch64-apple: 5368.1s -> 5641.0s (5.1%)
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 (622ac04): comparison URL.

Overall result: ❌✅ regressions and improvements - 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

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)
1.2% [0.2%, 13.4%] 77
Regressions ❌
(secondary)
1.9% [0.2%, 11.0%] 155
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [-1.5%, 13.4%] 78

Max RSS (memory usage)

Results (primary -0.2%, secondary -1.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)
0.7% [0.5%, 0.8%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.2%, -0.4%] 11
Improvements ✅
(secondary)
-1.2% [-1.9%, -0.9%] 3
All ❌✅ (primary) -0.2% [-1.2%, 0.8%] 17

Cycles

Results (primary 0.9%, secondary 2.9%)

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% [0.4%, 3.7%] 33
Regressions ❌
(secondary)
2.9% [1.6%, 5.1%] 18
Improvements ✅
(primary)
-0.8% [-1.4%, -0.4%] 7
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [-1.4%, 3.7%] 40

Binary size

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

Bootstrap: 770.15s -> 770.602s (0.06%)
Artifact size: 365.38 MiB -> 365.45 MiB (0.02%)

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

lqd commented May 4, 2025

@rust-timer build 9a2955b

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9a2955b): comparison URL.

Overall result: no relevant changes - no action needed

Instruction count

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

Max RSS (memory usage)

Results (primary -0.3%)

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% [0.7%, 2.5%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-1.1%, -0.4%] 19
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.3% [-1.1%, 2.5%] 24

Cycles

Results (primary 0.3%)

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)
0.5% [0.4%, 0.7%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [-0.8%, 0.7%] 8

Binary size

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

Bootstrap: 770.15s -> 770.37s (0.03%)
Artifact size: 365.38 MiB -> 365.33 MiB (-0.01%)

@Zalathar
Copy link
Contributor Author

Zalathar commented May 4, 2025

@rust-timer build 4841a77

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4841a77): comparison URL.

Overall result: no relevant changes - no action needed

Instruction count

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

Max RSS (memory usage)

Results (primary 0.4%)

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)
0.7% [0.4%, 2.0%] 16
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.4% [-2.3%, -0.6%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-2.3%, 2.0%] 19

Cycles

Results (primary -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)
0.5% [0.4%, 0.7%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-1.6%, -0.4%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-1.6%, 0.7%] 8

Binary size

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

Bootstrap: 770.15s -> 770.268s (0.02%)
Artifact size: 365.38 MiB -> 365.37 MiB (-0.00%)

@Kobzol
Copy link
Contributor

Kobzol commented May 4, 2025

@rust-timer build 7d485f8

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7d485f8): comparison URL.

Overall result: ❌ regressions - please read the text below

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)
1.4% [0.2%, 13.1%] 65
Regressions ❌
(secondary)
1.9% [0.2%, 10.8%] 146
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [0.2%, 13.1%] 65

Max RSS (memory usage)

Results (primary -0.3%, secondary -1.3%)

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)
0.9% [0.6%, 1.2%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-2.8%, -0.4%] 26
Improvements ✅
(secondary)
-1.3% [-2.1%, -0.9%] 3
All ❌✅ (primary) -0.3% [-2.8%, 1.2%] 33

Cycles

Results (primary 0.7%, secondary 2.6%)

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)
0.8% [0.4%, 3.8%] 11
Regressions ❌
(secondary)
2.6% [2.0%, 3.7%] 11
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [-0.5%, 3.8%] 12

Binary size

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

Bootstrap: 770.15s -> 771.2s (0.14%)
Artifact size: 365.38 MiB -> 365.35 MiB (-0.01%)

bors added a commit to rust-lang-ci/rust that referenced this pull request May 5, 2025
[DO NOT MERGE] Check the perf impact of reverting rust-lang#139675

According to rust-lang#140633 (comment), the changes in rust-lang#139675 caused many measurable perf regressions. We can double-check that result by benchmarking a revert.

---
This reverts commit ed7590f, reversing changes made to 3559e0a.

r? ghost
@Kobzol
Copy link
Contributor

Kobzol commented May 5, 2025

The regression was caused by #139675 (see also #140652). Since this really only affects helloworld and is just a tiny icount regression for larger crates, and it is expected that the perf. regression will be resolved in the next LLVM upgrade, I think that it's fine if we just eat the regression for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.