Skip to content

Rollup of 10 pull requests#157530

Closed
JonathanBrouwer wants to merge 26 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-iSvlISh
Closed

Rollup of 10 pull requests#157530
JonathanBrouwer wants to merge 26 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-iSvlISh

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

danieljofficial and others added 26 commits May 4, 2026 10:04
When a method call fails to resolve, the suggestion machinery probes
all traits for a method with the same name and builds a trait
reference for the providing trait to detect duplicate trait items
coming from multiple crate versions. It passed only the receiver type
as the single argument, which is correct only for traits whose sole
generic parameter is `Self`. For a trait with further parameters (for
example `Borrow<Borrowed>`), or when the receiver type is unknown, the
argument list no longer matched the trait's generics and tripped the
`debug_assert_args_compatible` assertion, producing an ICE.

Build the argument list with `GenericArgs::for_item` instead, using
the receiver type for `Self` when known and fresh inference variables
for the remaining parameters.
…tests on Windows

So that we don't get a bunch of console windows spawned by the debugger
processes.
…eLapkin

add `extern "tail"` calling convention

Maps to LLVM's `tailcc` and hence inherits all its problems.

This calling convention at least compiles on:

- `x86_64`
- `aarch64`

It also compiles on

- `s390x`
- `loongarch64`

But I've been told by target maintainers that this is kind of unintentional, and it's not tested in LLVM.

For most backends LLVM does not have support and fails loudly.
…it-extra-generics-ice, r=chenyukang

diagnostics: Fix ICE building a trait ref in method suggestions

Fixes rust-lang#157189

When a method call doesn't resolve, the no-method-found diagnostic probes every trait for one with a same-named method and builds a trait ref for it to spot trait items duplicated across crate versions. It only ever passed the receiver as the single argument, which works only when the trait's one generic is `Self`. Call `.borrow()` on something and the probe finds `Borrow`, whose extra `Borrowed` parameter leaves the args out of step with the trait's generics, so `debug_assert_args_compatible` fires. Same crash when the receiver type isn't known and there are zero args.

Now the args come from `GenericArgs::for_item`: the receiver fills `Self` when we have it, fresh inference variables cover the rest.
…hrisDenton

fix windows-gnu TLS leak

Running the std tests on windows-gnu [has a memory leak](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282026-06.29/near/599991435). After lots of false leads, here's what I found:
- The `guard::enable` function needs to be called on each thread; it the ensures that when the thread finishes, cleanup is performed.
- The windows `LazyKey` calls `guard::enable` in its `init` function. That means it only gets called on the first thread that accesses this key!
- We have a `guard::enable` call in the `thread::spawn` path. However, when running tests, there are two copies of std, so there are two guards. `crate::thread::spawn` sets up the guard for the current crate (the one built with `cfg(test)`), but does not set up the guard for `realstd` (the std crate in the sysroot).

This is a regression introduced by rust-lang#148799. Previously, `guard::enable`  was pretty much a NOP on Windows so not calling it didn't cause problems.

rust-lang/miri-test-libstd#123 has confirmed that this indeed fixes the leak.

The first commit is a drive-by fix where I found a function name kind of confusing.

r? @ChrisDenton
Cc @joboet
…ystem-hack, r=Kobzol

compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows

So that we don't get a bunch of console windows spawned by the debuggees.

r? @Kobzol (or bootstrap/compiler)
…8472

remove solaris implementation for File::lock, it has the wrong semantics

Fixes rust-lang#157390
r? @the8472
…BurntSushi

Rename `SyncView::{as_pin => as_pin_ref}`

This addresses the resolution of a naming concern from rust-lang#98407.

r? BurntSushi
…Kivooeo

Move tests box

Hi, I have moved some tests into the box folder. Fixes [133895](rust-lang#133895)
Revert "LLVM 23: Run AssignGUIDPass in some places"

This reverts commit cdb73bb.

The LLVM side change was reverted.
…s-as-struct, r=ShoyuVanilla

Convert `QueryRegionConstraint` into a struct

as per in fixme
std tests: skip a slow test on Miri

This is just a big loop to compare exit status handling, and the loop is a bit too big for Miri.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 6, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs labels Jun 6, 2026
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 6, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

📌 Commit 64d79e4 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jun 6, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 6, 2026
Rollup of 10 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

☀️ Try build successful (CI)
Build commit: 19cf726 (19cf726dddd77a0c04a92d45307519488d1b171d, parent: 8954863c81df429ebf96ea38a16c76f209995833)

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 6, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 6, 2026

This pull request was unapproved due to being closed.

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-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. T-libs Relevant to the library 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.