100 Commits
Author SHA1 Message Date
Jonathan Brouwer cef03a789a Rollup merge of #150529 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/reference

21 commits in ec78de0ffe2f8344bd0e222b17ac7a7d32dc7a26..6363385ac4ebe1763f1e6fb2063c0b1db681a072
2025-12-15 16:17:43 +0000 to 2025-12-31 21:12:35 +0000
- Remove cargo workspace inheritance (rust-lang/reference#2129)
- identifiers: bump Unicode from 16 to 17 (rust-lang/reference#2071)
- Fix alternation order of lexical rules (rust-lang/reference#2126)
- Fix overly greedy digits (rust-lang/reference#2124)
- Clarify UNICODE_ESCAPE valid token value (rust-lang/reference#2123)
- Fix ambiguity of RESERVED_RAW_IDENTIFIER (rust-lang/reference#2122)
- Document how closure capturing interacts with discriminant reads (rust-lang/reference#1837)
- operator-expr: remove stray word in footnote (rust-lang/reference#2118)
- await-expr: add a missing space (rust-lang/reference#2120)
- attributes: add missing punctuation to instruction_set (rust-lang/reference#2117)
- associated-items: add missing periods (rust-lang/reference#2116)
- Move tools into a consolidated cargo workspace (rust-lang/reference#2115)
- Unwrap all of the lexical chapters (rust-lang/reference#2113)
- Unwrap const_eval.md (rust-lang/reference#2112)
- Add section on expansion-time (early) name resolution (rust-lang/reference#2055)
- const_eval.md: add missing word (rust-lang/reference#2068)
- path-expr.md: use a more suitable punctuation (rust-lang/reference#2082)
- items: clarify label for type-aliases documentation (rust-lang/reference#2110)
- do not mix singular and plural (rust-lang/reference#2101)
- external-blocks: add missing "and" in list (rust-lang/reference#2111)
- conditional-compilation: add a space in `cfg.cfg_attr.attribute-list` (rust-lang/reference#2109)

## rust-lang/rust-by-example

2 commits in 7d21279e40e8f0e91c2a22c5148dd2d745aef8b6..2e02f22a10e7eeb758e6aba484f13d0f1988a3e5
2025-12-21 08:47:57 UTC to 2025-12-21 08:46:33 UTC

- docs(comments): improve readability and formatting (rust-lang/rust-by-example#1981)
- Fix HOF.MD sum of odd squares algorithm (rust-lang/rust-by-example#1980)
2026-01-01 12:04:17 +01:00
Jonathan Brouwer 36457ce8f9 Rollup merge of #150454 - tiif:move_variadic, r=oli-obk
cleanup: move c-variadic arguments handling into compute_inputs_and_output

Previously, ``unnormalized_input_tys`` needs to be mutable because the c_variadic arguments are added to ``unnormalized_input_tys`` outside of ``compute_inputs_and_output``. This could have been done together in ``compute_inputs_and_output``.
2026-01-01 12:04:16 +01:00
Jonathan Brouwer 767e7dae25 Rollup merge of #150555 - adamgreig:armv7-thumb-interwork, r=chenyukang
Enable thumb interworking on ARMv7A/R and ARMv8R bare-metal targets

This flag enables the `#[instruction_set(arm::t32)]` for the armv7a/armv7r/armv8r targets, which all support Thumb interwork but were missing this flag.

Target maintainers are `@chrisnc,` `@rust-lang/arm-maintainers,` `@rust-embedded/arm` (including me).
2026-01-01 02:47:21 +01:00
Jonathan Brouwer f5803f0610 Rollup merge of #150548 - dianne:temp-scope-extension-loop-rewrite, r=BoxyUwU
`region_scope_tree`: Rewrite a `loop` as tail recursion

This addresses https://github.com/rust-lang/rust/pull/146098#discussion_r2652130775, hopefully making `record_subexpr_extended_temp_scopes` a bit more legible.

I removed a `debug!` in the process, since the function it calls every iteration, [`ScopeTree::record_extended_temp_scope`](https://github.com/rust-lang/rust/blob/2848c2ebe9a8a604cd63455263299d7258bc8252/compiler/rustc_middle/src/middle/region.rs#L264-L271), does the same `debug!`. Keeping the behavior of having an additional `debug!` for the top-level expression would hurt legibility, and having a duplicate `debug!` at each iteration seems excessive. No information is lost from the debug output, so I think it's fine to just have the inner `debug!`s.

r? BoxyUwU or anyone
2026-01-01 02:47:20 +01:00
Jonathan Brouwer 71b17c5c18 Rollup merge of #150264 - RalfJung:target-feature-tracking-split, r=Amanieu
split up tracking issue for target feature feature gates

https://github.com/rust-lang/rust/issues/44839 is tracking too many things at once. We usually have a separate tracking issue for each feature gate, so let's do that here as well:

-  rust-lang/rust#150244
- rust-lang/rust#150245
- rust-lang/rust#150246
- rust-lang/rust#150247
- rust-lang/rust#150248
- rust-lang/rust#150249
- rust-lang/rust#150250
- rust-lang/rust#150251
- rust-lang/rust#150252
- rust-lang/rust#150253
- rust-lang/rust#150254
- rust-lang/rust#150255
- rust-lang/rust#150256
- rust-lang/rust#150257
- rust-lang/rust#150258
- rust-lang/rust#150259
- rust-lang/rust#150260
- rust-lang/rust#150261

Closes https://github.com/rust-lang/rust/issues/44839 in favor of the ones listed above.

r? `@Amanieu`
2026-01-01 02:47:20 +01:00
Jonathan Brouwer 9b89b8814a Rollup merge of #149778 - tbu-:pr_crate_io_result, r=Mark-Simulacrum
`crate::io::Result` → `io::Result` in most places

I don't know why many places refer to the type as `crate::io::Result` when `crate::io` is already imported.
2026-01-01 02:47:19 +01:00
Jonathan Brouwer 552918bfcd Rollup merge of #150544 - bjorn3:run_make_print_target_libdir, r=Urgau,jieyouxu
Use --print target-libdir in run-make tests

This makes the tests more robust against sysroot layout changes and slightly simplifies them.
2025-12-31 17:32:07 +01:00
Jonathan Brouwer 8dc15d2424 Rollup merge of #150543 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/76d44ffb3f86b87771b2bb5e808d42992c1ad745.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-31 17:32:06 +01:00
Jonathan Brouwer 15c467ba0c Rollup merge of #150530 - Zalathar:string-deref-patterns, r=jackh726
Remove `feature(string_deref_patterns)`

The older `string_deref_patterns` feature has been superseded by the newer and more general `deref_patterns` feature. Removing string-deref-patterns allows us to get rid of a few tricky special cases in match lowering, which are different from the special cases used by deref-patterns.

The handful of existing tests for `string_deref_patterns` have been migrated to use `deref_patterns` instead. Current nightly users of the older feature should hopefully be able to migrate to the newer feature without too much trouble.

Note that `deref_patterns` is currently marked as an “incomplete” feature, because it doesn't have an accepted RFC. But `string_deref_patterns` doesn't appear to have ever had an accepted RFC either, so arguably it should have been marked incomplete too.

---
- Tracking issue for both features: https://github.com/rust-lang/rust/issues/87121
- Original implementation: https://github.com/rust-lang/rust/pull/98914
- [Zulip thread: Can we remove `#![feature(string_deref_patterns)]`?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Can.20we.20remove.20.60.23!.5Bfeature.28string_deref_patterns.29.5D.60.3F/with/565787352)
2025-12-31 17:32:06 +01:00
Jonathan Brouwer f366fa5121 Rollup merge of #150337 - AsakuraMizu:main, r=jhpratt
docs: fix typo in std::io::buffered
2025-12-31 17:32:05 +01:00
Jonathan Brouwer dc103c4cd9 Rollup merge of #146798 - a4lg:riscv-intrinsics-zkne_or_zknd, r=Amanieu
RISC-V: Implement (Zkne or Zknd) intrinsics correctly

On rust-lang/stdarch#1765, it has been pointed out that two RISC-V (64-bit only) intrinsics to perform AES key scheduling have wrong target feature.
`aes64ks1i` and `aes64ks2` instructions require *either* Zkne (scalar cryptography: AES encryption) or Zknd (scalar cryptography: AES decryption) extension (or both) but corresponding Rust intrinsics (in `core::arch::riscv64`) required *both* Zkne and Zknd extensions.

An excerpt from the original intrinsics:

```rust
#[target_feature(enable = "zkne", enable = "zknd")]
```

To fix that, we need to:

1.  Represent a condition where *either* Zkne or Zknd is available and
2.  Workaround an issue: `llvm.riscv.aes64ks1i` / `llvm.riscv.aes64ks2` LLVM intrinsics require either Zkne or Zknd extension.

This PR attempts to resolve them by:

1.  Adding a perma-unstable RISC-V target feature: `zkne_or_zknd` (implied from both `zkne` and `zknd`) and
2.  Using inline assembly to construct machine code directly (because `zkne_or_zknd` alone cannot imply neither Zkne nor Zknd, we cannot use LLVM intrinsics).

The author confirmed that we can construct an AES key scheduling function with decent performance using fixed `aes64ks1i` and `aes64ks2` intrinsics (with optimization enabled).
2025-12-31 17:32:04 +01:00
Jonathan Brouwer a7113d74eb Rollup merge of #150539 - Noratrieb:mark-it-down, r=ChrisDenton
Corretly link URL in internal Windows docs

```
warning: this URL is not a hyperlink
   --> library/std/src/sys/pal/windows/mod.rs:337:5
    |
337 | /// https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: bare URLs are not automatically turned into clickable links
    = note: `#[warn(rustdoc::bare_urls)]` on by default
help: use an automatic link instead
    |
337 | /// <https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail>
    |     +                                                        +
```
2025-12-31 14:30:48 +01:00
Jonathan Brouwer d898dccc21 Rollup merge of #150511 - Sa4dUs:offload-inline, r=ZuseZ4
Allow inline calls to offload intrinsic

Removes explicit insertion point handling and recovers the pointer at the end of the saved basic block.

r? `@ZuseZ4`

fixes: https://github.com/rust-lang/rust/issues/150413
2025-12-31 14:30:48 +01:00
Jonathan Brouwer 5183d8f15d Rollup merge of #150193 - Bryntet:parse_instruction_set, r=JonathanBrouwer
Port `#[instruction_set]` to attribute parser

Please note the test changes, and deprecation of `E0778` and `E0779`

In my opinion, all errors related to this attribute are improved I think, except for if you have `#[instruction_set(arm::)]` in which case there's an `error: expected identifier, found <eof>`, which is quite unhelpful I think, but this seems to be a limitation of the general attribute parsing flow

r? `@JonathanBrouwer`
2025-12-31 14:30:47 +01:00
Jonathan Brouwer 342a1acb71 Rollup merge of #150501 - qb42:patch-1, r=workingjubilee
Fix Typos in Platform Support Tables

3 recently demoted targets had their entries moved to the tier 3 table without adjusting for the extra "host" column, this PR adds an empty column so they display correctly.

2 recently promoted targets had the opposite problem, also fixed.

While doing that I noticed that empty columns were represented inconsistently throughout the file so I normalized them all to be 2 spaces, which seemed to be the majority opinion (139 instances vs 5 for 1 space and 19 for 3 spaces).

Closes: rust-lang/rust#150499
2025-12-30 23:27:45 +01:00
Jonathan Brouwer 4b49c9f9d8 Rollup merge of #150420 - h3fang:sve-debuginfo-fix, r=workingjubilee
Do not spill operand debuginfo to stack for AArch64 SVE predicates `<vscale x N x i1>` where `N != 16`

This pull request tries to fix rust-lang/rust#150419.

The debuginfo for AArch64 SVE predicates `<vscale x N x i1>` where `N != 16` should be ignored by this [commit](https://github.com/rust-lang/rust/pull/143924/changes/89eea57594e3e1d8e618dd530ea1c8e7c9b4c7a4).

https://github.com/rust-lang/rust/blob/89eea57594e3e1d8e618dd530ea1c8e7c9b4c7a4/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs#L438-L452

But in line 446, the `marker_type.kind()` is `ty::Bool` instead of `ty::Slice`, so the code doesn't work as intended.

This pull request uses the [`Ty::scalable_vector_element_count_and_type`](https://github.com/rust-lang/rust/blob/main/compiler/rustc_middle/src/ty/sty.rs#L1272) method to fix the condition checks for  `<vscale x N x i1>` where `N != 16` and add a compiletest for this case.
2025-12-30 23:27:44 +01:00
Jonathan Brouwer de16c1aa4c Rollup merge of #150058 - Fabian-Gruenbichler:main, r=workingjubilee
Enable file locking support for Hurd

like Illumos (rust-lang/rust#148322) and aix (rust-lang/rust#148619), Hurd was missed when originally
introducing locking gates per target OS in rust-lang/rust#132977. building rustc on Hurd was
broken as a result since 1.91.
2025-12-30 23:27:44 +01:00
Jonathan Brouwer 4b6f783e32 Rollup merge of #150509 - AprilNEA:fix-137823, r=petrochenkov
Adds a regression test for #137823

Adds a regression test for rust-lang/rust#137823. The test ensures that recursive generic function instantiation properly triggers the recursion limit error instead of ICE-ing with `type variables should not be hashed`.

Closes rust-lang/rust#137823
2025-12-30 15:06:17 +01:00
Jonathan Brouwer e9d1e57767 Rollup merge of #150422 - Zalathar:slice-len, r=Nadrieril
mir_build: Add a `SliceLenOp` enum for use by slice-length cases/tests

The main change in this PR introduces a `SliceLenOp` enum, to be used by the enum variants for slice-length tests in match lowering.

Slice-length tests must distinguish between `==` tests, and `>=` tests. The existing code represents this distinction with either a boolean (in `TestableCase`) or a `mir::BinOp` (in `TestKind`). Using a dedicated enum makes it easier to see what the two possible values represent.

This PR also includes a few relevant cleanups that would otherwise conflict.

r? Nadrieril
2025-12-30 15:06:16 +01:00
Jonathan Brouwer 596e1e3f88 Rollup merge of #150344 - hkBst:cleanup-linked-list, r=jhpratt
Cleanup linked list

 - Replaces some checked_sub().unwrap_or(0) with saturating_sub().
 - Replaces NonNull::from(Box::leak(node)) with Box::into_non_null(node)
2025-12-30 10:42:28 +01:00
Jonathan Brouwer be715d4685 Rollup merge of #150239 - nnethercote:simplify-TypeFreshener-methods, r=lcnr
Simplify `TypeFreshener` methods.

`freshen_{ty,const}` take a `Result` and just do a fold if the input is `Ok`. It's simpler to do those folds at the call site, and only call `freshen_{ty,const}` in the `Err` case. That way we can also avoid useless fold operations on the results of `new_{int,uint,float}`.

Also, make some `bug!` calls more concise.

r? `@lcnr`
2025-12-30 10:42:27 +01:00
Jonathan Brouwer 18b3b66c01 Rollup merge of #150490 - Kobzol:gcc-bug-url, r=antoyo
Specify bug URL when building GCC

r? `@antoyo`
2025-12-30 02:07:08 +01:00
Jonathan Brouwer 1953001256 Rollup merge of #150489 - Kobzol:gcc-no-debuginfo, r=antoyo
Disable debuginfo when building GCC

To reduce size of libgccjit.so from ~400 MiB to ~50 MiB.

r? `@antoyo`
2025-12-30 02:07:08 +01:00
Jonathan Brouwer 71c248a2e1 Rollup merge of #150396 - GuillaumeGomez:fix-line-numbers-hidden, r=lolbinarycat
[rustdoc] If line number setting is disabled, do not make line numbers take space

While working on https://github.com/rust-lang/rust/pull/150395, I realized that when enabled then disabled the "show line numbers" setting, instead of looking like initially:

<img width="904" height="148" alt="Screenshot From 2025-12-26 16-51-44" src="https://github.com/user-attachments/assets/a24df2f2-61be-4db5-b60f-519b35425fd2" />

The "space" taken by line numbers was still there:

<img width="904" height="148" alt="Screenshot From 2025-12-26 16-51-41" src="https://github.com/user-attachments/assets/b44af75d-52a4-4401-98e4-602b16bf6b9b" />

This PR fixes it.

First commit cleans up the `utils.goml` file a bit, I think I'll do more cleanup because switching the settings without reloading the page should make GUI tests a bit faster.

r? `@yotamofek`
2025-12-30 02:07:07 +01:00
Jonathan Brouwer 2c89d1c2a0 Rollup merge of #150483 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/70e245140004b97a23737d3585ecb1bc57dcd61d.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-29 17:17:57 +01:00
Jonathan Brouwer 122f02ad02 Rollup merge of #150394 - DKLoehr:passplugin, r=nikic
Accommodate LLVM PassPlugin rename

LLVM [recently moved](https://github.com/llvm/llvm-project/pull/173279) their `PassPlugin` files to a new folder. This PR updates our `PassWrapper` to point to the new location.
2025-12-29 17:17:56 +01:00
Jonathan Brouwer 1117bd9e78 Rollup merge of #150411 - Kivooeo:somefunnystuff, r=BoxyUwU
refactor `destructure_const`

r? BoxyUwU

as you suggested yesterday (will add more context like links when it stops being a draft)

tried to split this into some meaningful commits hope it help ^^
2025-12-28 22:52:33 +01:00
Jonathan Brouwer 13633c5bdc Rollup merge of #150011 - scottmcm:more-unbounded-shift-docs, r=Mark-Simulacrum
Add more `unbounded_sh[lr]` examples

Inspired by rust-lang/rust#149837, which added more stuff to `wrapping_sh[lr]`, including a cross-reference to these methods.
2025-12-28 22:52:33 +01:00
Jonathan Brouwer 32e848163c Rollup merge of #149947 - cyrgani:crashtests, r=Mark-Simulacrum
add several older crashtests

Includes rust-lang/rust#114880, rust-lang/rust#119940, rust-lang/rust#138274, rust-lang/rust#138660.
Since their issue numbers are all smaller than 140000, this has no conflicts with rust-lang/rust#147857.
2025-12-28 22:52:32 +01:00
Jonathan Brouwer ef835a83ee Rollup merge of #149667 - Shinonn23:fix-ice-constblock-148138, r=dianne
Fix ICE by rejecting const blocks in patterns during AST lowering (closes #148138)

This PR fixes the ICE reported in rust-lang/rust#148138.

The root cause is that `const` blocks aren’t allowed in pattern position, but the AST lowering logic still attempted to create `PatExprKind::ConstBlock`, allowing invalid HIR to reach type checking and trigger a `span_bug!`.

Following the discussion in the issue, this patch removes the `ConstBlock` lowering path from `lower_expr_within_pat`. Any `ExprKind::ConstBlock` inside a pattern is now handled consistently with other invalid pattern expressions.

A new UI test is included to ensure the compiler reports a proper error and to prevent regressions.

Closes rust-lang/rust#148138.
2025-12-28 22:52:31 +01:00
Jonathan Brouwer 8bd4d04cce Rollup merge of #149663 - quaternic:gather-scatter-bits-opt, r=Mark-Simulacrum
Optimized implementation for uN::{gather,scatter}_bits

Feature gate: #![feature(uint_gather_scatter_bits)]
Tracking issue: https://github.com/rust-lang/rust/issues/149069
Accepted ACP: https://github.com/rust-lang/libs-team/issues/695

Implements the methods using the parallel suffix strategy mentioned in the ACP discussion. The referenced source material provides C implementations, though this PR makes improvements over those, cutting the instruction count by a third:
https://rust.godbolt.org/z/rn5naYnK4 (this PR)
https://c.godbolt.org/z/WzYd5WbsY (Hacker's delight)

This was initially based on the code for `gather_bits` that ``@okaneco`` provided in https://github.com/rust-lang/libs-team/issues/695#issuecomment-3538922128 . I wanted to understand how it worked, and later on noticed some opportunities for improvement, which eventually led to this PR.
2025-12-28 22:52:31 +01:00
Jonathan Brouwer 7b105b21d1 Rollup merge of #149582 - max-heller:duration-integer-division, r=Mark-Simulacrum
Implement `Duration::div_duration_{floor,ceil}`
2025-12-28 22:52:30 +01:00
Jonathan Brouwer b512fa78e9 Rollup merge of #149540 - Ayush1325:uefi-fs-readdir, r=Mark-Simulacrum
std: sys: fs: uefi: Implement readdir

- Tested on OVMF.
- Add path field to uefi file since this will also be required in
  implementing Debug for rust File.

``@rustbot`` label +O-UEFI
2025-12-28 22:52:30 +01:00
Jonathan Brouwer 30618bb89c Rollup merge of #148321 - Marcondiro:master, r=Mark-Simulacrum
parser/lexer: bump to Unicode 17, use faster unicode-ident

Hello,

Bump the unicode version used by lexer/parser to 17.0.0 by updating:
- `unicode-normalization` to 0.1.25
- `unicode-properties` to 0.1.4
- `unicode-width` to 0.2.2

and by replacing `unicode-xid` with `unicode-ident` which is also 6 times faster.
I think it might be worth to run the benchmarks to double check.
(`unicode-ident` is already in `src/tools/tidy/src/deps.rs`)

Thanks!
2025-12-28 22:52:29 +01:00
Jonathan Brouwer 2ecaa1df2d Rollup merge of #150460 - RalfJung:miri-manually-drop, r=dtolnay
fix ManuallyDrop::into_inner aliasing (Miri) issues

Fixes https://github.com/rust-lang/miri/issues/4793

r? `@WaffleLapkin`
2025-12-28 18:16:11 +01:00
Jonathan Brouwer 3bbad7f337 Rollup merge of #149921 - Kobzol:src-gpl, r=Mark-Simulacrum
Add new source component that includes GPL-licensed source

To unblock rustup distribution of `cg_gcc` (https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Safe.20rustup.20distribution.20of.20rustc_codegen_gcc/with/560644441).

CC ``@joshtriplett``

r? ``@Mark-Simulacrum``
2025-12-28 18:16:10 +01:00
Jonathan Brouwer cc68f30960 Rollup merge of #149469 - tisonkun:mut-once, r=Mark-Simulacrum
Leverage &mut in OnceLock when possible

See comments inline.
2025-12-28 18:16:10 +01:00
Jonathan Brouwer 3c7ffa5dd1 Rollup merge of #149447 - theemathas:string-replace_range, r=Mark-Simulacrum
Rewrite `String::replace_range`

This simplifies the code, provides better panic messages, and avoids an integer overflow.
2025-12-28 18:16:09 +01:00
Jonathan Brouwer 2c0daa2301 Rollup merge of #147499 - josh-kaplan:master, r=Mark-Simulacrum
Implement round-ties-to-even for Duration Debug for consistency with f64

## Summary

This PR proposes a fix for rust-lang/rust#103747 implementing IEEE-754 S4.3 roundTiesToEven for Duration Debug implementation.

## Testing

Added new test in `time.rs` for  validating roundTiesToEven behavior in Duration formatting. Reran all debug formatting tests in `time.rs` with `./x test library/coretests --test-args time::debug_formatting`.
2025-12-28 18:16:09 +01:00
Jonathan Brouwer 4af704522e Rollup merge of #150429 - Noratrieb:tier-3-errors, r=Urgau
Improve missing core error for tier 3 targets

Tier 3 targets can't be installed via rustup, so don't recommend that. Additionally, do recommend build-std on stable because it's the recommended way to use these targets, people should switch to nightly.
2025-12-27 15:46:57 +01:00
Jonathan Brouwer e2e271b7b0 Rollup merge of #150410 - crescentrose:document-socket-cloexec, r=ChrisDenton
Document default SOCK_CLOEXEC flag on new UnixStream

Currently, the `std::os::unix::net::UnixStream` docs do not specify that the SOCK_CLOEXEC flag is set on new sockets. This commit adds a note clarifying that, in line with the note abuot the `MSG_NOSIGNAL` flag.
2025-12-27 15:46:56 +01:00
Jonathan Brouwer adbcef3c12 Rollup merge of #150397 - BioTomateHP:patch-1, r=petrochenkov
Update hir.rs: fix typo ("aligement" -> "alignment"), conform to max_width
2025-12-27 15:46:56 +01:00
Jonathan Brouwer af77f2d644 Rollup merge of #150362 - heathdutton:fix-rustdoc-duplicate-reexports-150211, r=notriddle
rustdoc: fix duplicate Re-exports sections

Fixes rust-lang/rust#150211

When a module contains both `pub extern crate` and `pub use` items, they were being rendered under two separate "Re-exports" section headers instead of one.

This fix tracks the current section and only renders a new header when the section actually changes, consolidating items that belong to the same section under a single header.
2025-12-27 15:46:55 +01:00
Jonathan Brouwer d63068b3b4 Rollup merge of #150405 - estebank:matches-could-be-equals, r=Kivooeo
Don't use `matches!` when `==` suffices

In the codebase we sometimes use `matches!` for values that can actually just be compared. Replace them with `==`.

Subset of rust-lang/rust#149933.
2025-12-27 13:42:01 +01:00
Jonathan Brouwer b1fd0b3f2f Rollup merge of #150393 - Urgau:remap-path-relative-doc, r=jieyouxu
Document relative and absolute paths handling in `--remap-path-prefix`

After what we have been through with https://github.com/rust-lang/rust/pull/150110 and https://github.com/rust-lang/rust/pull/150283 in the compiler, I think it would be good to document the user-facing parts of the relative and absolute paths handling in `--remap-path-prefix`.

r? `@jieyouxu`
2025-12-27 13:42:01 +01:00
Jonathan Brouwer 096bb5b615 Rollup merge of #150236 - Bryntet:parse_rustc_must_impl, r=JonathanBrouwer
Port `#[rustc_must_implement_one_of]` to attribute parser

Stumbled upon a weird (bug ?) behaviour while making this PR

it seems like it is possible to reach `check_attr.rs` checks without the attribute allowed target checks having already been finished, I added a comment about how to reproduce this in `check_attr.rs`

otherwise good to note is that a bunch of code was moved from `compiler/rustc_hir_analysis/src/collect.rs` to `check_attr.rs`

r? `@JonathanBrouwer`
2025-12-26 21:50:17 +01:00
Jonathan Brouwer 20d4bb924d Rollup merge of #147717 - Turbo87:accept-to-expect, r=petrochenkov
compiler/middle/lint: Suggest `#[expect(dead_code)]` instead of `#[allow(dead_code)]`

Until now the compiler suggested

> help: to override `-W unused` add `#[allow(dead_code)]`

when encountering e.g. an unused function in the codebase.

This PR changes the suggestion to `#[expect(dead_code)]`, which will warn again once the code is being used somewhere. This is helpful because it lets the developer know that the attribute can now be removed again. Without this the codebase will eventually be littered with stray `#[allow(dead_code)]` attributes that are no longer serving any purpose.

This was suggested in https://bsky.app/profile/steveklabnik.com/post/3m2uh7pf6e225 and I agreed strongly enough to take a look and implement it 😆
2025-12-26 21:50:17 +01:00
Jonathan Brouwer d37f008be8 Rollup merge of #150365 - cuiweixie:first_pr, r=JonathanBrouwer,Kivooeo
refactor: simplify code
2025-12-25 21:11:54 +01:00
Jonathan Brouwer 2a9bc187a6 Rollup merge of #149964 - Mark-Simulacrum:ci-channel, r=Kobzol
Write file with channel to S3

This will let rustup-toolchain-install-master gain support for installing stable artifacts, which is currently only possible when explicitly overriding the channel. That in turn will unblock letting Crater kick off a beta run as soon as both a new beta and a new stable artifact are ready, rather than waiting until the actual release.
2025-12-25 21:11:53 +01:00
Jonathan Brouwer d80a406ffe Rollup merge of #150371 - cyrgani:pm-cleanups-again, r=petrochenkov
several `proc_macro` cleanups

Fixes typos and applies the suggestions from a few clippy lints that made sense here.
2025-12-25 16:29:22 +01:00
Jonathan Brouwer 6aff90c8ad Rollup merge of #150366 - maradini77:main, r=clubby789,Kivooeo
Fix typos and grammar errors in README files

- Fix `FIMXE`/`FXIME` typos → `FIXME`
- Fix grammar: "these terminology are" → "this terminology is"
- Fix apostrophe: "it's data" → "its data"
- Remove duplicate word: "less less" → "less"
2025-12-25 16:29:22 +01:00
Jonathan Brouwer dea3c15336 Rollup merge of #150360 - heathdutton:fix-rustdoc-const-type-filter-150349, r=GuillaumeGomez
rustdoc: fix incorrect type filter name in help popup

Fixes rust-lang/rust#150349

The help popup states that `const:` is an accepted search filter, but the actual filter name is `constant:`. This updates the help text to match the implementation.
2025-12-25 16:29:21 +01:00
Jonathan Brouwer 990783f83e Rollup merge of #150341 - bjorn3:fix_cg_clif_divergence, r=bjorn3
Fix some divergences with the cg_clif subtree

For some reason git-subtree incorrectly synced those changes.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-12-24 16:37:11 +01:00
Jonathan Brouwer 8e84475e25 Rollup merge of #150297 - forkgull:notgull/vita, r=joboet
Fix compile issue in Vita libstd

Unfortunately it looks like the Vita libc does not support
the "utimensat" function, which is needed for setting file times.
To fix the build, this commit marks Vita as unsupported for the
function that sets the file times.
2025-12-24 16:37:11 +01:00
Jonathan Brouwer c772ca3a6a Rollup merge of #150141 - BoxyUwU:borrowck_cleanup_1, r=lcnr
Misc cleanups from reading some borrowck code

title

r? lcnr
2025-12-24 16:37:10 +01:00
Jonathan Brouwer e84aea3db1 Rollup merge of #150338 - bjorn3:ice_message_version, r=lqd,hkBst
Include rustc version in ICE messages

Rather than only including them in the ICE file. Not every user includes the ICE file in their bug reports, nor do they always list the rustc version.
2025-12-24 14:19:23 +01:00
Jonathan Brouwer 2622cc2129 Rollup merge of #150336 - heiher:loong-no-f16-llvm20, r=lqd
Disable f16 on LoongArch for LLVM < 21

The `f16` type works on the LoongArch target starting from LLVM 21. However, the current minimum supported external LLVM version is 20, so `f16` must not be enabled on LoongArch for LLVM version < 21.
2025-12-24 14:19:23 +01:00
Jonathan Brouwer 77fe25a741 Rollup merge of #150311 - ChrisDenton:no-temp, r=Kivooeo
Avoid using env::temp when linking a binary

This keeps all build artefacts (even temporary ones) within the build directory.

Fixes rust-lang/rust#139963
2025-12-24 14:19:22 +01:00
Jonathan Brouwer d7eee19c84 Rollup merge of #150303 - DanielEScherzer:stability-docs, r=lcnr
`target_features::Stability`: tweak docs of `requires_nightly()`

* No method named `allow_toggle()` exists on the type, but based on the documentation of both `requires_nightly()` and `toggle_allowed()` it seems that `toggle_allowed()` is the intended method to mention.

* Add `()` to the mention of `in_cfg()` to make it clear that a method is being referred to, and to match the presence of `()` in the mention of `toggle_allowed()`.
2025-12-23 12:01:04 +01:00
Jonathan Brouwer f4d3c0a033 Rollup merge of #150301 - vexide:fix/libstd-vexos-pipe, r=joboet
std: remove unsupported pipe module from VEXos pal

rust-lang/rust#146794 moved `pipe` implementations out of PAL and into a toplevel `sys` module. While most targets supporting libstd were updated, the PR did not remove the old module from the `vexos` PAL, causing builds to fail on the `armv7a-vex-v5` target.

<img width="2258" height="322" alt="image" src="https://github.com/user-attachments/assets/3bdb83f9-e577-4795-9d20-0ae4ab5d505c" />

This PR removes the old module path in the PAL and allows `vexos` targets to fall back to the `unsupported` implementation in sys/pipe.
2025-12-23 12:01:03 +01:00
Jonathan Brouwer 6ca7f0d162 Rollup merge of #150295 - forkgull:notgull/hermit-fix, r=joboet
Fix compilation error in hermit-abi time.rs

Fixes time.rs by updating the MIN and MAX structs appropraitely.

Fixes rust-lang/rust#150294
2025-12-23 12:01:03 +01:00
Jonathan Brouwer 1c50ee1956 Rollup merge of #150282 - fee1-dead-contrib:push-tyqyzvmsmnyo, r=petrochenkov
move a ui test to coretests unit test

It only tests the usage and formatting of `fmt::Pointer`.
2025-12-23 12:01:02 +01:00
Jonathan Brouwer c0337ca5f0 Rollup merge of #150205 - Enselic:line-no, r=Zalathar,jieyouxu
compiletest: Add `LineNumber` newtype to avoid `+1` magic here and there

Start small. If it works well we can increase usage bit by bit as time passes.

My main motivation for doing this is to get rid of the `+ 1` I otherwise have to add in https://github.com/rust-lang/rust/pull/150201 on this line:
```rs
                crate::directives::line::line_directive(file, zero_based_line_no + 1, &line)
```
But I think this is a nice general improvement by itself.

Note that we keep using "0" to represent "no specific line" because changing to `Option<LineNumber>` everywhere is a very noisy and significant change. That _can_ be changed later if wanted, but let's not do it now.
2025-12-23 12:01:01 +01:00
Jonathan Brouwer e156286fa5 Rollup merge of #150130 - aerooneqq:delegation-one-line-trait-impl, r=petrochenkov
Support syntax for one-line trait reuse

This PR adds support for reusing the whole trait with a one-line reuse syntax and is part of the delegation feature rust-lang/rust#118212:
```rust
trait T {
  fn foo(&self);
}

struct S;
impl T for S { ... }

struct Wrapper(S);
reuse impl T for Wrapper { self.0 }
```

The core idea is that we already have support for glob reuse, so in this scenario we want to transform one-line reuse into a trait impl block with a glob reuse in the following way:
```rust
//Before
reuse impl T for Wrapper { self.0 }

//After
impl T for Wrapper {
  reuse T::* { self.0 }
}
```

It seems like this task can be solved during parsing stage, when we encountered a one-line trait reuse, we can expand into this impl block right away, and the code which was already written to expand glob delegations will take care about the rest. We will copy trait path into glob reuse path.

The implementation of the transformation reuses already existing methods for `impl` parsing, however, we do not parse inner `impl` items, instead we parse "inner items" as delegation body. Thus, we do not have to deal with generics, consts, unsafe and other `impl` related features.

Other syntax possibility is trying to shorten one-line reuse by replacing `impl` keyword with `reuse` keyword:
```rust
reuse T for Wrapper { self.0 }
```
In this case implementation may become more complicated, and the syntax more confusing, as keywords such as `const` or `unsafe` will precede `reuse`, and there are also generics:
```rust
unsafe reuse<T1, T2> T for Wrapper { self.0 }
```

In the first (currently implemented) version reuse is placed in the beginning of the item, and it is clear that we will reuse trait implementation, while in the second, shorter version, the `reuse` keyword may be lost in generics and keywords that may precede `impl`.

r? ``@petrochenkov``
2025-12-23 12:01:01 +01:00
Jonathan Brouwer 92c0c3581c Rollup merge of #150281 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/4a8db0f1f0eed8c576ad5d7c4b5ff537d14d1451.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-22 20:11:54 +01:00
Jonathan Brouwer a65fa4a357 Rollup merge of #150166 - Urgau:const-item-lint-150157, r=Kivooeo
Don't lint on interior mutable `const` item coming from derefs

This PR fixes the `const_item_interior_mutations` lint so we don't lint on interior mutable `const` item coming from derefs.

Fixes https://github.com/rust-lang/rust/issues/150157
2025-12-22 20:11:54 +01:00
Jonathan Brouwer 9175089439 Rollup merge of #149928 - estebank:if-no-else, r=fee1-dead
Detail expectation on non-`()` block tail in `if` then condition with no `else`

When encountering an `if` expression with no `else` where the then block has a tail expression, we emit an E0308 type error. We now explain why `()` was expected.

Partially address rust-lang/rust#144911.
2025-12-22 20:11:53 +01:00
Jonathan Brouwer bfca3ee37f Rollup merge of #150274 - ada4a:patch-4, r=Kivooeo
Fix typo
2025-12-22 17:33:38 +01:00
Jonathan Brouwer 4271f82315 Rollup merge of #150267 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/31d201967240f50b8852eb0dd1d1051ac4d9ccab.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-22 17:33:37 +01:00
Jonathan Brouwer 520a3c41cd Rollup merge of #150155 - Aditya-PS-05:fix/ice-150103-root-in-suggestions, r=estebank
fix ICE when {{root}} appears in import suggestions

Fixes rust-lang/rust#150103

When wrong nested imports like `use A::{::Fish}` were used, the internal {{root}} would appear in diagnostic suggestions, causing an ICE in `join_path_idents` which asserted that **{{root}} should only appear at the start of a path**.

r? ``@matthiaskrgr``
2025-12-22 17:33:37 +01:00
Jonathan Brouwer aa93a61eb2 Rollup merge of #150098 - Bryntet:perf-testing, r=JonathanBrouwer
remove `legacy_const_generic_args` cache

putting this here to run perf
2025-12-22 17:33:36 +01:00
Jonathan Brouwer fdc84e8aa5 Rollup merge of #150237 - jieyouxu:tidy-run-make-cargo, r=Zalathar
Skip tidy target-specific check for `run-make-cargo` too

I forgot to change this when implementing the run-make fission.

Noticed in https://github.com/rust-lang/rust/pull/149624#issuecomment-3609640422.
2025-12-22 07:58:50 +01:00
Jonathan Brouwer d31a2bedfb Rollup merge of #150204 - Bryntet:parse_cfi_encoding, r=JonathanBrouwer
Port `#[cfi_encoding]` to attribute parser

The error message is kind of saying the same thing twice, would like input on which .expect function I should use instead to not have it be double, otherwise this passes all tests locally where this attribute is used

r? `@JonathanBrouwer`
2025-12-22 07:58:49 +01:00
Jonathan Brouwer 43f270a0ef Rollup merge of #150109 - tshepang:patch-1, r=jieyouxu
crash test readme: point to rustc-dev-guide

There is information that is duplicated here and in rustc-dev-guide, and the latter is more comprehensive, so point there.
2025-12-22 07:58:48 +01:00
Jonathan Brouwer e1f41dc84b Rollup merge of #149840 - jieyouxu:bootstrap-missing-stage0, r=Zalathar
Update comment for `STAGE0_MISSING_TARGETS`
2025-12-22 07:58:48 +01:00
Jonathan Brouwer 4b94235a66 Rollup merge of #150223 - dianqk:gvn-insert_unique, r=cjgillot
GVN: Adds the `insert_unique` method

The new `insert_unique` method is used to handle `IndexVec<VnIndex, T>` such as `evaluated` and `rev_locals`.
2025-12-21 21:16:36 +01:00
Jonathan Brouwer e0dba518b5 Rollup merge of #150221 - el-ev:missing-par-ice-150154, r=fmease
rustdoc: handle macro expansions in types

- Closes rust-lang/rust#150154.
- Closes rust-lang/rust#150197.

This PR implements `visit_ty` in `ExpandedCodeVisitor` to correctly handle macro expansions in type positions (e.g., `let _: foo!();`). This also fixes a crash in rustdoc caused by the same issue.

Before:
<img width="419" height="182" alt="image" src="https://github.com/user-attachments/assets/89627230-032d-4ba1-af2e-8aa9a9cc6627" />
After:
<img width="288" height="107" alt="image" src="https://github.com/user-attachments/assets/c06caeda-28b7-45b8-845a-e7fe784a82e4" />
2025-12-21 21:16:35 +01:00
Jonathan Brouwer 0177e98a6d Rollup merge of #150210 - Enselic:run-mir-pass, r=saethlin
tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass

This test passes locally for me. Let's see if it passes CI too.

Discovered while I worked on https://github.com/rust-lang/rust/pull/150201.

CC rust-lang/rust#128945
2025-12-21 21:16:34 +01:00
Jonathan Brouwer 81b81faac1 Rollup merge of #149512 - adamgemmell:dev/adagem01/armv7-d32-fix, r=Amanieu
Fix d32 usage in Arm target specs

Fixes https://github.com/rust-lang/rust/issues/149399 - after checking with an LLVM engineer Rust's feature implications do correctly map to LLVM's. The target specs originally had +vfp3,+d16, but were mistakenly fixed to +vfp3,-d32 which disables vfp3 again.

Some targets specify +vfp2,-d32, and since vfp2 shouldn't imply d32 the -d32 is unneeded.

The list of Arm features is quite old and since Arm is now a target maintainer of many of them we'll go in and update them. We should probably add vfp3d16 and similar as rust has no way to express these right now after d16 was removed.

The LLVM features expand like this:

```
vfp4 -> vfp3 + fp16 + vfp4d16 + vfp4sp
vfp4d16 -> vfp3d16 + fp16 + fp64 + vfp4d16sp
vfp4sp -> vfp3sp + fp16 + d32 + vfp4d16sp
vfp4d16sp -> vfp3d16sp + fp16
vfp3 -> vfp2 + vfp3d16 + vfp3sp
vfp3d16 -> vfp2 + fp64 + vfp3d16sp
vfp3sp -> vfp2 + d32 + vfp3d16sp
vfp3d16sp -> vfp2sp
vfp2 -> vfp2sp + fp64
vfp2sp -> fpregs
```

`-neon` might be unnecessary too in many of these cases, but some default CPUs that Rust specifies will turn Neon on so that needs a bit more care. I can't see any LLVM cpus that enable D32.

Old description:

> Fixes https://github.com/rust-lang/rust/issues/149399 - this implication was likely a mistake and isn't enforced by LLVM. This is is a breaking change and any users specifying `vfp2/3/4` via `-Ctarget-features` or the `target_feature` attribute will need to add `d32` in to get the same behaviour. The target features are unstable so this is ok for Rust, and this is necessary as otherwise there's no way to specify a `vfp2-d16` configuration, for example.
>
> I expect these targets would have been broken by https://github.com/rust-lang/rust/pull/149173 as `-d32` would have disabled any `+vfpX` feature before it. With the removal of the implication the `-d32` went back to being unnecessary, but I've removed it anyway.
>
> As ``@RalfJung`` pointed out, thumbv7a-nuttx-eabihf looks to have been relying on this implication so I've added `+d32` to it's target spec.
2025-12-21 21:16:33 +01:00
Jonathan Brouwer 73292d90e8 Rollup merge of #150198 - Bryntet:parse_thread_local, r=JonathanBrouwer
Port `#[thread_local]` to attribute parser

Simple port, only thing that might be an issue is the `help: #[thread_local] can be applied to foreign statics and statics` it probably would be that if an attribute is applicable to both statics and foreign statics that we don't alphabetically sort them next to each other, because now it kinda reads like `#[thread_local]` is something that you primarily use on foreign statics

r? `@JonathanBrouwer`
2025-12-20 16:24:06 +01:00
Jonathan Brouwer ba753c6034 Rollup merge of #150188 - yotamofek:pr/dogfood-strip-circumfix, r=Kivooeo
Dogfood `strip_circumfix`

cc rust-lang/rust#147946
Truth be told, I expected to find more places where this can be used in the compiler.
Seems cargo, clippy and rustfmt can use this much more frequently, but I'll have to wait (I think?) for the next two-way sync to be able to dogfood it in those repos.
2025-12-20 16:24:05 +01:00
Jonathan Brouwer 5e9b3a08c8 Rollup merge of #150126 - bjorn3:sync_cg_clif-2025-12-18, r=bjorn3
Subtree sync for rustc_codegen_cranelift

Nothing too exciting since the last sync.

r? ``@ghost``

``@rustbot`` label +A-codegen +A-cranelift +T-compiler
2025-12-18 18:37:24 +01:00
Jonathan Brouwer 521aca2b17 Rollup merge of #150125 - Bryntet:parse_rustc_lint_opt_deny_field_access, r=JonathanBrouwer
Port `#[rustc_lint_opt_deny_field_access]` to attribute parser

r? ``@JonathanBrouwer``
2025-12-18 18:37:22 +01:00
Jonathan Brouwer ad4d6b9a17 Rollup merge of #150124 - DanielEScherzer:patch-1, r=petrochenkov
unstable.rs: fix typos in comments (implementatble -> implementable)
2025-12-18 18:37:21 +01:00
Jonathan Brouwer 4c9451bff8 Rollup merge of #150102 - jdonszelmann:fix-149982, r=Kivooeo
Fixed ICE for EII with multiple defaults due to duplicate definition in nameres

r? ``@jieyouxu`` (since you looked at the other one)

Fixes https://github.com/rust-lang/rust/issues/149982

Previously a [fix was proposed](https://github.com/rust-lang/rust/pull/149985) by ``@SATVIKsynopsis`` which I marked as co-author on the first commit for the test they contributed. I'm closing this previous PR.

Duplicate definitions of EII defaults shouldn't be possible. I want to still panic on them, since I want to know when other bugs exist. However, in this case the duplicate was caused by something more subtle: both eiis have the same name, and as such a "duplicate definition" error is given. However, the compiler gracefully continues compiling despite that, assuming only one of the two EIIs is actually defined.

Both defaults then name resolve, and find the same single remaining EII, and both register themselves to be its default, breaking the single-default assumption.

The solution: I added a span-delayed-bug, to make sure we only panic if we hadn't previously had this duplicate definition name resolution error.

Thanks to ``@SATVIKsynopsis`` for their attempt. Adding a diagnostic here could make some sense, but nonetheless I think this is the better solution here <3
Also thanks to ``@yaahc`` for debugging help, she made me understand the name resolution of the situation so much better and is just lovely in general :3

The last commit is something I tried during debugging, which felt like a relevant test to add (one where both eiis also have the same function name)
2025-12-18 18:37:21 +01:00
Jonathan Brouwer 1778549c5e Rollup merge of #150083 - Enselic:same-crate-same-macro, r=Kivooeo
tests/run-make-cargo/same-crate-name-and-macro-name: New regression test

Closes https://github.com/rust-lang/rust/issues/71259 which just **E-needs-test**. See https://github.com/rust-lang/rust/issues/71259#issuecomment-615879925 for a good description of what we should test (which we do in this PR).

The project we add fails with an old nightly without the fix:

```console
$ cargo +nightly-2020-03-10 run
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"version 1"`,
 right: `"version 2"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

and passes with a recent toolchain:

```console
$ cargo run
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
warning: /home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2/Cargo.toml: no edition set: defaulting to the 2015 edition while the latest is 2024
   Compiling mylib v2.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v2)
   Compiling mylib v1.0.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/mylib_v1)
   Compiling consumer v0.1.0 (/home/martin/src/rust-same-crate-same-macro/tests/run-make-cargo/same-crate-name-and-macro-name/consumer)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/consumer`
```

in other words, the test tests what it should and will catch regressions.
2025-12-18 18:37:20 +01:00
Jonathan Brouwer 305209f8cd Rollup merge of #150048 - pthariensflame:patch-1, r=Amanieu
std_detect: AArch64 Darwin: expose SME F16F16 and B16B16 features

This synchronizes the list with the current state of `sysctl` on macOS “Tahoe” 26.2.

r? ``@Amanieu``
2025-12-18 18:37:18 +01:00
Jonathan Brouwer 1e496bc9e6 Rollup merge of #150024 - aerooneqq:recursive-delegation-2, r=petrochenkov
Support recursive delegation

This PR adds support for recursive delegations and is a part of the delegation feature rust-lang/rust#118212.

r? ``@petrochenkov``
2025-12-18 18:37:17 +01:00
Jonathan Brouwer b53dd2d520 Rollup merge of #150022 - GuillaumeGomez:rustc-macro-expansion, r=kobzol
Generate macro expansion for rust compiler crates docs

This enables the `--generate-macro-expansion` rustdoc flag, generating possibility to expand macros directly in source code pages (https://github.com/rust-lang/rust/pull/137229).

Needed this new feature when I was working on https://github.com/rust-lang/rust/pull/149919 and I thought "why not enable it by default?". So here we go.

Not too sure who to r? here so:

r? ``@kobzol``
2025-12-18 18:37:17 +01:00
Jonathan Brouwer b17df9b99a Rollup merge of #149952 - Delta17920:fix/149777-range-destructuring, r=fmease
Suggest struct pattern when destructuring Range with .. syntax

implemented a new diagnostic in rustc_resolve to detect invalid range destructuring attempts (e.g., let start..end = range). The fix identifies when resolution fails for identifiers acting as range bounds specifically handling cases where bounds are parsed as expressions and suggests the correct struct pattern syntax (std::ops::Range { start, end }). This replaces confusing "cannot find value" errors with actionable help, verified by a new UI test covering various identifier names.

Fixes rust-lang/rust#149777
2025-12-18 18:37:16 +01:00
Jonathan Brouwer d0e9f69016 Rollup merge of #149925 - folkertdev:cfg-select-parse-unused-branches, r=jdonszelmann
`cfg_select!`: parse unused branches

tracking issue: https://github.com/rust-lang/rust/issues/115585

Emit parse errors that are found in the branches that are not selected, like e.g. how `#[cfg(false)] { 1 ++ 2 }` still emits a parse error even though the expression is never used by the program. Parsing the unused branches was requested by T-lang https://github.com/rust-lang/rust/pull/149783#issuecomment-3647541611.
2025-12-18 18:37:15 +01:00
Jonathan Brouwer 9890981c30 Rollup merge of #148849 - saethlin:windows-stack-protectors, r=wesleywiser
Set -Cpanic=abort in windows-msvc stack protector tests

I ran into a test failure with the 32-bit windows test on https://github.com/rust-lang/rust/pull/117192, one of the tests has been incorrectly passing (until my change!) because it is picking up the stack protector from another function. I've tried to prevent that happening again by adding CHECK-DAGs for the start and end of each function.

I've also done my best to correct the comments, some were based on the fact that we used to run these tests with unwinding panics, but LLVM doesn't add protectors to function with SEH funclets so it's must more straightforward for these tests to use `-Cpanic=abort`.
2025-12-18 18:37:14 +01:00
Jonathan Brouwer 663d8432f1 Rollup merge of #145933 - GrigorenkoPV:thing_as_thing, r=Amanieu
Expand `str_as_str` to more types

Tracking issue: rust-lang/rust#130366
ACP: https://github.com/rust-lang/libs-team/issues/643

This PR expands `str_from_str` feature and adds analogous methods to more types. Namely:
- `&CStr`
- `&[T]`, `&mut [T]`
- `&OsStr`
- `&Path`
- `&ByteStr`, `&mut ByteStr` (tracking issue:  rust-lang/rust#134915) (technically was not part of ACP)
2025-12-18 18:37:13 +01:00
Jonathan Brouwer 4ea24671ed Rollup merge of #150113 - Darksonn:pin-coerce-unsized-to-150112, r=jackh726
Update tracking issue for PinCoerceUnsized

This uses the newly created tracking issue https://github.com/rust-lang/rust/issues/150112.

Please see https://github.com/rust-lang/rust/issues/68015#issuecomment-3665424732 for motivation.

r? ``@jackh726``
2025-12-17 23:31:22 +01:00
Jonathan Brouwer fd2f46e302 Rollup merge of #150099 - GuillaumeGomez:field-handling, r=yotamofek
[rustdoc] Fix invalid handling of field followed by negated macro call

This is the bug uncovered in https://github.com/rust-lang/rust/pull/150022. Once fixed Ill rebuild all compiler docs and see if we can enable the option for compiler docs. =D

It's a weird case where we extracted some tokens out of the iterator and then, when checking next items (from this iterator), it didn't find the `:` token, and therefore badly assumed the token kind.

The solution I came up with is to instead not extract tokens from the iterator and to count how many tokens are in the current path. So when iterate over the items, instead of having a mix of extracted tokens and tokens still inside the iterator, we now only iterate over the iterator.

The biggest change here is that `get_full_ident_path` will return an option instead of a `Vec`, and if it's contains `:` (one, not two), then it will return `None` and the `:` will be handled like any token and not like a path (which is more correct imo).

r? `@yotamofek`
2025-12-17 23:31:22 +01:00
Jonathan Brouwer 3ef20b62fa Rollup merge of #150095 - Bryntet:parse_internal_rustc_attributes, r=JonathanBrouwer
Port `#[rustc_no_implicit_autorefs]`, `#[rustc_lint_opt_ty]`, and `#[rustc_lint_query_instability]` attributes to be parsed

This PR ports three simple internal rustc attributes to be parsed in a single PR to avoid having to resolve multiple rebase confilicts

r? ``@JonathanBrouwer``
2025-12-17 23:31:21 +01:00
Jonathan Brouwer 64e4dafc21 Rollup merge of #149922 - reddevilmidzy:t12, r=Kivooeo
Tidying up tests/ui/issues 14 tests [5/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang/rust#133895

move `tests/ui/inherent-impls-overlap-check` to `tests/ui/duplicate/inherent-impls-overlap-check`.

r? Kivooeo
2025-12-17 23:31:20 +01:00
Jonathan Brouwer 84d441f558 Rollup merge of #150086 - Bryntet:parse_never_return_null_pointer, r=JonathanBrouwer
Port `#[rustc_never_returns_null_ptr]` to attribute parser

Ports `#[rustc_never_returns_null_ptr]` to be parsed using the attribute parser

r? `@JonathanBrouwer`
2025-12-17 12:49:22 +01:00
Jonathan Brouwer 093d175edd Rollup merge of #150044 - workingjubilee:avoid-suggesting-irrelevant-rename, r=jieyouxu
Avoid unhelpful suggestion when crate name is invalid

Pointing out they can set the crate's name is non-actionable: their problem is they found out how and set it incorrectly. Remove extraneous information that can only confuse the matter.
2025-12-17 12:49:21 +01:00
Jonathan Brouwer 56c00b0bca Rollup merge of #150008 - androm3da:bcain/va_arg_rs, r=folkertdev
Implement va_arg for Hexagon targets

Implements proper variadic argument handling for hexagon-unknown-linux-musl targets using a 3-pointer VaList structure compatible with LLVM's HexagonBuiltinVaList implementation.

* Handles register save area vs overflow area transition
* Provides proper 4-byte and 8-byte alignment for arguments
* Only activates for hexagon+musl targets via Arch::Hexagon & Env::Musl
2025-12-17 12:49:20 +01:00