Commit Graph

323312 Commits

Author SHA1 Message Date
Laurențiu Nicola 2629a77d33 Use last good clippy lints JSON in codegen 2026-04-10 19:36:39 +03:00
workflows-rust-analyzer[bot] cdcd9b4274 internal: update generated lints 2026-04-10 19:36:18 +03:00
Laurențiu Nicola 32c1e174e2 Merge pull request #22011 from lnicola/gen-lints-token
internal: Use create-github-app-token to get token for gen-lints
2026-04-10 15:10:33 +00:00
Laurențiu Nicola 65bae63b98 Use create-github-app-token to get token for gen-lints 2026-04-10 17:59:57 +03:00
Laurențiu Nicola a1866385cf Merge pull request #22000 from lnicola/sync-from-rust
internal: sync from downstream
2026-04-09 14:41:24 +00:00
Laurențiu Nicola 02b25f7755 Merge ref '4c4205163abc' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@4c4205163a
Filtered ref: rust-lang/rust-analyzer@ec550d4163
Upstream diff: https://github.com/rust-lang/rust/compare/80ad55752e5ae6c2d1bc143b819eb8d1c00167d1...4c4205163abcbd08948b3efab796c543ba1ea687

This merge was created using https://github.com/rust-lang/josh-sync.
2026-04-09 17:31:59 +03:00
Laurențiu Nicola 95852ab2ae Prepare for merging from rust-lang/rust
This updates the rust-version file to 4c4205163a.
2026-04-09 17:31:54 +03:00
Chayim Refael Friedman d6ce50e229 Merge pull request #21996 from Shourya742/2026-04-08-migrate-extract-struct-from-enum-variant
Migrate extract struct from enum variant to new SyntaxEditor and Port whitespace heuristics to SyntaxEditor
2026-04-09 12:22:45 +00:00
bit-aloo 9f83ca0120 remove create-struct-def subeditors we don't need them and can use make constructor directly 2026-04-09 16:23:19 +05:30
bors 4c4205163a Auto merge of #154223 - malezjaa:refactor-typecheck-op, r=adwinwhite
refactor rustc_hir_typeck/src/op.rs





Fixes rust-lang/rust#64297

This is a refactoring PR with no logic or behaviour changes. I tried to improve readability of op.rs, which had a few very large functions using some suboptimal syntax. I broke these up into smaller helpers.
2026-04-09 10:11:58 +00:00
Chayim Refael Friedman bbb7fadb3d Merge pull request #21977 from ChayimFriedman2/fill-fields-priv
fix: Disable the fix for missing-fields when the fields are private
2026-04-09 09:17:36 +00:00
Chayim Refael Friedman d383daa8f8 Disable the fix for missing-fields when the fields are private 2026-04-09 12:09:20 +03:00
Lukas Wirth c254d42734 Merge pull request #21973 from ChayimFriedman2/import-context
fix: Consider the context of the path for `ImportAssets`
2026-04-09 08:51:58 +00:00
Lukas Wirth b47b612188 Merge pull request #21981 from ChayimFriedman2/cfg-crate
fix: Diagnose cfged-out crate
2026-04-09 08:39:10 +00:00
Lukas Wirth ec5d051f0a Merge pull request #21971 from ChayimFriedman2/fill-fields-coerce
fix: Check coercion, not unification, in "Fill struct fields", as the criteria to use an existing local as the field's value
2026-04-09 08:34:36 +00:00
Lukas Wirth 3c48665a65 Merge pull request #21969 from BenjaminBrienen/reload
changes to build scripts and config.toml should always refresh
2026-04-09 08:32:44 +00:00
malezjaa 118edea86f refactor rustc_hir_typeck/src/op.rs 2026-04-09 10:27:14 +02:00
bors 1948ee19e9 Auto merge of #155029 - jhpratt:rollup-n6DjhvP, r=jhpratt
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#153038 (core::sync: rename `Exclusive` to `SyncView` and make improvements)
 - rust-lang/rust#154955 (Fix pattern types rendering in rustdoc)
 - rust-lang/rust#155026 (Move `maybe_loop_headers` out of `rustc_middle`.)
2026-04-09 06:31:38 +00:00
Jacob Pratt 7c085ac05d Rollup merge of #155026 - nnethercote:mv-maybe_loop_headers, r=dianqk
Move `maybe_loop_headers` out of `rustc_middle`.

