Skip to content

Rollup of 13 pull requests - #164316

Closed
JonathanBrouwer wants to merge 33 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Tq8YKnk
Closed

JonathanBrouwer wants to merge 33 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Tq8YKnk

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

bjorn3 and others added 30 commits September 28, 2026 11:04
Older versions of ld.bfd didn't support short import libraries like the
builtin implementation of rustc generates. So we worked around this by
using binutils dlltool, which produces the old import library format. We
have now bumped the minimum supported ld.bfd version to one which does
support them, so we can drop the dlltool usage. This makes
cross-compilation a bit easier and removes a bunch of code in rustc.
…handle-cache, r=aapoalas"

This reverts commit 556c0e6, reversing
changes made to 2cb8b18.
…are none if the `rustc_must_implement_one_of` attribute is present
PR 163857 changed the span representation and reduced `eq_ctxt` to a
trivial equality check, which means `span_a.ctxt() == span_b.ctxt()` is
now an ok alternative to `span_a.eq_ctxt(span_b)`.

This commit removes `span_use_eq_ctxt` because it's no longer necessary.
`eq_ctxt` remains because removing it would cause some churn; it might
be worth doing as a follow-up.
This drops the `GetConsoleOutputCP` call, which would otherwise do an
RPC to the console server (= slow). This leaves us with `is_console`
which was using another RPC via `GetConsoleMode` (= doubly slow).
On Windows 8+ we can just use `NtQueryVolumeInformationFile()` to test
for `FILE_DEVICE_CONSOLE`, resulting in a ~2x console stdout speedup.
…O8Ki

Stop using dlltool for generating import libraries on MinGW

Older versions of ld.bfd didn't support short import libraries like the builtin implementation of rustc generates. So we worked around this by using binutils dlltool, which produces the old import library format. We have now bumped the minimum supported ld.bfd version to one which does support them, so we can drop the dlltool usage. This makes cross-compilation a bit easier and removes a bunch of code in rustc.

This implements rust-lang/compiler-team#1029 with the exception of removing `-Cdlltool` support immediately rather than doing a two step migration.
…rcote

Recover missing `turbofish` for `lifetime` arguments in expression position

Fixes rust-lang#162656.

`Struct<'a> { .. }` and `f<'_>()` were parsed as a `<` comparison whose RHS is a label, producing a cascade of unrelated errors. `parse_path_segment` now accepts `<` followed by a lifetime and `>`/`,` in expression paths, emits one "use `::<...>`" suggestion, and parses the args normally.Since the recovery is inside the path parser, `path.span` and chained forms (`::new()`, `.method()`, `?`) work without AST fix-ups or new `Parser` state; it is guarded by `may_recover()`.

cc @estebank
…sole, r=ChrisDenton

Prefer WriteConsoleW for stdout on Windows

This PR reverts rust-lang#159562 and changes stdout on Windows such that
all writes use `WriteConsoleW` _if_ stdout refers to a console.

This drops the `GetConsoleOutputCP` call, which would otherwise do an
RPC to the console server (= slow). This leaves us with `is_console`
which was using another RPC via `GetConsoleMode` (= doubly slow).
On Windows 8+ we can just use `NtQueryVolumeInformationFile()` to test
for `FILE_DEVICE_CONSOLE`, resulting in a ~2x console stdout speedup.

### Linewise output of `RELEASES.md`:

Output  | Version  | lines/s | MB/s  | Speedup
--------|----------|--------:|------:|--------
console | 1.99.0   |   31526 |  1.79 |
console | nightly  |   29251 |  1.66 |
console | **this** |   67294 |  3.82 | 2.13x
`NUL`   | 1.99.0   |  784311 | 44.50 |
`NUL`   | nightly  |  776529 | 44.06 |
`NUL`   | **this** | 1141618 | 64.78 | 1.46x

The console output speedup is very noticeable here,
as the time to run drops from 0.6s to just 0.25s.

### 128KiB chunked passthrough of `enwik8`:

Output  | Version  | MB/s    | Speedup
--------|----------|--------:|--------
console | 1.99.0   |   86.99 |
console | nightly  |  165.27 | 1.90x
console | **this** |  165.61 | 1.90x
`NUL`   | 1.99.0   | 1123.82 |
`NUL`   | nightly  | 1137.30 |
`NUL`   | **this** | 1289.35 |

The limiting factor here is `MAX_BUFFER_SIZE` which
deserves to be refactored in another PR in my opinion.
…khyperia

test DSL eagerly handle false constraints

For Context: rust-lang/project-assumptions-on-binders#57

Changelog:
After getting the `constraints`, I immediately check whether it’s `false`, and if so, report an error right away. The issue mentions two places: one is when `forall` as a whole returns false, and the other is when there’s a `false constraints` at the top level. So the changes to `wfcheck.rs` cover both cases.
For the latter, maybe need to clear the existing `constraints`; otherwise it reports "higher-ranked lifetime bound could not be satisfied". I clear them by overwriting with `new_true`. I considered saving the old value and restoring it afterwards, but I think that’s more trouble than it’s worth. :)

finally, I added relevant test files following the pattern of other test files, and they pass.

llm disclosure: everything related to this issue was handwritten by me, with no LLM assistance.

thank you for your time!
…-not-real-and-cannot-hurt-you, r=clarfonthey

Document zero-sized allocations properly for `Box` and `Vec`

Fixes rust-lang#162799
…fix, r=TaKO8Ki

Parse move exprs as a bottom expr instead of a prefix expr

