Skip to content

Rollup of 13 pull requests - #166209

Closed
JonathanBrouwer wants to merge 37 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-5Z1vri9
Closed

JonathanBrouwer wants to merge 37 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-5Z1vri9

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

bit-aloo and others added 30 commits November 12, 2026 17:59
We replace it with dummy terminator value, which is the simplest solution for now.
This looks like it shouldn't change anything, but it is a small speedup
for CTFE that goes through this macro. Presumably by avoiding the MIR
for the early-out `&&` entirely, it can go a little faster.
…be async closure from DefId. Added conveiniance method for getting trait prefix from Asyncness.
…FnOnce was expected in function arguments.

Blessed `ref-to-fn-once.rs` with new output.

Refactored emit_specialized_closure_kind_error to use new convenience methods and slightly stronger typing.

accepted changes for test
This will make it possible to move all code out of the crate root, while
retaining as much line history as possible.
But still ignore EBADF in (e)println.
This used to be handled indirectly in std::stdio
Missed as part of 78c5cdd ("std: Combine
`is_mips64_feature_detected` into `is_mips_feature_detected`").
`abort` is getting used a bit more in places where unwinding via
`panic!` isn't desired. Some of these places involve shared const and
runtime code, so mark `abort` unstably `const` to make this a bit
easier.

This uses `core::process::crash` as the const implementation, which will
be const stable in the near future.
…ark-Simulacrum

compiletest: Add testing for lint machinery at runtime

While implementing rust-lang#157707, I noticed that we don't have 'runtime' tests for the diagnostic machinery (i.e. we test the derive macros themselves, but not their output when emitted). This introduces a new way to test this machinery.

- Add `//@ aux-lint: file.rs`, which builds a lint library in `auxiliary/file.rs`
- Lint libraries link with `rustc_private`, and export a `extern "C" fn register_lints(...)`
- A new `compiletest-lint-driver` wraps rustc and installs the provided lints when building the test

Included is a simple demo lint for example

_AI Disclosure: I used an LLM to plan out the broad structure of the machinery and identify issues; all code in this PR is written by hand_
…implify-cfg-2, r=oli-obk

Avoid using Terminator:None in simplify_cfg

Another step towards changing `Option<Terminator>` to `Terminator` in `BasicBlockData`. More info in [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808).

This pass used the None for roughly two reasons:

 - to avoid borrowck errors when inspecting 'current' terminator
 - to do the optimization - terminators are moved around when blocks are simplified and merged, and in the end, we filter out blocks that don't have terminators

This is the only place where I feel like the simplest solution for now is to just use the sentinel value. I tried some other solutions but I always ended up with a lot more code and new problems on top of that.

Moving terminators around should  probably be doable by tracking where the terminators should be moved in a separate data structure and then move them all at the end, but making the initial `take` work requires some `split_at_mut` juggling and refactoring the whole pass to avoid aliasing the 'current' terminator with the rest of the basic blocks. I tried to create some wrapper for basic blocks in this "terminator taken out" state but it ended up being just a ton of tricky changes that don't really feel worth the cost to me.

r? oli-obk
I want to know what you think, whether this still counts as ok for now.
Remove ebadf handling from stdio

But still ignore ebadf in `println!` and `eprintln!` macros.

We preserve the Windows behaviour of ignoring NUL handles.

Fixes rust-lang#47271 (see rust-lang#47271 (comment))
…r=oli-obk

reflection: doc attributes from adts, fields, and variants

Adds intrinsics and methods to get the raw doc comment strings from adts, fields, and variants. As noted in the tracking issue rust-lang#146922, before stabilizing the interface we should consider whether these methods get the raw strings.

r? @oli-obk
Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected

Fixes rust-lang#47648

* Added convenience method for finding the `ClosureKind` of a maybe async closure of TyCtx.

* Added new clearer diagnostic when `&FnOnce` was provided when `FnOnce` was expected in function arguments.

* Add regression test for the above.

* Refactored emit_specialized_closure_kind_error to use new convenience methods and slightly stronger typing.
…=oli-obk

view-types: make sure view types are !Sized
simd-test: Fix cfg syntax in the test macro

Missed as part of 78c5cdd ("std: Combine
`is_mips64_feature_detected` into `is_mips_feature_detected`").
…y,RalfJung

std: Unstably constify `std::process::abort`

`abort` is getting used a bit more in places where unwinding via `panic!` isn't desired. Some of these places involve shared const and runtime code, so mark `abort` unstably `const` to make this a bit easier.

This uses `core::process::crash` as the const implementation, which will be const stable in the near future.

Tracking issue: rust-lang#166193.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 19, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) A-process Area: `std::process` (note: `std::env` is A-env) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide 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-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. labels Nov 19, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

Trying commonly failed jobs
@bors try jobs=dist-various-1,dist-various-2,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,test-aarch64-msvc-2

@rust-bors

rust-bors Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7339b14 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 Nov 19, 2026
@rust-bors

This comment has been minimized.

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


try-job: dist-various-1
try-job: dist-various-2
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
try-job: test-aarch64-msvc-2
@rust-bors

rust-bors Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7339b14 with merge 8e3fa9e...

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

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

Rollup of 13 pull requests

Successful merges:

 - #157721 (compiletest: Add testing for lint machinery at runtime)
 - #165934 (Avoid using Terminator:None in simplify_cfg)
 - #166117 (Remove ebadf handling from stdio)
 - #165094 (reflection: doc attributes from adts, fields, and variants)
 - #165216 (Clearer diagnostics when `&FnOnce` was provided when `FnOnce` was expected)
 - #165694 (view-types: make sure view types are !Sized)
 - #165883 (Report a recursion limit error instead of delaying a bug in RPITIT collector)
 - #165971 (fix: non-deterministic temporary object paths in linker maps)
 - #166136 (Move ub_checks() inside the const_eval_select branch.)
 - #166166 (Don't recover if not allowed in `parse_seq_to_before_tokens`)
 - #166176 (compiletest: Move all code out of the crate root)
 - #166185 (simd-test: Fix cfg syntax in the test macro)
 - #166194 (std: Unstably constify `std::process::abort`)

Failed merges:

 - #166150 (Reflection: refactor Type and TypeKind)
 - #166160 (refactor CTFE-specific intrinsics to different file)
@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)
---- [ui] tests\ui-fulldeps\session-diagnostic\diagnostic-derive-compiletime.rs stdout ----

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;C:\Users\runneradmin\AppData\Roaming\Python\Python311\Scripts;C:\hostedtoolcache\windows\Python\3.11.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.11.9\x64;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.11.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.4\bin;C:\Program Files\R\R-4.6.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.26.11\x64\bin;C:\hostedtoolcache\windows\Python\3.12.10\x64\Scripts;C:\hostedtoolcache\windows\Python\3.12.10\x64;C:\hostedtoolcache\windows\Ruby\3.3.13\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.21-9\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\WSL;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\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.16\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\LLVM\bin;C:\Program Files (x86)\LLVM\bin;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\ucrt64\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:\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\\stage3-tools-bin\\compiletest-lint-driver.exe" "D:\\a\\rust\\rust\\tests\\ui-fulldeps\\session-diagnostic\\diagnostic-derive-compiletime.rs" "-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)" "-Zthreads=1" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui-fulldeps\\session-diagnostic\\diagnostic-derive-compiletime" "-Znext-solver=coherence" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-L" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui-fulldeps\\session-diagnostic\\diagnostic-derive-compiletime\\auxiliary" "--edition=2015"
stdout: none
--- stderr -------------------------------