`rustc_middle` is enormous and it's always good to move things out of it where possible. `maybe_loop_headers` is easy to move because it has a single use in `jump_threading.rs`.

r? @WaffleLapkin
2026-04-09 02:31:09 -04:00
Jacob Pratt a2d7d8c8da Rollup merge of #154955 - cijiugechu:fix-rustdoc-pattern-type-implementors, r=notriddle
Fix pattern types rendering in rustdoc

Closes rust-lang/rust#150889 .

`core` was rendering local pattern-type impls through `clean_ty`, which formatted `rustc_hir::TyPat` with derived Debug, while inlined docs go through `clean_middle_ty` and get the pretty-printed `rustc_middle::ty::Pattern`.
Lower local HIR pattern types before formatting so both paths share the same canonical pattern printer and stop exposing `TyPat { ... }` in implementors.

#### Current result:
<img width="1133" height="738" alt="截屏2026-04-07 22 47 26" src="https://github.com/user-attachments/assets/bb5f8942-30b1-400a-a0a0-f581da5bb59f" />
2026-04-09 02:31:08 -04:00
Jacob Pratt 9ebe418dc6 Rollup merge of #153038 - pthariensflame:syncview-rename, r=Amanieu
core::sync: rename `Exclusive` to `SyncView` and make improvements

This PR implements the renaming of `core::sync::Exclusive` to `SyncView` as decided in rust-lang/rust#98407.  To preserve the ability to search for the old name, it adds `Exclusive` as a `doc_alias`.

It also makes the following additional changes:

- Converting the `get_mut` method to being an instance of `AsMut::as_mut`.  In the process, it makes both the new `impl AsMut` and the existing `impl AsRef` `const`, and it also renames `get_pin_mut` to `as_pin_mut` for consistency.  This direction follows a suggestion from rust-lang/rust#98407.
- Adding an `as_pin` method that can only be used when the wrapped type implements `Sync`, to complete the square of access methods.
- Making as many of the existing `impl`s `const` as possible; this involved making the existing `impl Default` no longer derived.
- Adding `impl`s for `AsyncFnOnce`, `AsyncFnMut`, and `AsyncFn`, akin to the existing `impls` for `FnOnce`, `FnMut`, and `Fn`.

It does not yet do the following, which may be desirable:

- Fixing/improving the documentation to address the concern pointed out in rust-lang/rust#146245.

It previously did the following, but this was removed after discussion:
- Adding an `impl` for (`const`) `Iterator`, which felt in line with the existing `impl`s for `Future` and `Coroutine`.
2026-04-09 02:31:08 -04:00
Chayim Refael Friedman f8a6be4d14 Merge pull request #21920 from Wilfred/claude/update-match-arms-message-2RJMd
fix: Improve label on add_missing_match_arms assist
2026-04-09 06:06:39 +00:00
Chayim Refael Friedman 335794560e Merge pull request #21992 from BenjaminBrienen/view-crate-graph-unwrap
unwrap unnecessary result return type in view_crate_graph
2026-04-09 05:41:02 +00:00
Chayim Refael Friedman 50ec8eac4b Merge pull request #21986 from A4-Tacks/lspext-defs-layout-node
internal: Fix lsp_ext field name for RecursiveMemoryLayoutNode
2026-04-09 05:39:23 +00:00
Chayim Refael Friedman 9369702b37 Merge pull request #21982 from A4-Tacks/kw-not-snippet
minor: Fix self kw is snippet in type location
2026-04-09 05:37:20 +00:00
Chayim Refael Friedman 53180eee68 Merge pull request #21978 from shorwood/feat/granular-override-placeholders
feat: enhance runnable command placeholders
2026-04-09 05:35:08 +00:00
bors 1fe72d3599 Auto merge of #155024 - jhpratt:rollup-PPA0SHp, r=jhpratt
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#150316 (Do not use non-wf input expectations from fudge when checking function calls)
 - rust-lang/rust#152859 (`-Znext-solver` use the trait object's own bounds instead of goal when considering builtin object bounds)
 - rust-lang/rust#154856 (Fix linking two dylibs together when both depend on profiler_builtins)
 - rust-lang/rust#153888 (Avoid stack overflow in FindExprBySpan)
 - rust-lang/rust#154991 (Fix ICE in next-solver TransmuteFrom candidate)
 - rust-lang/rust#154995 (min/max_by tests: also check result)
 - rust-lang/rust#155004 (core/num: Fix feature name for unstable `integer_extend_truncate` functions)
 - rust-lang/rust#155007 (renaming method is_impl_trait to is_opaque)
 - rust-lang/rust#155009 (meta: Add checkboxes to unsresolved questions in issue templates)
 - rust-lang/rust#155017 (Update tracking issue number of future-incompatibility lint `unstable_syntax_pre_expansion`)
