Skip to content
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

Rollup of 8 pull requests #138747

Merged
merged 24 commits into from
Mar 21, 2025
Merged

Rollup of 8 pull requests #138747

merged 24 commits into from
Mar 21, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

eholk and others added 24 commits March 14, 2025 12:21
We had a discussion[1] today about whether postfix yield would make sense.
It's easy enough to support both in the parser, so we might as well have
both and see how people use it while the feature is experimental.

[1]: https://rust-lang.zulipchat.com/#narrow/channel/481571-t-lang.2Fgen/topic/postfix-yield/with/505231568
This involved fixing the span when parsing .yield
Parameter patterns are lowered to an `Ident` by
`lower_fn_params_to_names`, which is used when lowering bare function
types, trait methods, and foreign functions. Currently, there are two
exceptional cases where the lowered param can become an empty `Ident`.

- If the incoming pattern is an empty `Ident`. This occurs if the
  parameter is anonymous, e.g. in a bare function type.

- If the incoming pattern is neither an ident nor an underscore. Any
  such parameter will have triggered a compile error (hence the
  `span_delayed_bug`), but lowering still occurs.

This commit replaces these empty `Ident` results with `None`, which
eliminates a number of `kw::Empty` uses, and makes it impossible to fail
to check for these exceptional cases.

Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It
actually should have been removed in rust-lang#138482, the precursor to this PR.
That PR changed the lowering of wild patterns to `_` symbols instead of
empty symbols, which made the mentioned underscore check load-bearing.
This is currently unused, but paves the way for future work on expansion
regions without having to worry about the FFI parts.
For expansion region support, we will want to be able to convert and check
spans before creating a corresponding local file ID.

If we create local file IDs eagerly, but some expansion turns out to have no
successfully-converted spans, LLVM will complain about that expansion's file ID
having no regions.
Because it's way too easy to confuse that versus trying to ping WG-llvm.
And AFAIK, icebreakers-llvm isn't really used in a good while.
Add support for postfix yield expressions

We've been having a discussion about whether we want postfix yield, or want to stick with prefix yield, or have both. I figured it's easy enough to support both for now and let us play around with them while the feature is still experimental.

