Skip to content

Rollup of 17 pull requests - #160168

Closed
jhpratt wants to merge 55 commits into
rust-lang:mainfrom
jhpratt:rollup-I0uRmMW
Closed

Rollup of 17 pull requests#160168
jhpratt wants to merge 55 commits into
rust-lang:mainfrom
jhpratt:rollup-I0uRmMW

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 29, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mkroening and others added 30 commits July 1, 2026 11:18
This is also how it is done on other platforms.
This optimization was already partially in place, but not used.
Other platforms already do this.
Previously, we read all entries into a huge initialized buffer up front,
which does not work correctly since on Hermit 0.12, getdents64 behaves more
reasonable and does no longer fail on buffers which cannot hold all
entries. Additionally, for each new entry, we started searching for the
current position from the start instead of just saving the position
directly.

The new design uses a fixed-size uninitialized buffer that is read into
as necessary.

Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
While Hermit does not return these yet, it will do so in the future.
Co-authored-by: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
fix: give reason before the issue number
…span

`missing_items_err` has logic to figure out where in the impl to insert
suggestions. Factor that logic out into a function to support reusing
it.
`missing_items_err` has logic to compute a set of suggestions regarding
the missing items. Factor that logic out into a function to support
reusing it.
As with the suggestions for mandatory trait methods, provide suggestions
for `must_implement_one_of`, which include the signatures of the trait
methods. This makes it easy to copy-paste the signatures into the impl
block.

Invoke the same logic from `check_drop_xor_pin_drop`, to provide
suggestions with the signatures of `drop` and `pin_drop`.

Without this change:
```
error[E0046]: not all trait items implemented, missing one of: `read`, `read_buf`
 --> src/main.rs:3:1
  |
3 | impl std::io::Read for R {
  | ^^^^^^^^^^^^^^^^^^^^^^^^ missing one of `read`, `read_buf` in implementation

For more information about this error, try `rustc --explain E0046`.
```

With this change:
```
error[E0046]: not all trait items implemented, missing one of: `read`, `read_buf`
 --> src/main.rs:3:1
  |
3 | impl std::io::Read for R {
  | ^^^^^^^^^^^^^^^^^^^^^^^^ missing one of `read`, `read_buf` in implementation
  |
  = help: implement the missing item: `fn read(&mut self, _: &mut [u8]) -> Result<usize, std::io::Error> { todo!() }`
  = help: implement the missing item: `fn read_buf(&mut self, _: BorrowedCursor<'_, u8>) -> Result<(), std::io::Error> { todo!() }`

For more information about this error, try `rustc --explain E0046`.
```
CC [Wine bug 60084](https://bugs.winehq.org/show_bug.cgi?id=60084)
CC tokio-rs/mio#1980

Wine's `WSAStartup`/`WSACleanup` are currently not thread-safe (though
they probably should be, which is why I reported an upstream bug).

Before rust-lang#141809 (and Rust 1.90),
Rust used to call `WSAStartup` at most once. This PR restores that
behavior.

I believe that this is not a regression for real Windows, since the hot
path of a `Once` already having executed is well-optimized, it's just
one atomic load, like before.
… having a `OnceLock` around it for parallel import resolution
jhpratt added 2 commits July 29, 2026 12:53
…nathanBrouwer

Rename `errors.rs` file to `diagnostics.rs` (15/N)

Follow-up of rust-lang#157485.

r? @JonathanBrouwer
… r=clarfonthey

Mark a doctest as requiring unwinding

rust-lang#158547 moved `std::io::BufWriter` to `alloc::io::BufWriter`. That allows it to be used in `no-std` configurations, and in particular on platforms where unwinding isn't supported.

However one of the doc tests uses `catch_unwind`, which fails on platforms which cannot unwind. Fix this by copying the magic incantation from a similar doctest in library/core/src/range.rs
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 29, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI 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-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ 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-infra Relevant to the infrastructure 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. labels Jul 29, 2026
@jhpratt

jhpratt commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 02d40e9 has been approved by jhpratt

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 Jul 29, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 115) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - arch (line 282) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 59) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/mod.rs - core_arch::arch::wasm32 (line 158) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/nvptx/mod.rs - core_arch::nvptx::vprintf (line 160) ... ignored
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - arch (line 246) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 282) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/core_arch_docs.md - core_arch::arch (line 246) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128 (line 89) ... ok
test library/core/src/../../stdarch/crates/core_arch/src/x86/mod.rs - core_arch::x86::__m128i (line 42) ... ok

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 02d40e9 with merge 82dec74...

Workflow: https://github.com/rust-lang/rust/actions/runs/30476907901

rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 17 pull requests

Successful merges:

 - #159014 ([rustdoc] Do not take `doc(cfg())` into account when filtering doctests)
 - #159130 (a bit optimize four-digit chunks in integer formatting)
 - #159592 (core: implement bounded random sampling)
 - #159898 (Add intrinsic-test alias and set  sample rate)
 - #158247 (hermit/fs: Return `unsupported()` instead of `from_raw_os_error(22)`)
 - #158649 (Hermit: fix `readdir()` )
 - #159049 (Avoid ICE in From/TryFrom cast suggestion when encountering HRTBs)
 - #160053 (test: add test suite for the 85681 issue)
 - #160087 (Add regression test for nested associated-type projection ICE)
 - #160090 (rustc_resolve: Further reduce mutability in resolver)
 - #160099 (Resolver: split module resolutions into local and external resolutions)
 - #160106 (Add suggestions for `must_implement_one_of`)
 - #160117 (Remove unnecessary format usage)
 - #160134 (Work around Wine bug 60084 by calling WSAStartup at most once)
 - #160142 (bootstrap: remove use-lld config alias)
 - #160148 (Rename `errors.rs` file to `diagnostics.rs` (15/N))
 - #160151 (Mark a doctest as requiring unwinding)
@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 Jul 29, 2026
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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

This rollup was thus unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

@jhpratt jhpratt closed this Jul 29, 2026
@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 Jul 29, 2026
@jhpratt
jhpratt deleted the rollup-I0uRmMW branch July 29, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI 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-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows rollup A PR which is a rollup 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-infra Relevant to the infrastructure 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.