Skip to content

Rollup of 7 pull requests #140869

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 17 commits into from
May 10, 2025
Merged

Rollup of 7 pull requests #140869

merged 17 commits into from
May 10, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fmease and others added 17 commits April 15, 2025 15:44
…est-build-arg`

More notably, the value of the new flag does *not* get lexed shell-like and ad hoc.
In rare cases, the test may need access to the underlying
`std::process::Command` (e.g. for non-trivial process spawning).

Co-authored-by: Jesus Checa Hidalgo <[email protected]>
Where host compiler runtime libs are properly configured, instead of raw
`RUSTC`/`RUSTDOC` commands.

Co-authored-by: Jesus Checa Hidalgo <[email protected]>
…ing, r=GuillaumeGomez

rustdoc: Replace unstable flag `--doctest-compilation-args` with a simpler one: `--doctest-build-arg`

Tracking issue: rust-lang#134172.
Context: rust-lang#137096 (comment)

Yeets the ad hoc shell-like lexer for 'nested' program arguments.
No FCP necessary since the flag is unstable.

I've chosen to replace `compilation` with `build` because it's shorter (you now need to pass it multiple times in order to pass many arguments to the doctest compiler, so it matters a bit) and since I prefer it esthetically.

**Issue**: Even though we don't process the argument passed to `--doctest-build-arg`, we end up passing it via an argument file (`rustc `@argfile`)` which delimits arguments by line break (LF or CRLF, [via](https://doc.rust-lang.org/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path)) meaning ultimately the arguments still get split which is unfortunate. Still, I think this change is an improvement over the status quo.

I'll update the tracking issue if/once this PR merges. I'll also add the (CR)LF issue to 'unresolved question'.

r? GuillaumeGomez
r? notriddle
…Gomez

also export metrics from librustdoc

Addresses the issue mentioned here: [#t-docs-rs > metrics intitiative @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/356853-t-docs-rs/topic/metrics.20intitiative/near/515714331)

The previous implementation only emitted metrics from rustc, but it turns out running `cargo doc` only calls `rustc` for dependencies, and not for the root crate being documented. We are planning to gather a sample dataset from docs.rs ci via `cargo doc` so as things stood this would not emit any metrics for any of the crates themselves that were published.

This change adds the same logic from `rustc_driver_impl` to `librustdoc` to also dump metrics at the end of its execution if they are enabled.

Note: The hash's generated by librustdoc will likely be completely different from the ones generated by rustc. This is because rustc is actually doing the various passes needed to fully calculate the stable version hash. My understanding of how rustdoc works is that the hashes generated will be working with partial information due to it only doing the work required to generate docs. The hashes will still be unique per crate and will work for the purposes of the metrics proof of concept, it would not be possible to correlate metrics generated by rustdoc with those generated by rustc for the same crate. This is fine for the purposes of the PoC but a future full implementation of metrics may want to address this issue.
Fix `broken-pipe-no-ice` run-make test for rpath-less builds

The `broken-pipe-no-ice` run-make test currently fails on rpath-less builds, because host compiler runtime libs are not configured for raw std command usages.

This PR is an alternative approach to rust-lang#140744. However, instead of duplicating `run_make_support::util::set_host_compiler_dylib_path` logic, we instead support "ejecting" the "configured" underlying std `Command` from `bare_rustc()` and `rustdoc()`, where host compiler runtime libs are already set.

cc `@jchecahi`
r? `@Kobzol`
…er-errors

Improved error message for top-level or-patterns

I was confused by "top-level or-patterns are not allowed in `let` bindings" error, because it sounded like or-patterns were completely unsupported.

This error has an auto-fix suggestion that shows otherwise, but the auto-fix isn't always visible in IDEs.

I've changed the wording to be consistent with "`Fn` bounds require arguments in parentheses", and it doesn't sound like a dead-end any more.
…ehuss

Update the edition guide for let chains

Pull rust-lang/edition-guide#337 into the rustc tree.
…xyUwU

Last minute relnotes fix

This PR applies most of the suggestions in rust-lang#140802 (comment) (except for `as_flattened_mut`, which is indeed a const stabilization this cycle), and replaces all links from nightly to stable.

r? `@BoxyUwU`
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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-release Relevant to the release subteam, 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. rollup A PR which is a rollup labels May 9, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 9, 2025

📌 Commit 505e78a 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 May 9, 2025
@bors
Copy link
Collaborator

bors commented May 9, 2025

⌛ Testing commit 505e78a with merge fd9fad6...

@bors
Copy link
Collaborator

bors commented May 10, 2025

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139863 rustdoc: Replace unstable flag --doctest-compilation-args 781bae7f970abb7fc11f77f114e7dbd18a0c77f0 (link)
#140815 also export metrics from librustdoc 6683f910d5e86fccb9a00409781b8a2e6bbb0783 (link)
#140819 Add regression test for 125877 b80b9df1afb3bba8a61b0143293aac6c544f44aa (link)
#140843 Fix broken-pipe-no-ice run-make test for rpath-less builds 879d65bf9759731279f47a3347cc7d46b36a89cb (link)
#140848 Improved error message for top-level or-patterns 06ce930a9083fd11ccbba6f35b12512a5eb57cf2 (link)
#140852 Update the edition guide for let chains 50915235b95c4a2a267c611710c0708920d75b87 (link)
#140864 Last minute relnotes fix 1944026b99d9e0030ca588ef167d5c7920c58677 (link)

previous master: dcecb99176

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

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 dcecb99 (parent) -> fd9fad6 (this PR)

Test differences

Show 6 test diffs

Stage 1

  • doctest::tests::check_split_args: pass -> [missing] (J1)
  • [ui] tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/traits/const-traits/const-trait-impl-parameter-mismatch.rs: [missing] -> pass (J0)
  • [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 (J3)

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 fd9fad6dbcc1bae3cba2a8634339ffa620a49f28 --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: 5334.4s -> 7674.1s (43.9%)
  2. x86_64-rust-for-linux: 4313.2s -> 2717.3s (-37.0%)
  3. test-various: 5808.4s -> 4082.2s (-29.7%)
  4. mingw-check: 1821.3s -> 1282.2s (-29.6%)
  5. x86_64-apple-2: 6344.2s -> 4681.8s (-26.2%)
  6. x86_64-apple-1: 8387.7s -> 6299.9s (-24.9%)
  7. armhf-gnu: 6040.2s -> 4536.8s (-24.9%)
  8. x86_64-gnu-nopt: 7367.5s -> 5587.0s (-24.2%)
  9. x86_64-gnu: 8514.3s -> 6492.6s (-23.7%)
  10. arm-android: 7079.0s -> 5445.4s (-23.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 (fd9fad6): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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

Max RSS (memory usage)

Results (primary -0.2%, secondary -5.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.9%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.9% [-1.7%, -0.5%] 3
Improvements ✅
(secondary)
-5.2% [-5.2%, -5.2%] 1
All ❌✅ (primary) -0.2% [-1.7%, 0.9%] 5

Cycles

Results (primary -0.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.4% [0.4%, 0.5%] 7
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.7%, -0.4%] 9
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.7%, 0.5%] 16

Binary size

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

Bootstrap: 773.559s -> 773.683s (0.02%)
Artifact size: 365.71 MiB -> 365.66 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.