Skip to content

Rollup of 4 pull requests #140650

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 9 commits into from
May 5, 2025
Merged

Rollup of 4 pull requests #140650

merged 9 commits into from
May 5, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented May 5, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mejrs and others added 9 commits April 22, 2025 00:19
Simpler predicate.
Compare sample code output to that of the library function.
Includes the following changes:

* Use runtime feature detection for fma routines on x86 [1]

Fixes: rust-lang#140452

[1]: rust-lang/compiler-builtins#896
…gross35

Correct `extract_if` sample equivalent.

Tracking issue: rust-lang#43244

Original PR: rust-lang#133265

The sample code marked as equivalent in the doc comment isn't currently equivalent. Given the same predicate and range, if your vector were `[1, 2, 3, 3, 3, 3, 3, 3, 4, 5, 6]`, then all of the 3s would be removed. `i` is only incremented when an element is dropped, but `range.end` is unchanged, so the items shift down. I got very confused when reading the docs and trying to square this sample code with the explanation of how the function works.

Fortunately, the real `extract_if()` does not have this problem. I've added an `end` variable to align the behavior. I've also taken the opportunity to simplify the predicate, which now just matches odd numbers, and to pad out the vec of numbers to line up the zero-indexed range with the integers in the vec.

r? the8472
Refactor rustc_on_unimplemented's filter parser

Followup to rust-lang#139091; I plan on moving most of this code into `rustc_attr_parsing` at some point, but want to land this separately first.

I have taken care to preserve the original behavior as much as I could:
- All but one of the new error variants are replacements for the ones originally emitted by the cfg parsing machinery; so these errors are not "new".
- the `InvalidFlag` variant is new, this PR turns this (from being ignored and silently doing nothing) into an error:
    ```rust
    #[rustc_on_unimplemented(on(something, message = "y"))]
    //~^ ERROR invalid boolean flag
    //~^^ NOTE expected one of `crate_local`, `direct` or `from_desugaring`, not `something`
    trait InvalidFlag {}
    ```
    This does not occur anywhere except in this test. I couldn't find a way that I liked to keep allowing this or to do nothing, erroring was the cleanest solution.
- There are a bunch of FIXME throughout this and the previous PR, I plan on addressing those in follow up prs..

