Skip to content

Conversation

@Zalathar
Copy link
Member

Successful merges:

r? @ghost

Create a similar rollup

jdonszelmann and others added 30 commits December 17, 2025 14:14
On FreeBSD 15, the error code returned in this situation changed.  It's
now ENETUNREACH.  I think that error code is reasonable, and it's
documented for connect(2), so we should expect that it might be
returned.
`cargotest` can only detect the worst offenders (like tests failing, or
hard compiler errors / ICEs), but regardless, bumping `diesel` to a way
more recent version hopefully contributes slightly towards helping us
not break `diesel` if at all possible.
std supports redirecting stdio file descriptors.
- Make flush a noop since it is only for buffered writers.
- Also forward fsync to datasync. UEFI does not have anything
  separate for metadata sync.

Signed-off-by: Ayush Singh <[email protected]>
Since yesterday, the LLVM `main` branch should have working `f16` on all
platforms that Rust supports; this will be LLVM version 22, so update
how `cfg(target_has_reliable_f16)` is set to reflect this.

Within the rust-lang organization, this currently has no effect. The
goal is to start catching problems as early as possible in external CI
that runs top-of-tree rust against top-of-tree LLVM, and once testing
for the rust-lang bump to LLVM 22 starts. Hopefully this will mean that
we can fix any problems that show up before the bump actually happens,
meaning `f16` will be about ready for stabilization at that point (with
some considerations for the GCC patch at [1] propagating).

References:

* llvm/llvm-project@919021b
* llvm/llvm-project@054ee2f
* llvm/llvm-project@db26ce5
* llvm/llvm-project@549d7c4
* llvm/llvm-project@4903c62

[1]: gcc-mirror/gcc@8b6a18e
- Tested using OVMF on QEMU.

Signed-off-by: Ayush Singh <[email protected]>
stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`)

# Stabilization report

## Summary

`#![feature(peekable_next_if_map)]` is a variation  of `next_if` on peekable iterators that can transform the peeked item. This creates a way to take ownership of the next item in an iterator when some condition holds, but put the item back when the condition doesn't hold. This pattern would otherwise have needed unwraps in many cases.

