Skip to content

Rollup of 11 pull requests - #165735

Open
jhpratt wants to merge 31 commits into
rust-lang:mainfrom
jhpratt:rollup-ze1Pquf
Open

jhpratt wants to merge 31 commits into
rust-lang:mainfrom
jhpratt:rollup-ze1Pquf

Conversation

@jhpratt

@jhpratt jhpratt commented Nov 10, 2026

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

apolloww and others added 30 commits November 4, 2026 23:24
With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the
`DICompileUnit`, as Clang does for `-fdebug-info-for-profiling`
(`CGDebugInfo.cpp`). Before this change, the flag only added the
discriminators pass, and the compile unit flag was always false.
Just because the parser of a specific syntax fragment kind returns an
`Err(_)` doesn't automatically mean that the problematic token sequence
isn't "of" that fragment's kind. The token sequence might "almost" be of
that kind (i.e., share a non-empty prefix) but simply contain a syntax
error in it.

On a side note, it's rather odd that the now removed
`annotate_err_with_kind` only added the note "this macro call doesn't
expand to a $fragkind" if the target fragment kind was *type* or *pat*,
there are 20 kinds at the of writing.
…..)`

This also means that it's now available under `core::pat` instead of
`core` directly. This makes it consistent with the `std` re-export
which is only available under `std::pat` and not under `std` directly.

Moreover, drop library feature `pattern_type_macro` and demote language
feature `pattern_types` to a library feature. This is nice because it
means `std::pat::pattern_type` is no longer unnecessarily gated behind
two (!) feature gates.
This also means that it's now available under `core::view` instead of
`core` directly. This makes it consistent with the `std` re-export
which is only available under `std::view` and not under `std` directly.

Moreover, drop library feature `view_type_macro` and demote language
feature `view_types` to a library feature. This is nice because it
means `std::view::view_type` is no longer unnecessarily gated behind
two (!) feature gates.
This also includes these 3 patches for musl CVEs:
- [CVE-2026-6042]: denial of service in iconv
- [CVE-2026-6042]: qsort stack buffer overflow
- [CVE-2026-107891]: integer overflow in regcomp

The first two were already being applied to our
build of musl 1.2.5, the third one is new.

[CVE-2026-6042]: https://www.openwall.com/lists/musl/2026/04/03/2
[CVE-2026-40200]: https://www.openwall.com/lists/musl/2026/04/10/3
[CVE-2026-107891]: https://www.openwall.com/lists/musl/2026/10/21/1
Without it, reads are reported as UB because the tracking of what bytes are initialized is incorect
…ts should be skipped in Miri due to missing shims
Only a `\0` byte in an OsStr becomes a WTF16 NUL, so we can check before converting instead of after.

For `to_u16s`, this up to halves the amount of memory being scanned, and it can use the optimized memchr [u8] path.

For `ensure_no_nuls` the same applies, and this additionally skips a duplicated WTF8->WTF16 conversion: all but one call to it is followed by `encode_wide` anyway.
Upgrade bundled musl to 1.2.6

This also includes these 3 patches for musl CVEs:
- [CVE-2026-6042]: denial of service in iconv
- [CVE-2026-40200]: qsort stack buffer overflow
- [CVE-2026-107891]: integer overflow in regcomp

The first two were already being applied to our build of musl 1.2.5, the third one is new.

This also adds the patches to the following targets which previously missed them due to using crosstool-ng to build their toolchain:
- loongarch64-unknown-linux-musl
- powerpc64-unknown-linux-musl
- powerpc64le-unknown-linux-musl
- riscv64gc-unknown-linux-musl

[CVE-2026-6042]: https://www.openwall.com/lists/musl/2026/04/03/2
[CVE-2026-40200]: https://www.openwall.com/lists/musl/2026/04/10/3
[CVE-2026-107891]: https://www.openwall.com/lists/musl/2026/10/21/1

r? cuviper
…ees,RalfJung

add `core::arch::{x86, x86_64}::x87_f80`

tracking issue: rust-lang#163982
cc rust-lang#161787

Add `x87_f80` in the same way as `f16b` and `ppcf128`.

---

It's unclear what to do with this type on softfloat targets. Clang and GCC reject the type when the x87 registers are not available. We should do the same, probably just with a `cfg`?

I don't think we have a good `cfg` for this though? `x87` is still set on softfloat  targets, while `soft-float` doesn't get set (that does not give a warning even, it probably should?). We also don't set `cfg_abi`.

### future work

- the ABI of `Complex<x87_f80>` has not yet been implemented
- `x87_f80` does not yet implement `VaArgSafe`
…r=maxdexh

std: use skip_unsupported_miri_tests to control when tests should be skipped in Miri due to missing shims

We currently run some subset of std tests in Miri, skipping some because Miri doesn't support the operations they need. That is based on filters in the makefile. People don't know what is actually being tested and add random `cfg(miri)` in places to disable tests that were never run. This makes it quite hard to track which tests are being skipped and which operations we should add in Miri to get 100% std coverage. So let's replace that string-based filter with a cfg flag, `skip_unsupported_miri_tests`, that can be annotated at the tests.

Unfortunately I can't figure out how to disable all doctests in a module based on a cfg flag, so this entirely disables std doctests being run in Miri in our CI. (We still run them in https://github.com/rust-lang/miri-test-libstd.)

See prior discussion [on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Miri.20vs.20tests.20in.20std/with/635913743).
Docs PR: rust-lang/std-dev-guide#86

r? @tgross35
try-job: test-x86_64-gnu-aux
…-clean, r=folkertdev

fix incorrect byte count suffix on MSVC

fixes rust-lang#165299

this moves the byte count calculation into a shared helper in `rustc_codegen_ssa`. it now derives the count from the original argument layouts rather than the lowered signature.

the fix is wired up for `llvm`. symbols are emitted with a `\x01` prefix so llvm doesn’t decorate them a second time, and the linker-facing symbol naming path now handles the `\x01` and `?` prefixes.

**_testing:_**

verified fastcall, stdcall and vectorcall on msvc, including cross-crate references.
added regression coverage for the linker failure in rust-lang#165299, including a portable `build-pass` test using `minicore` and `rust-lld`. the unpatched compiler fails with a linker error, while the patched compiler links successfully.

added codegen regression tests and updated the existing abi, unwind and assembly tests for the corrected symbol names and byte counts. this also resolves the over-aligned argument `FIXME` in `win32-byte-count-suffix.rs`.

cc @folkertdev @workingjubilee
…syntax, r=mati865

Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax

Part of MCP-approved rust-lang#110680.

Best reviewed commit by commit. Please see individual commit messages for further details.

Pinging owner of pattern types @oli-obk & owner of view types @scrabsha for visibility.

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…ompile-unit, r=dtolnay

Mark the compile unit for `-Zdebuginfo-for-profiling`

With `-Zdebuginfo-for-profiling`, set `debugInfoForProfiling` on the `DICompileUnit`, as Clang does for `-fdebug-info-for-profiling` (`CGDebugInfo.cpp`). Before this change, the flag only added the discriminators pass, and the compile unit flag was always false.
…orkingjubilee

fix NumScalableVectors::from_field_count

I assume that this should've been `2..=8` and not `2..8`, based on the comments and `IntoDiagArg` implementation.
Unignore passing GCC backend tests

Since we last checked, a lot more tests now pass with the GCC backend, so unignoring them.

r? @antoyo
…tebank

Add support for `annotate-snippets`'s `no-graphics` output format

Tracking Issue: rust-lang#165164
MCP: rust-lang/compiler-team#1045

This PR adds the initial support for `annotate-snippets`'s [`no-graphics` output format](https://docs.rs/annotate-snippets/latest/annotate_snippets/struct.Renderer.html#method.no_graphics). The `no-graphics` output format doesn't show source snippets or use any graphical decorations and is primarily designed for Text-To-Speech and Braille displays. The goal at this time is to get `no-graphics` in front of users so we can iterate on and improve the output.

---

🤖 LLM involvement: I used an LLM to review the commits before submitting

r? @estebank
…, r=ChrisDenton

windows: check for null before wide encoding

Only a `\0` byte in an OsStr becomes a WTF16 NUL, so we can check before converting instead of after.

For `to_u16s`, this up to halves the amount of memory being scanned, and it can use the optimized memchr [u8] path.

For `ensure_no_nuls` the same applies, and this additionally skips a duplicated WTF8->WTF16 conversion: all but one call to it is followed by `encode_wide` anyway.
…r=maxdexh

mpsc_sync::stream_send_recv_stress: wait for all threads to finish

rust-lang#156365 did this for the other two queues, but somehow I skipped mpsc_sync.

Best reviewed without whitespace diff.

r? @maxdexh
(very similar to rust-lang#165643)
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 10, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-filesystem Area: `std::fs` A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-networking Area: `std::net` A-process Area: `std::process` (note: `std::env` is A-env) A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-run-make Area: port run-make Makefiles to rmake.rs A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like O-windows Operating system: Windows PG-exploit-mitigations Project group: Exploit mitigations 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 10, 2026
@jhpratt

jhpratt commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0c62bb9 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 Nov 10, 2026

This branch has not been deployed

No deployments
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-filesystem Area: `std::fs` A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-networking Area: `std::net` A-process Area: `std::process` (note: `std::env` is A-env) A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-run-make Area: port run-make Makefiles to rmake.rs A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` A-testsuite Area: The testsuite used to check the correctness of rustc F-explicit_tail_calls `#![feature(explicit_tail_calls)]` O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-unix Operating system: Unix-like O-windows Operating system: Windows PG-exploit-mitigations Project group: Exploit mitigations 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-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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.