2026-04-09 03:19:48 +00:00
Jacob Pratt 1166f31d43 Rollup merge of #155017 - fmease:update-issue-number-unstable_syntax_pre_expansion, r=Kivooeo
Update tracking issue number of future-incompatibility lint `unstable_syntax_pre_expansion`

Issue rust-lang/rust#65860 has never been a proper tracking issue, it has always been a normal issue that reported a pass→fail regression which was subsequently fixed and which elicited a discussion spanning 50 comments. Years later the formerly offending errors were reintroduced as warnings which link to said issue (see section *Pre-History* in issue rust-lang/rust#154045 for details).

A few weeks ago I closed this issue (https://github.com/rust-lang/rust/issues/65860#issuecomment-4083652176) in favor of a new super focused & structured tracking issue, rust-lang/rust#154045. That means people now have to jump through hoops to arrive at the new tracking issue which is less than ideal (it's very likely that this user had to do so: https://github.com/rust-lang/rust/issues/154045#issuecomment-4207339422), let's fix that.

Part of rust-lang/rust#154045.
2026-04-08 23:04:02 -04:00
Jacob Pratt ff5412c329 Rollup merge of #155009 - tgross35:tracking-issue-checkbox, r=jieyouxu
meta: Add checkboxes to unsresolved questions in issue templates

These frequently have links to comments on closed PRs, meaning it can looks like issues have been resolved even if that isn't the case. Add checkboxes to make it more clear when a conclusion has been reached.
2026-04-08 23:04:01 -04:00
Jacob Pratt 98a6d389d8 Rollup merge of #155007 - josetorrs:rename-is-impl-trait, r=WaffleLapkin,Kivooeo
renaming method is_impl_trait to is_opaque

Completing one of the tasks mentioned in this issue: https://github.com/rust-lang/rust/issues/154941

r? @WaffleLapkin
2026-04-08 23:04:00 -04:00
Jacob Pratt 0cea5eef5e Rollup merge of #155004 - okaneco:fix_truncate_extend_label, r=jhpratt
core/num: Fix feature name for unstable `integer_extend_truncate` functions

Tracking issue: https://github.com/rust-lang/rust/issues/154330
Feature gate: `#![feature(integer_extend_truncate)]`

---

The feature name for the const unstable attribute was accidentally transposed when const traits were added in https://github.com/rust-lang/rust/pull/154356/changes/68c833906666fb428e6a32f8006f3bc8f6a7833e.
```diff
        #[unstable(feature = "integer_extend_truncate", issue = "154330")]
+       #[rustc_const_unstable(feature = "integer_truncate_extend", issue = "154330")]
```
2026-04-08 23:04:00 -04:00
Jacob Pratt f869e45669 Rollup merge of #154995 - RalfJung:minmaxby-tests, r=jhpratt
min/max_by tests: also check result

These tests were recently added in https://github.com/rust-lang/rust/pull/154761. IMO there's no reason to ignore the actual result of the function in the test, so let's also assert that this is correct.
2026-04-08 23:03:59 -04:00
Jacob Pratt 6bd1a6cd31 Rollup merge of #154991 - cijiugechu:fix/next-solver-transmutefrom-ice, r=Kivooeo
Fix ICE in next-solver TransmuteFrom candidate

Treat TransmuteFrom goals with non-region inference variables as ambiguous before running transmutability, matching the old solver.

Closes rust-lang/rust#153370 .
2026-04-08 23:03:59 -04:00
Jacob Pratt defee2995b Rollup merge of #153888 - MaximilianAzendorf:issue-153583, r=Kivooeo
Avoid stack overflow in FindExprBySpan

Fixes rust-lang/rust#153583.

Deeply nested `?` desugarings can build a very deep HIR expression spine.
When `FindExprBySpan` walks that expression during error reporting, the
recursive `visit_expr` traversal can overflow the stack before rustc emits the
actual diagnostic.

This wraps the recursive expression walk in `ensure_sufficient_stack`, which
lets the compiler report the expected E0277 instead of crashing.

Added a UI regression test for a deeply nested `?` chain.
2026-04-08 23:03:58 -04:00
Jacob Pratt 827c27d39a Rollup merge of #154856 - bjorn3:fix_dylib_profiler_builtins, r=mati865
Fix linking two dylibs together when both depend on profiler_builtins

See the comment inside this commit for why.

Fixes a regression from https://github.com/rust-lang/rust/pull/150014 reported at [#t-compiler > 1.94 profiler_builtin linkage in dylibs](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/1.2E94.20profiler_builtin.20linkage.20in.20dylibs/with/583704962).
2026-04-08 23:03:57 -04:00
Jacob Pratt bcb5909a14 Rollup merge of #152859 - ShoyuVanilla:issue-152789, r=lcnr
`-Znext-solver` use the trait object's own bounds instead of goal when considering builtin object bounds

Fixes https://github.com/rust-lang/rust/issues/152789 and fixes https://github.com/rust-lang/rust/issues/151329

r? lcnr
2026-04-08 23:03:57 -04:00
Jacob Pratt 9eb03e5bd2 Rollup merge of #150316 - ShoyuVanilla:fudge-checks, r=lcnr
Do not use non-wf input expectations from fudge when checking function calls

cc https://github.com/rust-lang/rust/issues/149379

r? lcnr

# FCP: Do not use non-wf input expectations from fudge when checking function calls

## What is fudging?

https://github.com/rust-lang/rust/blob/71e00273c0921e1bc850ae8cc4161fbb44cfa848/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L168-L170

Consider this coercion site:

`let _: Box<dyn Fn(&str) -> usize> = Box::new(|s| s.len());`

We rely on the expectation to eagerly infer the type of `s` to be `&str`. However, `dyn Fn(&str) -> usize` is not a valid type as the argument of `Box::new`, as it is not `Sized`.

*Fudging* is the mechanism we use to propagate the expectation through the `Box::new` call without constraining its generic parameter.

Fudging computes the expected argument types by acting as if we're able to propagate the expected return type directly through the function, without any coercions on the return site.

Given that we may actually want to coerce afterwards, we cannot actually commit any constraints here. We therefore compute the expectations for the function arguments in a `probe` and rely on *fudging* to be able to name any inference variables created inside of the probe.

After the fudging step, we weaken the resulting expectation if it is an unsized type in the following lines:
https://github.com/rust-lang/rust/blob/71e00273c0921e1bc850ae8cc4161fbb44cfa848/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L354
https://github.com/rust-lang/rust/blob/71e00273c0921e1bc850ae8cc4161fbb44cfa848/compiler/rustc_hir_typeck/src/expectation.rs#L77-L89

Because function arguments must be `Sized`, this weakening prevents us from applying wrong, unsized coercions to them.

## How fudging currently goes wrong

We have an opened issue for tracking such cases: https://github.com/rust-lang/rust/issues/149379.

Broadly, the failures seem to fall into two buckets.

### We may end up with non–well-formed expectations

Fudging can produce an expected type that is not well-formed.

That would eventually result in an error failing the well-formedness check, either when we do the coercion with the expected argument types, or when we select the remaining obligations.

```rust
fn foo<T>(x: (T, ())) -> Box<T> {
    Box::new(x.0)
}

fn main() {
    // We use `(dyn Send, ())` as the expectation the argument.
    let _: Box<dyn Send> = foo(((), ()));
}
```

### Weakening fudged expectation is not covering all the cases

```rust
fn field_to_box<T>(x: &(T,)) -> &T {
    &x.0
}
fn main() {
    // `Expectation::rvalue_hint` only checks whether the whole argument
    // itself is `Sized`. It does not check whether the function requires
    // its generic parameters to be `Sized`.
    let _: &dyn Send = field_to_box(&(1,));
}
```

## What this PR fixes

### One of the problematic cases of the issue

This PR fixes the first case, by simply checking well-formedness of the each expected argument types inside the fudge scope.

This is a reasonable change because:
- Non well-formed expectation would result in a well-formedness error so not using such expectation wouldn't make any previously compiled code being not compiled anymore
- Dropping a non well-formed expectation does not mean we stop providing expectations for argument coercions altogether.
  If fudging fails, we still fall back to using the types from the function signature as expectations in the usual path:
  https://github.com/rust-lang/rust/blob/71e00273c0921e1bc850ae8cc4161fbb44cfa848/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs#L330-L336

#### Related tests

- Fixes [tests/ui/coercion/fudge-inference/fn-ret-trait-object-propagated-to-inputs-issue-149379-1.rs](https://github.com/rust-lang/rust/pull/150316/commits/5668ad597d8293dcfd8917ca6e8f78d2c06555d3#diff-1468a6d8495f7adfb4a64508f002bb934c13d13871662de6efd60433649401fd)

### Limited for `-Znext-solver`

Separately (and not directly tied to the above issue), this PR also fixes a next-solver regression tracked at: https://github.com/rust-lang/trait-system-refactor-initiative/issues/259.

That regression was introduced by https://github.com/rust-lang/rust/pull/149320, which started normalizing expected function input types inside the fudge scope.
Because all inference-variable relationships and pending obligations are dropped out when we exit the fudge scope, we drop the ambiguous goal used to normalize, leaving us with an unconstrained inference variable in the expectation.

This PR fixes that by normalizing the expectation outside the fudge scope, so the resulting normalization obligations are preserved to the `InferCtxt`'s `ObligationCtxt`.

#### Related tests

- Fixes [tests/ui/traits/next-solver/fudge-inference/do-not-drop-ambig-normalization.rs](https://github.com/rust-lang/rust/pull/150316/files#diff-42e97f178fbdee7c3405ae12409eb0bca4eec92488971c703b26c083eadf728a)

## Does this PR break anything

I don't think there should be any breakage affecting the old solver.

The separate expectation normalization change only affecting the new solver does break an existing [test](https://github.com/rust-lang/rust/pull/150316/files#diff-3b946a09e063aad2a4fa6b0893508d5ffab78763b8465abfe1f689d349fda815).
This is unfortunate but I think this change should be done because

- The broken test also doesn't compile with the old solver
- The expectation normalization change is necessary to compile stuff supported on stable

## What this PR doesn't fix

This PR doesn't fix the second case -- *Weakening fudged expectation is not covering all the cases*.

@lcnr has [suggested](https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/expectations.20from.20fudging.20are.20a.20mess.20.23149379/near/560625205) the following solution for that problem:
> check whether a function where-bound errors without an out coercion, if so, weaken the expectation to `ExpectRvalueLikeUnsized`

I experimented with this and it works well in many cases.
However, on the old solver, checking where-bounds cannot reliably be treated as speculative: if we hit an overflow while checking the where-bounds, the old solver can fail the entire compilation rather than merely treating the check as failed and relaxing the expectation.

Since this second class of issues affects both the old solver and the next-solver, it seems preferable to keep the conservative behavior for now, at least until the next-solver is stabilized, rather than introducing a next-solver-only relaxation that might create new regressions and complicate stabilization efforts.

#### Related tests

- Does NOT Fix [tests/ui/coercion/fudge-inference/expectated-input-not-satisfying-fn-bounds-issue-89299.rs](https://github.com/rust-lang/rust/pull/150316/files#diff-fdcfa8ab660c052dbe246db279d167ea8a309bfe10ca6163f7fa1836be2b30d6)
- Does NOT Fix [tests/ui/coercion/fudge-inference/expectated-input-not-satisfying-fn-bounds-issue-149881.rs](https://github.com/rust-lang/rust/pull/150316/files#diff-1ccbb181cbf164841ca5af350ecf903c802a4854bda309e83e91c3b917809a55)
- Does NOT Fix [tests/ui/coercion/fudge-inference/fn-ret-trait-object-propagated-to-inputs-issue-149379-3.rs](https://github.com/rust-lang/rust/pull/150316/files#diff-b12e01cc3c265db42f135d67425d8b2bd0d9c44c680b3e8c49d1f845a0b25d09)
2026-04-08 23:03:56 -04:00
cijiugechu ee135be041 Fix ICE in next-solver TransmuteFrom candidate
Treat TransmuteFrom goals with non-region inference variables as ambiguous before running transmutability, instead of computing layouts for unresolved types. The old solver already treated these goals as ambiguous, so only the next solver could hit this ICE.
2026-04-09 10:12:18 +08:00
Chayim Refael Friedman 5710f42c2c Merge pull request #21993 from Shourya742/2026-04-08-remove-generate-trait-from-impl
Remove make with SyntaxFactory in generate_trait_from_impl
2026-04-09 01:51:05 +00:00
Nicholas Nethercote 6352e8298f Move maybe_loop_headers out of rustc_middle.
`rustc_middle` is enormous and it's always good to move things out of it
where possible. `maybe_loop_headers` is easy to move because it has a
single use in `jump_threading.rs`.
2026-04-09 11:09:52 +10:00
Chayim Refael Friedman 210a5d2092 Merge pull request #21995 from smihica/fix/cargo-config-env-override
Fix [env] in .cargo/config.toml overriding process environment variables
2026-04-09 00:33:27 +00:00
bors d0442e2800 Auto merge of #155011 - JonathanBrouwer:rollup-9GJWM3g, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#154912 (Remove `BuiltinLintDiag`)
 - rust-lang/rust#154598 (test `#[naked]` with `#[link_section = "..."]` on windows)
 - rust-lang/rust#154719 (Hexagon inline asm: add reg_pair, vreg, vreg_pair, and qreg register classes)
 - rust-lang/rust#154057 (Parenthesize block-like expressions in index base of pretty printer)
 - rust-lang/rust#154893 (make `expected_literal` positive)
 - rust-lang/rust#155002 (Clarify that `core::range` ranges do not have special syntax)
2026-04-08 23:20:07 +00:00
León Orell Valerian Liehr 2d33b30eb1 Update tracking issue number of future-incompatibility lint unstable_syntax_pre_expansion 2026-04-09 01:08:52 +02:00
Jonathan Brouwer efa922478b Rollup merge of #155002 - shepmaster:clarify-new-range, r=tgross35
Clarify that `core::range` ranges do not have special syntax

r? @tgross35
2026-04-08 23:04:36 +02:00
Jonathan Brouwer 83e81337ad Rollup merge of #154893 - jdonszelmann:expected-literal-positive, r=JonathanBrouwer
make `expected_literal` positive

r? @JonathanBrouwer
2026-04-08 23:04:36 +02:00
Jonathan Brouwer 8be4c463be Rollup merge of #154057 - aytey:fix-block-index-paren, r=fmease
Parenthesize block-like expressions in index base of pretty printer

The AST pretty printer produces invalid Rust when a block expression is the base of an index operation inside a macro expansion. This is a gap in the parenthesization fix from rust-lang/rust#119105 — the `FixupContext` approach handles statement position but not the case where a block-index is nested inside another expression.

The following is a correct program:

```rust
macro_rules! block_arr {
    () => {{ [0u8; 4] }};
}

macro_rules! as_slice {
    () => {{ &block_arr!()[..] }};
}

fn main() { let _: &[u8] = as_slice!(); }
```

But `rustc -Zunpretty=expanded` produces output that is not valid Rust, because the closing brace of `{ [0u8; 4] }` creates a statement boundary, causing the parser to treat `[..]` as a separate expression:

```rust
fn main() { let _: &[u8] = { &{ [0u8; 4] }[..] }; }
```

```
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `[`
```

Fixed output after this change:

```rust
fn main() { let _: &[u8] = { &({ [0u8; 4] })[..] }; }
```

Since `{ ... }[...]` never parses as indexing a block regardless of context, the fix unconditionally parenthesizes "complete" expressions (block, match, if, loop, etc.) when they appear as the base of an index operation.
2026-04-08 23:04:35 +02:00
Jonathan Brouwer 3fb712c80a Rollup merge of #154719 - androm3da:hexagon-inline-asm-register-classes, r=JohnTitor
Hexagon inline asm: add reg_pair, vreg, vreg_pair, and qreg register classes

Add three new register classes for the Hexagon inline assembly backend:

* `reg_pair`: GPR double registers (r1:0 through r27:26)
* `vreg`: HVX vector registers (v0-v31)
* `qreg`: HVX predicate registers (q0-q3), clobber-only for now
2026-04-08 23:04:34 +02:00
Jonathan Brouwer b040d5493e Rollup merge of #154598 - folkertdev:windows-naked-link-section, r=mati865
test `#[naked]` with `#[link_section = "..."]` on windows

As a part of https://github.com/rust-lang/rust/pull/147811 I ran into that we actually don't match (current) LLVM output.

r? @mati865
2026-04-08 23:04:33 +02:00
Jonathan Brouwer 1d0d17207c Rollup merge of #154912 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
Remove `BuiltinLintDiag`

Part of https://github.com/rust-lang/rust/issues/153099.

We're finally getting rid of `BuiltinLintDiag`! \o/

Next step, `AttributeLint`. :3

r? @JonathanBrouwer
2026-04-08 23:04:32 +02:00
Jose 501480e15e fixing clippy reference 2026-04-08 16:58:59 -04:00