This PR treats `yield x` and `x.yield` as semantically equivalent. There was a suggestion to make `yield x` have a `()` type (so it only works in coroutines with `Resume = ()`. I think that'd be worth trying, either in a later PR, or before this one merges, depending on people's opinions.

rust-lang#43122
…owered-param-names, r=compiler-errors

Use `Option<Ident>` for lowered param names.

Parameter patterns are lowered to an `Ident` by `lower_fn_params_to_names`, which is used when lowering bare function types, trait methods, and foreign functions. Currently, there are two exceptional cases where the lowered param can become an empty `Ident`.

- If the incoming pattern is an empty `Ident`. This occurs if the parameter is anonymous, e.g. in a bare function type.

- If the incoming pattern is neither an ident nor an underscore. Any such parameter will have triggered a compile error (hence the `span_delayed_bug`), but lowering still occurs.

This commit replaces these empty `Ident` results with `None`, which eliminates a number of `kw::Empty` uses, and makes it impossible to fail to check for these exceptional cases.

Note: the `FIXME` comment in `is_unwrap_or_empty_symbol` is removed. It actually should have been removed in rust-lang#138482, the precursor to this PR. That PR changed the lowering of wild patterns to `_` symbols instead of empty symbols, which made the mentioned underscore check load-bearing.

r? ``@compiler-errors``
Suggest `-Whelp` when pass `--print lints` to rustc

Closes rust-lang#138612
…mease

Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`

The ordering of ty var unification means that we may end up with a root variable whose ty var origin is from another item's params.

Let's not rely on this by just unifying the infer vars with the params of the impl + resolving. It's kinda goofy but it's clearer IMO.

Fixes rust-lang#132826.

r? `@fmease` or `@lcnr`
Clean up `FnCtxt::resolve_coroutine_interiors`

Random cleanups before I make a PR that stalls generator obligations.

r? lcnr
coverage: Add LLVM plumbing for expansion regions

This is currently unused, but paves the way for future work on expansion regions without having to worry about the FFI parts.

The span conversion refactoring is only loosely related, but I've included it here because it would conflict with the main changes in `fill_region_tables`, and is pretty straightforward on its own.
Use `def_path_str` for def id arg in `UnsupportedOpInfo`

We could alternatively just omit the def path from the label, but I think it's fine to keep around

Fixes rust-lang#138730
Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group

Because it's way too easy to confuse LLVM Icebreakers ping group versus trying to ping WG-llvm.
And AFAIK, icebreakers-llvm isn't really used in a good while.

I also fixed the rustc-dev-guide docs about ``@rustbot` ping llvm` (and changed that to the raw ping group name ``@rustbot` icebreakers-llvm`) because it's very confusing.

Previously discussed in [#t-compiler/wg-llvm > Ping group renaming](https://rust-lang.zulipchat.com/#narrow/channel/187780-t-compiler.2Fwg-llvm/topic/Ping.20group.20renaming/with/453005029).

FYI `@rust-lang/wg-llvm`
FYI `@RalfJung` (since you asked in rust-lang#138120 (comment))
r? `@nikic` (or wg-llvm)
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 20, 2025
@rustbot rustbot added the rollup A PR which is a rollup label Mar 20, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 20, 2025

📌 Commit b79f816 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 Mar 20, 2025
@bors
Copy link
Contributor

bors commented Mar 20, 2025

⌛ Testing commit b79f816 with merge 1a07777...

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#138435 (Add support for postfix yield expressions)
 - rust-lang#138685 (Use `Option<Ident>` for lowered param names.)
 - rust-lang#138700 (Suggest `-Whelp` when pass `--print lints` to rustc)
 - rust-lang#138727 (Do not rely on `type_var_origin` in `OrphanCheckErr::NonLocalInputType`)
 - rust-lang#138729 (Clean up `FnCtxt::resolve_coroutine_interiors`)
 - rust-lang#138731 (coverage: Add LLVM plumbing for expansion regions)
 - rust-lang#138732 (Use `def_path_str` for def id arg in `UnsupportedOpInfo`)
 - rust-lang#138735 (Remove `llvm` and `llvms` triagebot ping aliases for `icebreakers-llvm` ping group)

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:

---- [assembly] tests\assembly\targets\targets-pe.rs#i686_pc_windows_gnullvm stdout ----

error in revision `i686_pc_windows_gnullvm`: auxiliary build of "D:\\a\\rust\\rust\\tests\\auxiliary\\minicore.rs" failed to compile: 
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.3.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\\auxiliary\\minicore.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" "i686_pc_windows_gnullvm" "--check-cfg" "cfg(test,FALSE,aarch64_pc_windows_msvc,aarch64_pc_windows_gnullvm,aarch64_unknown_uefi,aarch64_uwp_windows_msvc,arm64ec_pc_windows_msvc,avr_none,bpfeb_unknown_none,bpfel_unknown_none,i686_pc_windows_gnu,i686_pc_windows_msvc,i686_pc_windows_gnullvm,i686_uwp_windows_gnu,i686_win7_windows_gnu,i686_unknown_uefi,i686_uwp_windows_msvc,i686_win7_windows_msvc,powerpc64_ibm_aix,thumbv7a_uwp_windows_msvc,thumbv7a_pc_windows_msvc,x86_64_pc_windows_gnu,x86_64_pc_windows_gnullvm,x86_64_pc_windows_msvc,x86_64_unknown_uefi,x86_64_uwp_windows_gnu,x86_64_win7_windows_gnu,x86_64_uwp_windows_msvc,x86_64_win7_windows_msvc,x86_64_pc_cygwin)" "-O" "-Cdebug-assertions=no" "-C" "prefer-dynamic" "-o" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\assembly\\targets\\targets-pe.i686_pc_windows_gnullvm\\libminicore.rlib" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "--target" "i686-pc-windows-gnullvm" "-Cpanic=abort" "--crate-type" "rlib" "-Cpanic=abort"
stdout: none
--- stderr -------------------------------
error: couldn't create a temp dir: Access is denied. (os error 5) at path "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcmUMUHz"

error: aborting due to 1 previous error
------------------------------------------


---
test result: FAILED. 494 passed; 1 failed; 40 ignored; 0 measured; 0 filtered out; finished in 22.86s

Some tests failed in compiletest suite=assembly mode=assembly host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Build completed unsuccessfully in 1:33:39
make: *** [Makefile:128: ci-mingw-x] Error 1
  local time: Thu Mar 20 19:22:42 CUT 2025
  network time: Thu, 20 Mar 2025 19:22:43 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Contributor

bors commented Mar 20, 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 Mar 20, 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 Mar 20, 2025
@matthiaskrgr matthiaskrgr added the CI-spurious-fail-mingw CI spurious failure: target env mingw label Mar 20, 2025
@bors
Copy link
Contributor

bors commented Mar 20, 2025

⌛ Testing commit b79f816 with merge eda7820...

@bors
Copy link
Contributor

bors commented Mar 21, 2025

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 21, 2025
@bors bors merged commit eda7820 into rust-lang:master Mar 21, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 21, 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 78948ac (parent) -> eda7820 (this PR)

Test differences

Show 34 test diffs
  • [crashes] tests/crashes/132826.rs (stage 1): pass -> [missing] (J0)
  • [pretty] tests/pretty/postfix-yield.rs (stage 1): [missing] -> pass (J0)
  • [ui] tests/ui/coherence/orphan-check-error-reporting-ty-var.rs (stage 1): [missing] -> pass (J0)
  • [ui] tests/ui/coroutine/postfix-yield.rs (stage 1): [missing] -> pass (J0)
  • [ui] tests/ui/rustc-print-info-issue-138612.rs (stage 1): [missing] -> pass (J0)
  • [crashes] tests/crashes/132826.rs (stage 2): pass -> [missing] (J1)
  • [ui] tests/ui/coherence/orphan-check-error-reporting-ty-var.rs (stage 2): [missing] -> pass (J2)
  • [ui] tests/ui/coroutine/postfix-yield.rs (stage 2): [missing] -> pass (J2)
  • [ui] tests/ui/rustc-print-info-issue-138612.rs (stage 2): [missing] -> pass (J2)
  • [pretty] tests/pretty/postfix-yield.rs (stage 2): [missing] -> pass (J3)

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

Job group index

  • J0: x86_64-gnu-llvm-18-3, x86_64-gnu-llvm-19-3
  • J1: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-1, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J2: aarch64-apple, aarch64-gnu, arm-android, armhf-gnu, dist-i586-gnu-i586-i686-musl, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, test-various, x86_64-apple-2, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1
  • J3: aarch64-apple, aarch64-gnu, i686-gnu-1, i686-gnu-nopt-1, i686-msvc-1, x86_64-apple-1, x86_64-gnu, x86_64-gnu-llvm-18-1, x86_64-gnu-llvm-18-2, x86_64-gnu-llvm-19-1, x86_64-gnu-llvm-19-2, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-1, x86_64-msvc-1

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138435 Add support for postfix yield expressions 2b26ffd2af474994d0a827836de6ed05dbfaeee9 (link)
#138685 Use Option<Ident> for lowered param names. bb1abdf7dbc6e6682e0885283c8220233fd0df47 (link)
#138700 Suggest -Whelp when pass --print lints to rustc 8b7370324897eedf2ca435e1d69fc071e275cc8c (link)
#138727 Do not rely on type_var_origin in `OrphanCheckErr::NonLoc… 6102cbb149424ebcaa5429a073ec08a82b0a83e3 (link)
#138729 Clean up FnCtxt::resolve_coroutine_interiors fa32c16d034c9e60eb417a0bc4610280cc51cb70 (link)
#138731 coverage: Add LLVM plumbing for expansion regions 4294f93d39158035febd8acdc90c5cc7b9081db6 (link)
#138732 Use def_path_str for def id arg in UnsupportedOpInfo 18628149bf09c8229536bf4cee70d1a4d360ac08 (link)
#138735 Remove llvm and llvms triagebot ping aliases for `icebr… d5a1c4f2c17bf1c0b3813b6be18271da0abc654d (link)

previous master: 78948ac259

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 (eda7820): 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 9.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)
9.5% [9.5%, 9.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 9.5% [9.5%, 9.5%] 1

Cycles

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

Binary size

Results (primary 0.0%, secondary 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.0% [0.0%, 0.1%] 93
Regressions ❌
(secondary)
0.2% [0.0%, 1.1%] 33
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 93

Bootstrap: 774.951s -> 774.102s (-0.11%)
Artifact size: 365.52 MiB -> 365.52 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-rustc-dev-guide Area: rustc-dev-guide 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-compiler Relevant to the compiler team, 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.