Skip to content

Rollup of 9 pull requests #139912

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 27 commits into from
Apr 16, 2025
Merged

Rollup of 9 pull requests #139912

merged 27 commits into from
Apr 16, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

WaffleLapkin and others added 27 commits April 15, 2025 09:42
Fix fixes failures of the following tests when build directory is a
symlink:
- `tests/ui/error-codes/E{0464,0523}.rs`
- `tests/ui/crate-loading/crateresolve{1,2}.rs` (those are the same tests)
I feel like they are still wrong, but maybe less so .-.

The `info:` was unhelpful -- we only use upstream in CI nowdays.
If checking succeeded, it's equivalent to successfully formatting.
Apparently there are tests that print canonical paths *and* tests which
print non-canonical paths.

An example of the latter is `tests/ui/type_length_limit.rs`.
Also refactors some of the crate name parsing code and adds unit tests

Issue rust-lang#122349

Co-authored-by: León Orell Valerian Liehr <[email protected]>
Because it's equivalent to `#[rustc_mir(borrowck_graphviz_format)]`. It
used to be distinct, but the distinction was removed in
rust-lang@3233fb1.
In particular, `borrowck_graphviz_preflow` no longer exists.
Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options

This is a tiny step towards implementing the rustc side of support for implementing packages as optional namespaces (rust-lang#122349). We add support for parsing command line options like `--extern foo::bar=libbar.rlib` when the `-Z namespaced-crates` option is present.

We don't do anything further with them. The next step is to plumb this down to the name resolver.

This PR also generally refactors the extern argument parsing code and adds some unit tests to make it clear what forms should be accepted with and without the flag.

cc ```@epage``` ```@ehuss```
Fix some bootstrap papercuts

... related to jj and my `./build` symlink setup[^1].

I'm not sure if these are good solutions, but they seem to work. See commits for a bit more info.

r? ``@jieyouxu``

[^1]: see rust-lang#139804
Fix some tidy paper cuts

The main thing this fixes is that currently, if you run `x t tidy` it will format ~6K files, even though it's supposed to format only modified files (whatever this is a useful optimization or not is besides the point). The problem is that `x t tidy` never writes the `rustfmt` stamp, so it always assumes `rustfmt` that was last used is outdated and we need to recheck everything. This PR fixes it by actually writing the stamp.

There are also some minor tweaks to comments/diagnostics. cc ```@Kobzol``` this probably conflicts with rust-lang#138591. I didn't fix anything, just tried to document better the status quo.

r? ```@jieyouxu```
…ompiler-errors

Fix wrong "move keyword" suggestion for async gen block

Fixes rust-lang#139839.

It was just missing a string comparison with `async gen`.
…rcote

Make CodeStats' type_sizes public

Add another way to get type sizes in CodeStats. I find it weird that the only way to get this information in block for all types is via printing directly to stdout. So this PR adds that flexibility.
…=nnethercote

Don't compute name of associated item if it's an RPITIT

Use `Option::then` in favor of `Option::then_some` to not compute `AssocItem::name` if it fails the condition. Alternatively, I'd be open to changing this just to an `if`.

Fixes rust-lang#139873

r? ```@nnethercote```
Update books

## rust-lang/book

1 commits in 45f05367360f033f89235eacbbb54e8d73ce6b70..d33916341d480caede1d0ae57cbeae23aab23e88
2025-04-08 18:24:27 UTC to 2025-04-08 18:24:27 UTC

- Ch01+ch02 after tech review (rust-lang/book#4329)

## rust-lang/edition-guide

2 commits in 1e27e5e6d5133ae4612f5cc195c15fc8d51b1c9c..467f45637b73ec6aa70fb36bc3054bb50b8967ea
2025-04-15 19:49:59 UTC to 2025-04-11 15:27:31 UTC

- fix grammar errors (rust-lang/edition-guide#374)
- remove the unused and deprecated `multilingual` field from `book.toml` (rust-lang/edition-guide#375)

## rust-lang/nomicon

2 commits in b4448fa406a6dccde62d1e2f34f70fc51814cdcc..0c10c30cc54736c5c194ce98c50e2de84eeb6e79
2025-04-09 01:54:42 UTC to 2025-04-07 20:22:31 UTC

- Remove double wording in opaque type chapter (rust-lang/nomicon#487)
- remove `rust-intrinsic` ABI (rust-lang/nomicon#485)

## rust-lang/reference

6 commits in 46435cd4eba11b66acaa42c01da5c80ad88aee4b..3340922df189bddcbaad17dc3927d51a76bcd5ed
2025-04-15 19:03:24 UTC to 2025-04-10 01:56:25 UTC

- Add a new grammar renderer (rust-lang/reference#1787)
- Misc. spelling fixes (rust-lang/reference#1785)
- Fix std::ops links in range-expr (rust-lang/reference#1786)
- traits.md: remove unusual formatting (rust-lang/reference#1784)
- doc: add missing space (rust-lang/reference#1782)
- spelling fix, Discrimants -> Discriminants (rust-lang/reference#1783)
…ompiler-errors

`borrowck_graphviz_*` attribute tweaks

A couple of small fixes to out-of-date things.

r? ```@davidtwco```
Add test for issue 125668

closes: rust-lang#125668

The issue stemmed from improper handling of const {} blocks used in array length expressions. As of rustc 1.80.0-nightly (804421d 2024-06-07), this ICE no longer occurs and the code compiles successfully 😀
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc labels Apr 16, 2025
@rustbot rustbot added 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 Apr 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2025

⚠️ Warning ⚠️

  • Some commits in this PR modify submodules.

@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 16, 2025

📌 Commit 0039c7d 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 Apr 16, 2025
@bors
Copy link
Collaborator

bors commented Apr 16, 2025

⌛ Testing commit 0039c7d with merge 049b243...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options)
 - rust-lang#139823 (Fix some bootstrap papercuts)
 - rust-lang#139867 (Fix some tidy paper cuts)
 - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block)
 - rust-lang#139876 (Make CodeStats' type_sizes public)
 - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT)
 - rust-lang#139884 (Update books)
 - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks)
 - rust-lang#139893 (Add test for issue 125668)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [ui] tests\ui\amdgpu-require-explicit-cpu.rs#cpu stdout ----

error in revision `cpu`: test compilation failed although it shouldn't!
status: exit code: 1
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage0-bootstrap-tools\x86_64-pc-windows-gnu\release\deps;D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage0\bin;D:\a\rust\rust\ninja;D:\a\rust\rust\mingw64\bin;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\5.0\bin;C:\aliyun-cli;C:\vcpkg;C:\Program Files (x86)\NSIS;C:\tools\zstd;C:\Program Files\Mercurial;C:\hostedtoolcache\windows\stack\3.5.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.21.13\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.0.7\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\8.0.442-6\x64\bin;C:\Program Files\ImageMagick-7.1.1-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.9\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\ui\\amdgpu-require-explicit-cpu.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=D:\\a\\rust\\rust\\vendor" "--sysroot" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2" "--cfg" "cpu" "--check-cfg" "cfg(test,FALSE,nocpu,cpu)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui\\amdgpu-require-explicit-cpu.cpu" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "--crate-type=cdylib" "--target=amdgcn-amd-amdhsa" "-Ctarget-cpu=gfx900"
stdout: none
--- stderr -------------------------------
error: linking with `rust-lld` failed: exit code: 0xc0000374
   |
   = note: "rust-lld" "-flavor" "gnu" "--version-script=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcXodU81\\list" "--no-undefined-version" "<1 object files omitted>" "--as-needed" "-L" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcXodU81\\raw-dylibs" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "-o" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui\\amdgpu-require-explicit-cpu.cpu\\amdgpu_require_explicit_cpu.elf" "--gc-sections" "-shared" "--strip-debug"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: 

error: aborting due to 1 previous error
------------------------------------------
---
test result: FAILED. 18604 passed; 1 failed; 282 ignored; 0 measured; 21 filtered out; finished in 1081.98s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Build completed unsuccessfully in 1:36:42
make: *** [Makefile:124: ci-mingw-x] Error 1
  local time: Wed Apr 16 15:28:13 CUT 2025
  network time: Wed, 16 Apr 2025 15:28:13 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Apr 16, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 16, 2025
@matthiaskrgr
Copy link
Member Author

@bors retry

@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 Apr 16, 2025
@matthiaskrgr matthiaskrgr added the CI-spurious-fail-mingw CI spurious failure: target env mingw label Apr 16, 2025
@bors
Copy link
Collaborator

bors commented Apr 16, 2025

⌛ Testing commit 0039c7d with merge 78f2104...

@bors
Copy link
Collaborator

bors commented Apr 16, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 16, 2025
@bors bors merged commit 78f2104 into rust-lang:master Apr 16, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 16, 2025
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 c6aad02 (parent) -> 78f2104 (this PR)

Test differences

Show 12 test diffs

Stage 1

  • [ui] tests/ui/async-await/async-gen-move-suggestion.rs: [missing] -> pass (J0)
  • [ui] tests/ui/consts/const-blocks/const-block-in-array-size.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/in-trait/dont-probe-missing-item-name.rs: [missing] -> pass (J0)
  • config::externs::tests::test_split_extern_opt: [missing] -> pass (J1)
  • config::externs::tests::test_split_extern_opt_invalid: [missing] -> pass (J1)
  • config::externs::tests::test_split_extern_opt_nested: [missing] -> pass (J1)
  • config::externs::tests::test_split_extern_opt_nested_invalid: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/async-await/async-gen-move-suggestion.rs: [missing] -> pass (J2)
  • [ui] tests/ui/consts/const-blocks/const-block-in-array-size.rs: [missing] -> pass (J2)
  • [ui] tests/ui/impl-trait/in-trait/dont-probe-missing-item-name.rs: [missing] -> pass (J2)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Job duration changes

  1. dist-x86_64-apple: 11736.4s -> 9267.9s (-21.0%)
  2. x86_64-apple-2: 5278.7s -> 4211.8s (-20.2%)
  3. i686-gnu-2: 7433.9s -> 6428.5s (-13.5%)
  4. dist-x86_64-linux-alt: 7762.3s -> 6906.5s (-11.0%)
  5. x86_64-msvc-2: 6739.3s -> 7394.8s (9.7%)
  6. x86_64-gnu-stable: 6640.2s -> 7198.9s (8.4%)
  7. dist-ohos: 10146.4s -> 10993.6s (8.3%)
  8. dist-s390x-linux: 5583.9s -> 5199.9s (-6.9%)
  9. x86_64-gnu-distcheck: 4467.3s -> 4760.7s (6.6%)
  10. x86_64-gnu-llvm-20-2: 6253.3s -> 5879.8s (-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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#139647 Add unstable parsing of --extern foo::bar=libbar.rlib com… a40d15cdd036e0ed44dd781766b526bd98ad607b (link)
#139823 Fix some bootstrap papercuts ab28dda9c5ed67c6d1403dc27c299e1e2c876aed (link)
#139867 Fix some tidy paper cuts d080d02d02fbc495033db621bd19358b6d1a8ba2 (link)
#139871 Fix wrong "move keyword" suggestion for async gen block 7f932f702a94438183a9879b3a8985f57eeaac89 (link)
#139876 Make CodeStats' type_sizes public 21a515e715887b5845f5a6571c8c47f7d2c0e2c2 (link)
#139880 Don't compute name of associated item if it's an RPITIT dc64b1d9caa3cc5632df8a2aca65c2f8a8aea50a (link)
#139884 Update books bca00fbcbc962e3bebe7663489c28f4b2ee0e08d (link)
#139886 borrowck_graphviz_* attribute tweaks b7e9d449018494b44140e91cd62a7c9682fb55f6 (link)
#139893 Add test for issue 125668 6d53c439537067edcd70f5003fdbc3302f51267d (link)

previous master: c6aad02ddb

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (78f2104): 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 (primary -0.2%, secondary -3.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)
1.0% [0.4%, 2.4%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-3.0%, -0.4%] 5
Improvements ✅
(secondary)
-3.2% [-4.8%, -1.7%] 4
All ❌✅ (primary) -0.2% [-3.0%, 2.4%] 10

Cycles

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

Binary size

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

Bootstrap: 775.438s -> 776.148s (0.09%)
Artifact size: 364.76 MiB -> 364.77 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool CI-spurious-fail-mingw CI spurious failure: target env mingw 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.