37413 Commits

Author SHA1 Message Date
Jonathan Brouwer
f46d635fb5
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
a464c104e9
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
bors
f562c1eb3d Auto merge of #148766 - cjgillot:mir-const-runtime-checks, r=RalfJung,saethlin
Replace Rvalue::NullaryOp by a variant in mir::Operand.

Based on https://github.com/rust-lang/rust/pull/148151

This PR fully removes the MIR `Rvalue::NullaryOp`. After rust-lang/rust#148151, it was only useful for runtime checks like `ub_checks`, `contract_checks` and `overflow_checks`.

These are "runtime" checks, boolean constants that may only be `true` in codegen. It depends on a rustc flag passed to codegen, so we need to represent those flags cross-crate.

This PR replaces those runtime checks by special variants in MIR `ConstValue`. This allows code that expects constants to manipulate those as such, even if we may not always be able to evaluate them to actual scalars.
2025-12-22 06:58:28 +00:00
bors
5abf378487 Auto merge of #149437 - ilammy:patch-1, r=Mark-Simulacrum
Fix trailing newline in JUnit formatter

`write_message()` expects messages to contain no newlines.

Fixes https://github.com/rust-lang/rust/issues/149436
2025-12-21 10:37:51 +00:00
bors
186b29522e Auto merge of #148329 - LorrensP-2158466:closure-prop, r=lcnr
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](https://github.com/rust-lang/rust/pull/148329#issuecomment-3581019253) for more information.

r? `@lcnr`
2025-12-20 21:05:32 +00:00
bors
c5e0c50f99 Auto merge of #150056 - Kivooeo:trying-to-address-perf, r=davidtwco
Perf regression fix

The only thing changed from the previous PR is that I removed `output_is_inhabited` from hot path, and hide it behind condition, so now it will compute it less frequent

follow up on https://github.com/rust-lang/rust/pull/149664
2025-12-19 18:18:11 +00:00
bors
f615ed0ec3 Auto merge of #150110 - Urgau:remap-relative-library, r=jieyouxu
Prefer remapping the relative `library/` and `compiler/` directories

This is done to avoid leaking the relative paths to the standard library after the overall of filenames in rust-lang/rust#149709.

Noted that the paths were already leaking before, but to a lesser extent since most (but not all) the paths embedded in the distributed `rlib` were absolute.

In general Cargo compiles workspace members with relative paths, so it's better anyway to remap the relative path.

In addition to our tests I have manually confirmed that it also works as expected for the printed diagnostics paths.

cf. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/remapping.20of.20the.20standard.20library/near/564093571
2025-12-19 11:45:11 +00:00
bors
5bd0ae5c41 Auto merge of #150105 - jackh726:remove-expressions-coerce, r=BoxyUwU
Remove Expressions (and just use a Vec) in coerce

Let's see if this has much of a perf impact - would be nice to clean this up a bit

r? ghost
2025-12-19 00:27:29 +00:00
bors
8314ff45e5 Auto merge of #138961 - meithecatte:expr-use-visitor, r=Nadrieril,traviscross,ChayimFriedman2
Make closure capturing have consistent and correct behaviour around patterns

Reference PR:

- https://github.com/rust-lang/reference/pull/1837

This PR has two goals:
- firstly, it fixes rust-lang/rust#137467. In order to do so, it needs to introduce a small breaking change surrounding the interaction of closure captures with matching against enums with uninhabited variants. Yes – to fix an ICE!
    - this also fixes rust-lang/rust#138973, a slightly different case with the same root cause.
    - likewise, fixes rust-lang/rust#140011.
- secondly, it fixes rust-lang/rust#137553, making the closure capturing rules consistent between `let` patterns and `match` patterns. This is new insta-stable behavior.

## Background

This change concerns how precise closure captures interact with patterns. As a little known feature, patterns that require inspecting only part of a value will only cause that part of the value to get captured:

```rust
fn main() {
    let mut a = (21, 37);
    // only captures a.0, writing to a.1 does not invalidate the closure
    let mut f = || {
        let (ref mut x, _) = a;
        *x = 42;
    };
    a.1 = 69;
    f();
}
```

I was not able to find any discussion of this behavior being introduced, or discussion of its edge-cases, but it is [documented in the Rust reference](https://doc.rust-lang.org/reference/types/closure.html#r-type.closure.capture.precision.wildcard).

The currently stable behavior is as follows:
- if any pattern contains a binding, the place it binds gets captured (implemented in current `walk_pat`)
- patterns in refutable positions (`match`, `if let`, `let ... else`, but not destructuring `let` or destructuring function parameters) get processed as follows (`maybe_read_scrutinee`):
    - if matching against the pattern will at any point require inspecting a discriminant, or it includes a variable binding not followed by an ``@`-pattern,` capture *the entire scrutinee* by reference

You will note that this behavior is quite weird and it's hard to imagine a sensible rationale for at least some of its aspects. It has the following issues:
- firstly, it assumes that matching against an irrefutable pattern cannot possibly require inspecting any discriminants. With or-patterns, this isn't true, and it is the cause of the rust-lang/rust#137467 ICE.
- secondly, the presence of an ``@`-pattern` doesn't really have any semantics by itself. This is the weird behavior tracked as rust-lang/rust#137553.
- thirdly, the behavior is different between pattern-matching done through `let` and pattern-matching done through `match` – which is a superficial syntactic difference

This PR aims to address all of the above issues. The new behavior is as follows:
- like before, if a pattern contains a binding, the place it binds gets captured as required by the binding mode
- if matching against the pattern requires inspecting a disciminant, the place whose discriminant needs to be inspected gets captured by reference

"requires inspecting a discriminant" is also used here to mean "compare something with a constant" and other such decisions. For types other than ADTs, the details are not interesting and aren't changing.

## The breaking change

During closure capture analysis, matching an `enum` against a constructor is considered to require inspecting a discriminant if the `enum` has more than one variant. Notably, this is the case even if all the other variants happen to be uninhabited. This is motivated by implementation difficulties involved in querying whether types are inhabited before we're done with type inference – without moving mountains to make it happen, you hit this assert: 43f0014ef0/compiler/rustc_middle/src/ty/inhabitedness/mod.rs (L121)

Now, because the previous implementation did not concern itself with capturing the discriminants for irrefutable patterns at all, this is a breaking change – the following example, adapted from the testsuite, compiles on current stable, but will not compile with this PR:

```rust
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
enum Void {}

pub fn main() {
    let mut r = Result::<Void, (u32, u32)>::Err((0, 0));
    let mut f = || {
        let Err((ref mut a, _)) = r;
        *a = 1;
    };
    let mut g = || {
    //~^ ERROR: cannot borrow `r` as mutable more than once at a time
        let Err((_, ref mut b)) = r;
        *b = 2;
    };
    f();
    g();
    assert_eq!(r, Err((1, 2)));
}
```

## Is the breaking change necessary?

One other option would be to double down, and introduce a set of syntactic rules for determining whether a sub-pattern is in an irrefutable position, instead of querying the types and checking how many variants there are.

**This would not eliminate the breaking change,** but it would limit it to more contrived examples, such as

```rust
let ((true, Err((ref mut a, _, _))) | (false, Err((_, ref mut a, _)))) = x;
```

In this example, the `Err`s would not be considered in an irrefutable position, because they are part of an or-pattern. However, current stable would treat this just like a tuple `(bool, (T, U, _))`.

While introducing such a distinction would limit the impact, I would say that the added complexity would not be commensurate with the benefit it introduces.

## The new insta-stable behavior

If a pattern in a `match` expression or similar has parts it will never read, this part will not be captured anymore:

```rust
fn main() {
    let mut a = (21, 37);
    // now only captures a.0, instead of the whole a
    let mut f = || {
        match a {
            (ref mut x, _) => *x = 42,
        }
    };
    a.1 = 69;
    f();
}
```

Note that this behavior was pretty much already present, but only accessible with this One Weird Trick™:

```rust
fn main() {
    let mut a = (21, 37);
    // both stable and this PR only capture a.0, because of the no-op `@-pattern`
    let mut f = || {
        match a {
            (ref mut x @ _, _) => *x = 42,
        }
    };
    a.1 = 69;
    f();
}
```

## The second, more practically-relevant breaking change

After running crater, we have discovered that the aforementioned insta-stable behavior, where sometimes closures will now capture less, can also manifest as a breaking change. This is because it is possible that previously a closure would capture an entire struct by-move, and now it'll start capturing only part of it – some by move, and some by reference. This then causes the closure to have a more restrictive lifetime than it did previously.

See:
- https://github.com/rust-lang/rust/pull/138961#issuecomment-2761888557
- https://github.com/EC-labs/cec-assignment/pull/1
- https://github.com/tryandromeda/andromeda/pull/43

## Implementation notes

The PR has two main commits:
- "ExprUseVisitor: properly report discriminant reads" makes `walk_pat` perform all necessary capturing. This is the part that fixes rust-lang/rust#137467.
- "ExprUseVisitor: remove maybe_read_scrutinee" removes the unnecessary "capture the entire scrutinee" behavior, fixing rust-lang/rust#137553.

The new logic stops making the distinction between one particular example that used to work, and another ICE, tracked as rust-lang/rust#119786. As this requires an unstable feature, I am leaving this as future work.
2025-12-18 03:54:48 +00:00
Maja Kądziołka
a8cd497700
Skip rust-analyzer closure layout tests for now 2025-12-17 22:11:55 +01:00
bors
874a0a1996 Auto merge of #149442 - chenyukang:yukang-fix-mark-span-note-144304, r=estebank
Fix span note for question mark expression

Fixes rust-lang/rust#144304

Seems it's better to fix the note instead of modifying the span to cover the whole expression.

r? `@estebank`
2025-12-16 16:06:43 +00:00
bors
58bc32e3df Auto merge of #149948 - WaffleLapkin:dereferenceablen't, r=RalfJung
Stop applying `dereferenceable(n)` to return types

It looks like the semantics of `dereferenceable(n)` on return types is "dereferenceable until the end of the program", which is not sound for how we were using it. See [dereferenceable on return type](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/LLVM.20dereferenceable.20on.20return.20type/with/563001493) zulip thread.

cc `@rust-lang/opsem` `@nikic`
2025-12-16 09:38:19 +00:00
bors
0b40de03ae Auto merge of #149354 - antoyo:bootstrap-config/libgccjit-libs-dir, r=Kobzol
Bootstrap config: libgccjit libs dir

r? `@Kobzol`
2025-12-15 23:11:45 +00:00
bors
80bc0aef0d Auto merge of #149930 - joboet:small-sys-refactor, r=ChrisDenton
std: small `sys` refactor

Part of rust-lang/rust#117276

The large number of files changed just results from the need to update a lot of imports. Actually this PR only:
* combines the two definitions of `RawOsError` in `sys::pal` into one in `sys::io`
* moves `FULL_BACKTRACE_DEFAULT` from `sys::pal` to `sys::backtrace`
* moves the `FromInner`/`IntoInner`/... traits into `sys` (in preparation for removing `sys_common` entirely)
2025-12-15 18:46:48 +00:00
bors
60017d739f Auto merge of #150015 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 3d78b3f9e0.

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

r? `@ghost`
2025-12-15 15:20:36 +00:00
Laurențiu Nicola
3d78b3f9e0
Merge pull request #21268 from rust-lang/rustc-pull
minor: Rustc pull update
2025-12-15 09:49:44 +00:00
bors
98fc055cde Auto merge of #149851 - dianqk:update-llvm, r=cuviper
Update LLVM submodule

Fixes rust-lang/rust#149250.

Update LLVM to 21.1.7 with some 21.1.8 patches. These patches have been backported to release/21.x.
2025-12-15 07:05:49 +00:00
The rustc-josh-sync Cronjob Bot
f6c67ed0a4 Format code 2025-12-15 04:30:49 +00:00
The rustc-josh-sync Cronjob Bot
2d06e40dd0 Merge ref '0208ee09be46' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 0208ee09be465f69005a7a12c28d5eccac7d5f34
Filtered ref: 69b2702db74151cd410a028fb347c6e4e3f779dc
Upstream diff: dfe1b8c97b...0208ee09be

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-15 04:30:45 +00:00
The rustc-josh-sync Cronjob Bot
f77781c19d Prepare for merging from rust-lang/rust
This updates the rust-version file to 0208ee09be465f69005a7a12c28d5eccac7d5f34.
2025-12-15 04:25:42 +00:00
Chayim Refael Friedman
87cf6631c6
Merge pull request #21265 from J3m3/lint-attr-order
fix: respect rustc's lint attribute application order
2025-12-15
2025-12-14 22:33:33 +00:00
Lukas Wirth
c410127c69
Merge pull request #21225 from Veykril/push-wpzrmoxzttuz
internal: Give `FileSymbol` it's `'db` lifetime
2025-12-14 10:04:46 +00:00
Lukas Wirth
0da7839f48 internal: Give FileSymbol it's 'db lifetime 2025-12-14 10:54:13 +01:00
bors
69b2702db7 Auto merge of #149273 - bjorn3:crate_locator_improvements, r=petrochenkov
Don't leak sysroot crates through dependencies

Previously if a dependency of the current crate depended on a sysroot crate, then `extern crate` would in the current crate would pick the first loaded version of said sysroot crate even in case of an ambiguity. This is surprising and brittle. For `-Ldependency=` we already blocked this since rust-lang/rust#110229, but the fix didn't account for sysroot crates.

Should fix https://github.com/rust-lang/rust/issues/147966
2025-12-14 09:16:11 +00:00
Lukas Wirth
7c063a52fc
Merge pull request #21264 from A4-Tacks/bind-unused-not-applicable-on-closure
Fix bind_unused_param applicable on closure
2025-12-14 09:13:41 +00:00
Lukas Wirth
67db7568e5
Merge pull request #21257 from Veykril/push-qnolwwkvuwxk
minor: Emit `WorkspaceDiagnosticRefresh` when flycheck finished
2025-12-14 09:05:23 +00:00
Lukas Wirth
4576663053
Merge pull request #21253 from tris203/lsp_didSave
fix(lsp): handle dynamic registration for didSave
2025-12-14 08:56:11 +00:00
Lukas Wirth
3276659861 minor: Emit WorkspaceDiagnosticRefresh when flycheck finished 2025-12-14 09:54:59 +01:00
Jesung Yang
2619bd2cec fix: respect rustc's lint attribute application order
Reverse the order of returned lint attributes for a `SyntaxNode` to
match rustc's behavior.

When multiple lint attributes are present, rustc overrides earlier ones
with the last defined attribute. The previous iteration order was
incorrect, causing earlier attributes to override the later ones.
2025-12-14 06:30:09 +00:00
bors
1fc159d939 Auto merge of #146348 - jdonszelmann:eiiv3, r=lcnr,oli-obk
Externally implementable items

Supersedes https://github.com/rust-lang/rust/pull/140010
Tracking issue: https://github.com/rust-lang/rust/issues/125418

Getting started:

```rust
#![feature(eii)]

#[eii(eii1)]
pub fn decl1(x: u64)
// body optional (it's the default)
{
    println!("default {x}");
}

// in another crate, maybe
#[eii1]
pub fn decl2(x: u64) {
    println!("explicit {x}");
}

fn main() {
    decl1(4);
}
```

- tiny perf regression, underlying issue makes multiple things in the compiler slow, not just EII, planning to solve those separately.
- No codegen_gcc support, they don't have bindings for weak symbols yet but could
- No windows support yet for weak definitions

This PR merges the implementation of EII for just llvm + not windows, doesn't yet contain like a new panic handler implementation or alloc handler. With this implementation, it would support implementing the panic handler in terms of EII already since it requires no default implementation so no weak symbols

The PR has been open in various forms for about a year now, but I feel that having some implementation merged to build upon
2025-12-14 04:20:26 +00:00
A4-Tacks
1b3ae5fba1
Fix bind_unused_param applicable on closure
Example
---
```rust
fn foo() {
    let _ = |$0x| 2;
}
```

**Before this PR**

```rust
fn foo() {
    let _ = x;
    let _ = |x| 2;
}
```

**After this PR**

Assist not applicable
2025-12-14 07:43:54 +08:00
bors
1ddfb0e254 Auto merge of #149192 - gmorenz:normalize_lifetimes, r=madsmtm
NFC normalize lifetime identifiers

Fixes rust-lang/rust#126759
2025-12-13 21:47:35 +00:00
Chayim Refael Friedman
ec884b3251
Merge pull request #21263 from ChayimFriedman2/format-args-args
internal: Use a generated name in old format_args lowering, instead of `args`
2025-12-13 18:21:51 +00:00
bors
e32cdc16df Auto merge of #149934 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
2025-12-13 18:20:52 +00:00
Chayim Refael Friedman
84a306aa1e Use a generated name in old format_args lowering, instead of args
To prevent it from clashing with other names.
2025-12-13 20:12:08 +02:00
bors
5c3d6dc8d2 Auto merge of #149709 - Urgau:overhaul-filenames, r=davidtwco
Overhaul filename handling for cross-compiler consistency

This PR overhauls the way we handle filenames in the compiler and `rmeta` in order to achieve achieve cross-compiler consistency (ie. having the same path no matter if the filename was created in the current compiler session or is coming from `rmeta`).

This is required as some parts of the compiler rely on consistent paths for the soundness of generated code (see rust-lang/rust#148328).

In order to achieved consistency multiple steps are being taken by this PR:
 - by making `RealFileName` immutable
 - by only having `SourceMap::to_real_filename` create `RealFileName`
   - currently `RealFileName` can be created from any `Path` and are remapped afterwards, which creates consistency issue
 - by also making `RealFileName` holds it's working directory, embeddable name and the remapped scopes
   - this removes the need for a `Session`, to know the current(!) scopes and cwd, which is invalid as they may not be equal to the scopes used when creating the filename

In order for `SourceMap::to_real_filename` to know which scopes to apply `FilePathMapping` now takes the current remapping scopes to apply, which makes `FileNameDisplayPreference` and company useless and are removed.

This PR is split-up in multiple commits (unfortunately not atomic), but should help review the changes.

Unblocks https://github.com/rust-lang/rust/pull/147611
Fixes https://github.com/rust-lang/rust/issues/148328
2025-12-13 14:32:09 +00:00
bors
aea6cfdecb Auto merge of #147372 - jieyouxu:rust-analyzer-main-tests, r=Kobzol
Run main rust-analyzer tests in rust-lang/rust CI

Part of rust-lang/rust#147370.
MCP: https://github.com/rust-lang/compiler-team/issues/923

This PR prepares `rust-analyzer` crates with `in-rust-tree` cargo featues where needed, and and updates bootstrap to run the main `rust-analyzer` tests in rust-lang/rust CI, not just the `proc-macro-srv` crate tests.

This supersedes the earlier attempt at https://github.com/rust-lang/rust/pull/136779. I was honestly expecting more failures in this PR, but looking back at the previous attempt, that makes sense because we no longer run `i686-mingw` (32-bit windows-gnu) which had a _bunch_ of these failures. In the earlier attempt I also disabled the `i686-mingw`-related failures for `i686-msvc` since I didn't feel like digging into 32-bit msvc at the time. Try results from this PR shows that it's most likely limited to 32-bit windows-gnu specifically.

### `rust-analyzer` test remarks

- I actually had to _remove_ the `CARGO_WORKSPACE_DIR` `expect-test`-hack in order for `expect-test` to be able to find the test expectation HTML files (for `syntax_highlighting` tests in `ide`). When I added the hack, ironically, it made `expect-test` unable to find the expectation files. I think this was because previously the path was of the `proc-macro-srv` crate specifically, now we point to the root r-a workspace?
- The `cfg`-related differences on `aarch64-apple-darwin` might've been fixed? I can't tell, but we don't seem to be observing the differences now.
- I'm not sure why `config::{generate_config_documentation, generate_package_json_config}` no longer fails. Perhaps they were fixed to no longer try to write to source directory?

### Review remarks

- Commit 1 updates r-a crates that are involved in tests needing artifacts from `rustc_private` compiler crates to use the `in-rust-tree` cargo feature. I briefly tried to use a plain `--cfg=in_rust_tree`, but quickly realized it was very hacky, and needed invasive bootstrap changes. The cargo feature approach seems most "natural"/well-supported to both bootstrap and cargo.
- Commit 2 updates bootstrap to not only run the `proc-macro-srv` tests, but the whole r-a tests.
- Commit 3 restricts r-a main tests to non-32-bit targets we test in CI, since (1) r-a repo does not run tests against 32-bit platforms, and (2) there are some target pointer width sensitive hash differences causing tests to fail. Notably, this means that we also no longer run r-a `proc-macro-srv` tests against 32-bit targets, but we don't expect that crate to be have target pointer width differences. Discussed this in [#t-compiler/rust-analyzer > 32-bit tests?](https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/32-bit.20tests.3F/with/563145736).

---

// try-job: aarch64-gnu
// try-job: aarch64-apple
// try-job: x86_64-mingw-1
// try-job: i686-msvc-1
// try-job: x86_64-msvc-1
// try-job: aarch64-msvc-1
2025-12-13 10:11:41 +00:00
Lukas Wirth
eda27bbce0
Merge pull request #21242 from ChayimFriedman2/fmt-fix
fix: Support the new lowering of `format_args!()`
2025-12-12 17:45:43 +00:00
Lukas Wirth
55026408c5
Merge pull request #21251 from ChayimFriedman2/fix-typebound-kind
fix: Fix a panic in `ast::TypeBound::kind()`
2025-12-12 17:43:59 +00:00
Chayim Refael Friedman
16603f8797
Merge pull request #21256 from A4-Tacks/big-range-add-ret-type
Reorder add_return_type assist
2025-12-12 13:09:16 +00:00
A4-Tacks
5d1e81e157
Reorder add_return_type assist
This assist is often before inline and is very inconvenient

Usually, incomplete expression statements are written at the tail of the block, but they are not the return value of the block

```rust
fn foo() {
    Some(2).$0and(optb)
}
```

```text
1. Add this function's return type
2. Inline `and`
3. Qualify `and` method call
4. Replace and with and_then
```
2025-12-12 20:59:41 +08:00
Shoyu Vanilla (Flint)
9cb9b1b385
Merge pull request #20754 from A4-Tacks/conv-for-while-loop-label-attr
Fix loses label for convert_for_to_while_let
2025-12-12 11:46:18 +00:00
Jana Dönszelmann
ed7cfb5256
EII liveness analysis 2025-12-12 11:32:28 +01:00
tris203
17d03b90b4
fix(lsp): handle dynamic registration for didSave
Update server capabilities to set `save` to `None` when the client supports
dynamic registration for `didSaveTextDocument`. This prevents redundant
static registration and aligns with LSP specification.
2025-12-12 07:41:36 +00:00
Chayim Refael Friedman
459982c158 Fix a panic in ast::TypeBound::kind() 2025-12-12 00:45:37 +02:00
Chayim Refael Friedman
f5a83fb3b5
Merge pull request #21252 from ChayimFriedman2/fix-clippy
internal: Fix Clippy
2025-12-11 22:19:48 +00:00
Chayim Refael Friedman
54a778a371 Fix Clippy
Needed because there is a new Clippy - Rust 1.92.0 was released.
2025-12-12 00:09:31 +02:00
Jieyou Xu
acb575c6ab
rust-analyzer: prep crates for testing against in-tree rustc_private 2025-12-11 20:22:49 +08:00
Shoyu Vanilla (Flint)
a3f0193986
Merge pull request #21239 from A4-Tacks/eager-param-and-paren
Fix assist `and` -> `and_then` parameter
2025-12-11 10:47:12 +00:00
Shoyu Vanilla (Flint)
3e3f994af8
Merge pull request #21243 from ChayimFriedman2/assoc-defaults
feat: Support `#[feature(associated_type_defaults)]`
2025-12-11 10:43:37 +00:00