Skip to content

Comments

rust-analyzer subtree update#153007

Merged
rust-bors[bot] merged 79 commits intorust-lang:mainfrom
lnicola:sync-from-ra
Feb 24, 2026
Merged

rust-analyzer subtree update#153007
rust-bors[bot] merged 79 commits intorust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Feb 23, 2026

Subtree update of rust-analyzer to rust-lang/rust-analyzer@05da4cf.

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

r? @ghost

dependabot bot and others added 30 commits January 21, 2026 23:46
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Example
---
```rust
prt!{abc!$0(3 + 5)};
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
prt!{abc!{3 + 5}};
```
Remove `#[serde(default)]` from optional fields. Fields of type `Option`
are automatically deserialized to `None` when the corresponding keys are
missing in `rust-project.json`, making the explicit attribute redundant.
Mark `cfg`, `env`, and `is_proc_macro` fields optional to match the
corresponding data structure, `project_json::CrateData`.
Example
---
```rust
fn main() {
    match 2 {
        bar => bar.$0
    }
}
```
->
```rust
fn main() {
    match 2 {
        bar => {
            let $1 = bar;
            $0
        }
    }
}
```
Example
---
```rust
fn main() {
    &baz.l$0
}
```

**Before this PR**

```text
sn if       if expr {}
sn match match expr {}
```

**After this PR**

```text
sn if       if expr {}
sn let             let
sn letm        let mut
sn match match expr {}
```
….e. `T::AssocType` without specifying the trait

I believe the new code is both cleaner and more robust, and should fix some edge cases.

rustc does all of this very differently with plenty of queries for various forms of predicate lowering; but we have tight memory constraints so we prefer a different approach.
Example
---
```rust
fn foo(bar: u32) {}
fn bar((a, bar$0)) {}
```

**Before this PR**

```rust
fn foo(bar: u32) {}
fn bar(bar: u32)) {}
```

**After this PR**

Not complete `bar: u32`
…g to `Self`

I.e. `PartialEq` and `PartialOrd`.
Example
---
```rust
//- /mac.rs crate:mac

pub fn my_derive() {}

//- /lib.rs crate:lib deps:mac
pub struct Foo(#[$0] i32);
```

**Before this PR**

```text
...
at must_use
at no_mangle
...
```

**After this PR**

```text
...
at must_use
at my_cool_helper_attribute derive helper of `MyDerive`
at no_mangle
...
```
…ing-cycles

internal: Refactor handling of associated type shorthand for type parameters, i.e. `T::AssocType` without specifying the trait
Without `unsafe` on this block, this feature didn't compile.
fix: Ensure cpu_profiler feature compiles on Rust edition 2024
…erive

fix: Fix predicates of builtin derive traits with two parameters defaulting to `Self`
fix: complete derive helpers on empty nameref
…-pat

fix: no complete suggest param in complex pattern
fix: complete `.let` on block tail prefix expression
…-call

internal: remove redundant double call in postfix
A4-Tacks and others added 13 commits February 20, 2026 18:19
…enerate-method-wrong-impl-block

fix: generate method assist uses enclosing impl block instead of first found
…then

The convert_if_to_bool_then assist was producing incorrect code when
the Some branch was in the else arm and the condition was a method call
expression (e.g. is_empty()).

Before:
    if test.is_empty() { None } else { Some(()) }
was incorrectly rewritten to:
    test.is_empty().then(|| ())

After (correct):
    (!test.is_empty()).then(|| ())

Root cause: the parenthesization check ran on the original condition
before inversion. When invert_boolean_expression produced a PrefixExpr
(e.g. !test.is_empty()), it was not being parenthesized because the
check had already passed on the original MethodCallExpr.

Fix: move the parenthesization check to after the inversion step so it
correctly detects PrefixExpr and wraps it in parentheses.

A regression test has been added to cover this case.
…onvert-if-to-bool-then-negation

fix: correctly parenthesize inverted condition in convert_if_to_bool_…
…e-param

fix: Fix another case where we forgot to put the type param for `PartialOrd` and `PartialEq` in builtin derives
This updates the rust-version file to c78a294.
@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2026

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Feb 23, 2026
@lnicola
Copy link
Member Author

lnicola commented Feb 23, 2026

@bors r+ p=1

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 23, 2026

📌 Commit d8ffd91 has been approved by lnicola

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 23, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 23, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@05da4cf.

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

r? @ghost
rust-bors bot pushed a commit that referenced this pull request Feb 23, 2026
Rollup of 6 pull requests

Successful merges:

 - #153007 (`rust-analyzer` subtree update)
 - #152768 (Enable autodiff in ci for all major os)
 - #152003 (Reflection TypeId::trait_info_of)
 - #152988 (Port `#[register_tool]` to the new attribute system)
 - #152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - #152991 (fix interpreter tracing output)
rust-bors bot pushed a commit that referenced this pull request Feb 23, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #153007 (`rust-analyzer` subtree update)
 - #152670 (Simplify ThinLTO handling)
 - #152768 (Enable autodiff in ci for all major os)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152999 (Check importing `crate`/`$crate`/`super` after handling `self`)
 - #152003 (Reflection TypeId::trait_info_of)
 - #152976 (Revert relative paths for std links in rustc-docs)
 - #152985 (Port `#[feature]` to the new attribute system)
 - #152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - #152991 (fix interpreter tracing output)
 - #153004 (Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`)
 - #153008 (bootstrap.compiler.toml: update name of primary branch)
 - #153016 (Migration of `LintDiagnostic` - part 2)
 - #153020 (rustdoc: Improve sentence for documented empty impl blocks)

Failed merges:

 - #152988 (Port `#[register_tool]` to the new attribute system)
rust-bors bot pushed a commit that referenced this pull request Feb 24, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #153007 (`rust-analyzer` subtree update)
 - #152670 (Simplify ThinLTO handling)
 - #152768 (Enable autodiff in ci for all major os)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #152999 (Check importing `crate`/`$crate`/`super` after handling `self`)
 - #152003 (Reflection TypeId::trait_info_of)
 - #152976 (Revert relative paths for std links in rustc-docs)
 - #152985 (Port `#[feature]` to the new attribute system)
 - #152989 (Port `#[rustc_inherit_overflow_checks]` to the new attribute parsers)
 - #152991 (fix interpreter tracing output)
 - #153004 (Superficial tweaks to the query modifier docs in `rustc_middle::query::modifiers`)
 - #153008 (bootstrap.compiler.toml: update name of primary branch)
 - #153016 (Migration of `LintDiagnostic` - part 2)
 - #153020 (rustdoc: Improve sentence for documented empty impl blocks)

Failed merges:

 - #152988 (Port `#[register_tool]` to the new attribute system)
@rust-bors rust-bors bot merged commit e208d67 into rust-lang:main Feb 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 24, 2026
rust-timer added a commit that referenced this pull request Feb 24, 2026
Rollup merge of #153007 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@05da4cf.

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

r? @ghost
@lnicola lnicola deleted the sync-from-ra branch February 24, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.