Skip to content

Rollup of 5 pull requests - #161134

Open
JonathanBrouwer wants to merge 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-R2ewiX4
Open

Rollup of 5 pull requests#161134
JonathanBrouwer wants to merge 10 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-R2ewiX4

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

scottmcm and others added 10 commits July 30, 2026 02:40
* Update expect messages for library/alloc/src/vec/mod.rs
* Update expect messages for library/alloctests/tests/vec.rs
* Update expect messages for library/alloc/src/vec/mod.rs and library/alloctests/tests/vec.rs
* Revert "Update expect messages for library/alloc/src/vec/mod.rs and library/alloctests/tests/vec.rs"

This reverts commit 009fa6f.
`Iterator::{min,max}(_by_key)` should use overridden `min`/`max`/`lt`

Two related changes to provided Iterator implementations:
- `Iterator::min` and `Iterator::max` are currently implemented via `min_by` and `max_by`, which means they don't use `Ord::{min,max}` despite those being overridable to do something more efficient.  Move these to just being `.reduce(Ord::min)` and `.reduce(Ord::max)` to take advantage of potential overrides.
- `Iterator::min_by_key` and `Iterator::max_by_key` are implemented by mapping to a tuple then using `min_by`/`max_by` with a comparator that only looks at one field in the tuple.  That means they end up doing things like `a.cmp(b).is_le()`, which is wasteful if there an overloaded `-> bool` method it could use instead.  So rephrase these two to work as `.map(…).min()`/`.map(…).max()` by mapping to a type that's *not* a tuple and which can thus override more things instead of just passing a `Fn(…) -> Ordering`.
Update expect messages for library/alloc/src/vec/mod.rs

Related issue: rust-lang#159751
Updated some expect messages for `library/alloc/src/vec/mod.rs`
…itor

Improve OpenOptions append+truncate error message

Fixes rust-lang#160716.

When `OpenOptions` is configured with both `append(true)` and `truncate(true)`, the previous `InvalidInput` error message was:

> creating or truncating a file requires write or append access

This message is misleading because `append(true)` already provides append access. This change replaces it with a more descriptive error message indicating that `append` and `truncate` cannot both be enabled at the same time.

The corresponding platform-specific tests have been updated to verify the new error message and ensure consistent behavior across the relevant implementations.
…JohnTitor

Forward all array `PartialOrd` to slices

I happened to notice that these have had too many `&`s since before 1.0 -- it ends up using `&[T]: PartialOrd` and thus wastefully need to forward to `[T]: PartialOrd`.

So re-written to specify the implementation to which we're trying to delegate explicitly (by writing `<[T] as PartialOrd>`) which means we no longer need the `&&self[..]`-style dance at all since the unsizing coercion will do the right thing.

And while I was here delegating stuff, it also delegates the `__chaining_*` methods, since those have custom overrides for slices (rust-lang#138881) and we ought to take advantage of that for arrays too.
…ough, r=jieyouxu

Explicitly pass run_make_support rlib/rmeta paths to compiletest

This should unblock rust-lang#151061, and helps with rust-lang/cargo#17359 from the side of run-make-support.

I tested this with `-Zembed-metadata=no` applied to everything (in `Builder::cargo`), it works now both with and without it (that's not to say that applying `-Zembed-metadata=no` won't break something else, ofc).

CC @bjorn3

r? jieyouxu

---

try-job: aarch64-apple-1
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: aarch64-msvc-1
try-job: x86_64-mingw-1
try-job: armhf-gnu
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 15, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 15, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ 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-1,aarch64-apple-2,x86_64-mingw-1,i686-msvc-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 463a8c9 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 Aug 15, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 15, 2026
Rollup of 5 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-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@rust-bors

rust-bors Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0f5f6b8 (0f5f6b861dde7fbe9d66afba6f8c2fdc24cabedf)
Base parent: 110d7e5 (110d7e55dbd37e65cdc3321a204a9911af35f533)

@rust-bors

rust-bors Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 463a8c9 with merge c9b7f17...

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

rust-bors Bot pushed a commit that referenced this pull request Aug 15, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #160203 (`Iterator::{min,max}(_by_key)` should use overridden `min`/`max`/`lt`)
 - #159862 (Update expect messages for library/alloc/src/vec/mod.rs)
 - #160719 (Improve OpenOptions append+truncate error message)
 - #160996 (Forward all array `PartialOrd` to slices)
 - #161102 (Explicitly pass run_make_support rlib/rmeta paths to compiletest)
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-testsuite Area: The testsuite used to check the correctness of rustc 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-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants