Rollup of 5 pull requests - #161134
Conversation
* 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
This comment has been minimized.
This comment has been minimized.
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
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: b4116af55f In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 b4116af (parent) -> c9b7f17 (this PR) Test differencesShow 412 test diffsStage 1
Stage 2
Additionally, 408 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard c9b7f178899788fac53d942b82cf97665ee59aaa --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (c9b7f17): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.1%, secondary -0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 462.264s -> 458.034s (-0.92%) |
|
📌 Perf builds for each rolled up PR:
parent commit: b4116af55f In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
@rust-timer build 297d88e (Just testing if the bors-produced artifacts work). |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (297d88e): comparison URL. Overall result: ❌ regressions - please read:Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.1%, secondary -1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 4.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 462.264s -> 457.921s (-0.94%) |
|
The @rustbot label: +perf-regression-triaged |
Successful merges:
Iterator::{min,max}(_by_key)should use overriddenmin/max/lt#160203 (Iterator::{min,max}(_by_key)should use overriddenmin/max/lt)PartialOrdto slices #160996 (Forward all arrayPartialOrdto slices)r? @ghost
Create a similar rollup