[Tracking issue](rust-lang#143702)

### What is stabilized

```rust
impl<I: Iterator> Peekable<I> {
    pub fn next_if_map<R>(
        &mut self,
        f: impl FnOnce(I::Item) -> Result<R, I::Item>,
    ) -> Option<R> {
        ..
    }
    pub fn next_if_map_mut<R>(
        &mut self,
        f: impl FnOnce(&mut I::Item) -> Option<R>,
    ) -> Option<R> {
        ..
    }
}
```

Example usage adapted from the ACP:

```rust
let mut it = Peekable::new("123".chars());

while let Some(digit) = it.next_if_map(|c| c.to_digit(10).ok_or(c)) {
    codepoint = codepoint * 10 + digit;
}
```

or with `next_if_map_mut`:

```rust
let mut it = Peekable::new("123".chars());

while let Some(digit) = iter.next_if_map_mut(|c| c.to_digit(10)) {
    line_num = line_num * 10 + digit;
}
```

Note that the major difference here is that `next_if_map_mut` does not get owned items from the iterator, but mutable references. With that api, the closure can return an `Option` which avoids an `ok_or`. This may require cloning or copying the iterator elements, so if that is expensive, the owned version, `next_if_map`, may be preferable.

### Nightly use

At the moment, this feature is barely used in nightly, though I've found multiple good uses for it in my own projects, hence my pushing for stabilization. It makes the kind of patterns used in recursive descent parsing super concise and maybe with its stabilization it will find more use.

### Test coverage

Besides a quite comprehensive doctest, this feature is tested (including panicking in the closure) here:

https://github.com/rust-lang/rust/blob/c880acdd3171dfafdb55be8cd9822a857e99348d/library/coretests/tests/iter/adapters/peekable.rs#L275-L359

## History

- ACP: rust-lang/libs-team#613 accepted with rust-lang/libs-team#613 (comment)
- implementation: rust-lang#143725 with tests, and no issues reported since july.

## Acknowledgments

ACP, implementation and tracking issue for this feature all by @kennytm <3
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file

this adds the `Ordering` enum to `minicore.rs`.

consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
…Jung

Unix implementation for stdio set/take/replace

Tracking issue: rust-lang#150667
ACP: rust-lang/libs-team#500
Reword the collect() docs

Update the `Iterator::collect` docs so they explain that the return type, not the iterator itself, determines which collection is built.

Follow up on rust-lang#121140
…acrum

Fix the connect_error test on FreeBSD 15+

On FreeBSD 15, the error code returned in this situation changed.  It's now ENETUNREACH.  I think that error code is reasonable, and it's documented for connect(2), so we should expect that it might be returned.
…ulacrum

Use `rand` crate more idiomatically

Small cleanup, found while working on something else.
We were using `rand` un-idiomatically in a couple of places, and it was bugging me...
mGCA: Support array expression as direct const arguments

tracking issue: rust-lang#132980
resolve: rust-lang#150612

Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args.

todo:
* [x] Rebase another mGCA PR
* [x] Add more test case
* [x] Modify clippy code
…lacrum

Bump `diesel` to the most recent commit in `cargotest`

`cargotest` can only detect the worst offenders (like tests failing, or hard compiler errors / ICEs), but regardless, bumping `diesel` to a way more recent version hopefully contributes slightly towards helping us not break `diesel` if at all possible.

That is, AFAIUI, this will not help catch [#t-compiler/prioritization/alerts > rust-lang#149845 Diesel stops building with nightly-2025-12-10 @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/245100-t-compiler.2Fprioritization.2Falerts/topic/.23149845.20Diesel.20stops.20building.20with.20nightly-2025-12-10/near/566975273) because we cap-lints to `warn` in `cargotest`.

Most recent commit as of the time of this PR anyway.
std: sys: fs: uefi: Implement File::flush

- Also forward fsync and datasync to flush. UEFI does not have anything separate for metadata sync.

@rustbot label +O-UEFI
Reenable GCC CI download

Now that we have the `gcc-dev` artifacts on CI. However, I forgot to bump download-ci-gcc-stamp before 🤦 So I will also have to bump it for this PR.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 11, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like 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-clippy Relevant to the Clippy team. 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 Jan 11, 2026
@Zalathar
Copy link
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 11, 2026

📌 Commit 0e33cac has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2026
@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 11, 2026
Rollup of 14 pull requests

Successful merges:

 - #148941 (stabilize `Peekable::next_if_map` (`#![feature(peekable_next_if_map)]`))
 - #150368 (adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file)
 - #150668 (Unix implementation for stdio set/take/replace)
 - #150743 (Reword the collect() docs)
 - #150776 (Fix the connect_error test on FreeBSD 15+)
 - #150781 (Use `rand` crate more idiomatically)
 - #150786 (mGCA: Support array expression as direct const arguments)
 - #150812 (Bump `diesel` to the most recent commit in `cargotest`)
 - #150862 (std: sys: fs: uefi: Implement File::flush)
 - #150873 (Reenable GCC CI download)
 - #150908 (llvm: Update `reliable_f16` configuration for LLVM22)
 - #150918 (std: sys: fs: uefi: Implement File::seek)
 - #150922 (Subscribe myself to attr parsing)
 - #150930 (Remove special case for `AllowedTargets::CrateLevel`)

r? @ghost
@rust-log-analyzer
Copy link
Collaborator

The job 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)
failures:

---- [ui] tests\ui\parallel-rustc\cycle_crash-issue-135870.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(-1073741571).
status: exit code: 0xc00000fd
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;D:\a\rust\rust\build\x86_64-pc-windows-gnu\bootstrap-tools\x86_64-pc-windows-gnu\release\deps;D:\a\rust\rust\ninja;D:\a\rust\rust\mingw64\bin;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\7.0\bin;C:\vcpkg;C:\tools\zstd;C:\hostedtoolcache\windows\stack\3.9.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.5.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.24.11\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.3.10\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.17-10\x64\bin;C:\Program Files\ImageMagick-7.1.2-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\Program Files\Microsoft SQL Server\170\DTS\Binn;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.12\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\mongosh;C:\Program Files\LLVM\bin;C:\Program Files (x86)\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\ui\\parallel-rustc\\cycle_crash-issue-135870.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=D:\\a\\rust\\rust\\vendor" "--sysroot" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2" "--target=x86_64-pc-windows-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui\\parallel-rustc\\cycle_crash-issue-135870" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "-Z" "threads=2"
stdout: none
--- stderr -------------------------------
error[E0391]: cycle detected when checking if `FOO` is a trivial const
##[error]  --> D:\a\rust\rust\tests\ui\parallel-rustc\cycle_crash-issue-135870.rs:6:1
   |
---

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Build completed unsuccessfully in 1:46:26
make: *** [Makefile:121: ci-mingw-x] Error 1
  local time: Sun Jan 11 08:53:53 CUT 2026
  network time: Sun, 11 Jan 2026 08:53:53 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@rust-bors rust-bors bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 11, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 11, 2026

💔 Test for 02b641d failed: CI. Failed jobs:

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2026
@Zalathar Zalathar deleted the rollup-PvwP0JP branch January 11, 2026 09:00
@Zalathar
Copy link
Member Author

Zalathar commented Jan 11, 2026

Curiously, that same job previously succeeded on a superset of these PRs, at #150948 (comment).

Perhaps it’s flakiness?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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.