Finally, this gets rid of the "longest" dependency in rustc:
![image](https://github.com/user-attachments/assets/3c3eb3a0-b7b3-40d9-aada-a752e28c8678)
…, r=Mark-Simulacrum

Revert "Avoid unused clones in Cloned<I> and Copied<I>"

Per libs decision in rust-lang#140207 (comment) this reverts commit ed5f31a (rust-lang#139745)
Update `compiler-builtins` to 0.1.157

Includes the following changes:

* Use runtime feature detection for fma routines on x86 [1]

Fixes: rust-lang#140452

[1]: rust-lang/compiler-builtins#896
@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. rollup A PR which is a rollup labels May 5, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented May 5, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 5, 2025

📌 Commit 512dab0 has been approved by tgross35

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

bors commented May 5, 2025

⌛ Testing commit 512dab0 with merge 54d024e...

@bors
Copy link
Collaborator

bors commented May 5, 2025

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing 54d024e to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#135734 Correct extract_if sample equivalent. 076684e76406c4968df5d8d503dea611daa4e61c (link)
#140307 Refactor rustc_on_unimplemented's filter parser bd3d17294e42d687a8b9eff0c4a0b17cd99f783b (link)
#140644 Revert "Avoid unused clones in Cloned and Copied" 70151fec3cfbad2b77d8ebf53b5e64f0008d8749 (link)
#140648 Update compiler-builtins to 0.1.157 5b3f33f427d9e73b7808ee662f6b6833061ace71 (link)

previous master: cd55868a8d

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 5, 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 cd55868 (parent) -> 54d024e (this PR)

Test differences

Show 102 test diffs

Stage 1

  • errors::verify_trait_selection_async_closure_not_fn_14: pass -> [missing] (J0)
  • errors::verify_trait_selection_async_closure_not_fn_18: [missing] -> pass (J0)
  • errors::verify_trait_selection_but_calling_introduces_17: pass -> [missing] (J0)
  • errors::verify_trait_selection_but_calling_introduces_21: [missing] -> pass (J0)
  • errors::verify_trait_selection_but_needs_to_satisfy_18: pass -> [missing] (J0)
  • errors::verify_trait_selection_but_needs_to_satisfy_22: [missing] -> pass (J0)
  • errors::verify_trait_selection_empty_on_clause_in_rustc_on_unimplemented_10: pass -> [missing] (J0)
  • errors::verify_trait_selection_explicit_lifetime_required_with_ident_15: pass -> [missing] (J0)
  • errors::verify_trait_selection_explicit_lifetime_required_with_ident_19: [missing] -> pass (J0)
  • errors::verify_trait_selection_explicit_lifetime_required_with_param_type_16: pass -> [missing] (J0)
  • errors::verify_trait_selection_explicit_lifetime_required_with_param_type_20: [missing] -> pass (J0)
  • errors::verify_trait_selection_inherent_projection_normalization_overflow_13: pass -> [missing] (J0)
  • errors::verify_trait_selection_inherent_projection_normalization_overflow_17: [missing] -> pass (J0)
  • errors::verify_trait_selection_invalid_on_clause_in_rustc_on_unimplemented_11: pass -> [missing] (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_19: pass -> [missing] (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_20: pass -> [missing] (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_21: pass -> [missing] (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_22: pass -> [missing] (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_24: [missing] -> pass (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_25: [missing] -> pass (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_26: [missing] -> pass (J0)
  • errors::verify_trait_selection_lf_bound_not_satisfied_27: [missing] -> pass (J0)
  • errors::verify_trait_selection_no_value_in_rustc_on_unimplemented_12: pass -> [missing] (J0)
  • errors::verify_trait_selection_opaque_captures_lifetime_24: pass -> [missing] (J0)
  • errors::verify_trait_selection_opaque_captures_lifetime_28: [missing] -> pass (J0)
  • errors::verify_trait_selection_opaque_type_non_generic_param_25: pass -> [missing] (J0)
  • errors::verify_trait_selection_opaque_type_non_generic_param_29: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_empty_on_clause_10: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_expected_identifier_13: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_expected_one_predicate_in_not_11: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_invalid_flag_15: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_invalid_predicate_14: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_missing_value_16: [missing] -> pass (J0)
  • errors::verify_trait_selection_rustc_on_unimplemented_unsupported_literal_in_on_12: [missing] -> pass (J0)

Additionally, 68 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 54d024e4bf462c77a86c4126d7e66d89b64f053a --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: 10703.8s -> 9028.6s (-15.7%)
  2. dist-apple-various: 6559.4s -> 7563.1s (15.3%)
  3. aarch64-apple: 4485.9s -> 3919.8s (-12.6%)
  4. dist-arm-linux: 5037.6s -> 5588.5s (10.9%)
  5. dist-aarch64-linux: 5398.2s -> 5987.7s (10.9%)
  6. x86_64-apple-1: 7381.8s -> 8024.0s (8.7%)
  7. i686-gnu-2: 6862.9s -> 6362.7s (-7.3%)
  8. dist-aarch64-apple: 4759.0s -> 5084.7s (6.8%)
  9. x86_64-msvc-ext1: 6960.4s -> 7391.9s (6.2%)
  10. i686-gnu-nopt-1: 8318.9s -> 8761.1s (5.3%)
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 (54d024e): 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)
0.7% [0.7%, 0.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.3%, 0.7%] 3

Max RSS (memory usage)

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

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.6% [0.5%, 5.6%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.3% [-6.0%, -0.4%] 17
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) -0.6% [-6.0%, 5.6%] 22

Cycles

Results (primary -0.1%, secondary 8.1%)

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.6% [0.4%, 0.8%] 5
Regressions ❌
(secondary)
8.1% [1.9%, 10.7%] 4
Improvements ✅
(primary)
-0.5% [-0.6%, -0.4%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.6%, 0.8%] 13

Binary size

Results (primary 0.0%)

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.1% [0.0%, 0.2%] 11
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.2%, 0.2%] 15

Bootstrap: 769.045s -> 769.467s (0.05%)
Artifact size: 365.44 MiB -> 365.38 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label May 5, 2025
@tgross35 tgross35 deleted the rollup-0mp4h1s branch May 5, 2025 15:13
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. 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-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.

7 participants