thread 'main' (6640) panicked at src\tools\compiletest-lint-driver\src\main.rs:43:65:
called `Result::unwrap()` on an `Err` value: LoadLibraryExW { source: 126 }
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed::unwrap_failed_inner
   3: core::result::unwrap_failed::<libloading::error::Error>
   4: <core::iter::adapters::map::Map<core::str::iter::Split<char>, compiletest_lint_driver::main::{closure#0}::{closure#0}> as core::iter::traits::iterator::Iterator>::next
   5: <alloc::vec::Vec<libloading::safe::Library> as alloc::vec::spec_from_iter::SpecFromIter<libloading::safe::Library, core::iter::adapters::map::Map<core::str::iter::Split<char>, compiletest_lint_driver::main::{closure#0}::{closure#0}>>>::from_iter
   6: compiletest_lint_driver::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------------------------------------------

---- [ui] tests\ui-fulldeps\session-diagnostic\diagnostic-derive-compiletime.rs stdout end ----
---
Currently active steps:
test::UiFullDeps { 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:2070
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-fulldeps", path: "tests/ui-fulldeps", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:2070
Build completed unsuccessfully in 1:26:04
make: *** [Makefile:119: ci-mingw-x] Error 1
  local time: Thu Nov 19 16:51:47 CUT 2026
  network time: Thu, 19 Nov 2026 16:51:47 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-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 Nov 19, 2026
@rust-bors

rust-bors Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

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

This rollup was thus unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

@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 Nov 19, 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 Nov 19, 2026
@rust-bors

rust-bors Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 04d0769 failed: CI. Failed jobs:

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-io Area: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path) A-process Area: `std::process` (note: `std::env` is A-env) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.