`move(…)` is obviously meant to be a normal expr but since it was incorrectly treated as a prefix expr in the compiler, it meant it couldn't be used as the (left) operand of what I personally call "higher postfix operations"[^1], namely *Try*, *Call* / *Index* & "*Dot*" (*Field*, *Await*, …).

More concretely, it would mean we'd reject expressions like `move(…)?` (*Try*), `move(…)(…)` (*Call*), `move(…)[…]` (*Index*), `move(…).field` (*Field*), `move(…).method(…)` (*MethodCall*) or `move(…).await` (*Await*).

Furthermore, it would mean we'd parse `return move(0).field` like `(return move(0)).field` instead of `return ((move(0)).field)`.

---

It's immaterial whether the final version of move exprs continues to use syntax `move(…)` (a syntax much contended over at the RFC) or if it gets changed along the way (to e.g., `move { … }` (also quite controversial)), it remains a fact that move exprs are not prefix exprs!

---

CC @TaKO8Ki @nikomatsakis (rust-lang#155023)
Part of rust-lang#155050.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>

[^1]: I.e., operations where the corresponding operator precedence is higher than or equal to the one of *Try*.
…1999

Fix `diagnostic::on_unknown` format placeholder for paths in expressions and type paths

See rust-lang#163636 (comment) for context
…up, r=ChrisDenton

Windows FileExt trait doesn't need to handle ErrorKind::Interrupted; test improvements for same

This PR:
* Fixes the Windows `FileExt` `seek_read_exact()`, `seek_read_buf_exact()`, and `seek_write_all()` methods to pass up *all* errors as  `ErrorKind::Interrupted` does not occur natively on Windows
* Adds a new test to make sure `ErrorKind::Interrupted`  is handled correctly
* Cleans up existing tests and adds call counting checks

No LLMs were used in writing this PR.

Um, no Windows were locally used in writing this PR, either. I did my best with GitHub's CI to make sure these test work, but... can BORS be made to do a Windows only test on this PR first? I don't want to be the one messing up the merge again, haha.
…t_one_of, r=Urgau

rustdoc: Improvements for `rustc_must_implement_one_of`

Fixes rust-lang#163675.

Funnily enough, most things are actually already there, so this PR is only an improvement over the following:

 * The methods listed in the note are now links.
 * The note itself got a little display improvement (unified with the existing ones mostly, screenshots below).
 * Added the `Required Methods` heading in the sidebar if `rustc_must_implement_one_of` is used

Before:

<img width="407" height="114" alt="Screenshot From 2026-10-13 16-30-39" src="https://github.com/user-attachments/assets/ccbe09bd-437a-45ab-a6ae-e77f02c68b19" />

After:

<img width="454" height="121" alt="Screenshot From 2026-10-13 16-30-47" src="https://github.com/user-attachments/assets/62b4e7a7-b727-4e25-ade4-7e530fd110cb" />

r? @Urgau
Add regression test for rust-lang#155977

The ICE was fixed by rust-lang#156976. I checked the final test on its base build, `3c00c96d` (ICE), and its unrolled build, `5d29849f` (E0277, no ICE).
The test checks that this higher-ranked where-clause example fails to compile instead of causing an ICE in the new trait solver.

Closes rust-lang#155977

cc @lcnr
@rustbot rustbot added 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 O-windows Operating system: Windows 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 14, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

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

@rust-bors

rust-bors Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 12c2769 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 Oct 14, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 14, 2026
Rollup of 13 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
##[group]Building test helpers for x86_64-pc-windows-gnu
##[endgroup]
[TIMING:end] test::TestHelpers { target: x86_64-pc-windows-gnu } -- 0.190
##[group]Testing stage2 with compiletest suite=ui mode=ui (x86_64-pc-windows-gnu)
FATAL: failed to run "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "--print=all-target-specs-json" "-Zunstable-options"
--- stdout

--- stderr


---
Currently active steps:
test::Ui { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu } at src\bootstrap\src\core\build_steps\test.rs:2031
test::Compiletest { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu, mode: ui, suite: "ui", path: "tests/ui", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:2031
Build completed unsuccessfully in 1:27:09
make: *** [Makefile:126: ci-mingw-x] Error 1
  local time: Wed Oct 14 15:32:51 CUT 2026
  network time: Wed, 14 Oct 2026 15:32:51 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors try jobs=test-x86_64-mingw-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 14, 2026
Rollup of 13 pull requests


try-job: test-x86_64-mingw-1
@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 Oct 14, 2026
@rust-bors

rust-bors Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

PR #157712, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 14, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 14, 2026
@rust-bors

rust-bors Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for cabc0b4 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
##[group]Building test helpers for x86_64-pc-windows-gnu
##[endgroup]
[TIMING:end] test::TestHelpers { target: x86_64-pc-windows-gnu } -- 0.165
##[group]Testing stage2 with compiletest suite=ui mode=ui (x86_64-pc-windows-gnu)
FATAL: failed to run "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "--print=all-target-specs-json" "-Zunstable-options"
--- stdout

--- stderr


---
Currently active steps:
test::Ui { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu } at src\bootstrap\src\core\build_steps\test.rs:2031
test::Compiletest { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-gnu, forced_compiler: false }, target: x86_64-pc-windows-gnu, mode: ui, suite: "ui", path: "tests/ui", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:2031
Build completed unsuccessfully in 1:22:00
make: *** [Makefile:126: ci-mingw-x] Error 1
  local time: Wed Oct 14 18:15:34 CUT 2026
  network time: Wed, 14 Oct 2026 18:15:35 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

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 O-windows Operating system: Windows 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. 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.