Skip to content

rust-analyzer subtree update#155046

Open
lnicola wants to merge 209 commits intorust-lang:mainfrom
lnicola:sync-from-ra
Open

rust-analyzer subtree update#155046
lnicola wants to merge 209 commits intorust-lang:mainfrom
lnicola:sync-from-ra

Conversation

@lnicola
Copy link
Copy Markdown
Member

@lnicola lnicola commented Apr 9, 2026

Subtree update of rust-analyzer to rust-lang/rust-analyzer@64ddb54.

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

r? @ghost

asukaminato0721 and others added 30 commits December 23, 2025 01:25
fix test

clippy
Example
---
```rust
trait Foo {
    fn f(&self) -> i32;

    fn foo(&self) -> i32 {
        $0self.f()+self.f()$0
    }
}
```

**Before this PR**

```rust
trait Foo {
    fn f(&self) -> i32;

    fn foo(&self) -> i32 {
        fun_name(self)
    }
}

fn $0fun_name(&self) -> i32 {
    self.f()+self.f()
}
```

**After this PR**

```rust
trait Foo {
    fn f(&self) -> i32;

    fn foo(&self) -> i32 {
        fun_name(self)
    }
}

fn $0fun_name(this: &impl Foo) -> i32 {
    this.f()+this.f()
}
```
We can't use the flycheck scope, because that value varies depending
on how the flycheck was triggered. See also
rust-lang/rust-analyzer#21571, which was reverted due to issues with
scope.

Instead, treat empty diagnostics as a flycheck for the entire
workspace, add comments explaining the JSON diagnostic format, and add
an integration test.
Example
---
```rust
trait Marker {
    fn foo();
    fn baz();
}
impl Marker for Foo {
    fn foo() {}
    fn missing() {}$0
    fn baz() {}
}
```

**Before this PR**

```rust
trait Marker {
    fn missing();
    fn foo();
    fn baz();
}
impl Marker for Foo {
    fn foo() {}
    fn missing() {}
    fn baz() {}
}
```

**After this PR**

```rust
trait Marker {
    fn foo();
    fn missing();
    fn baz();
}
impl Marker for Foo {
    fn foo() {}
    fn missing() {}
    fn baz() {}
}
```
Example
---
```rust
struct Other;
struct String;
enum Foo {
    String($0)
}
```

**Before this PR**

```text
en Foo Foo []
st Other Other []
sp Self Foo []
st String String []
```

**After this PR**

```text
st String String [name]
en Foo Foo []
st Other Other []
sp Self Foo []
```
Example
---
```rust
fn main() {
    println!("{}", env!("CA$0"));
}
```

**Before this PR**

Cannot complete any env

**After this PR**

```rust
fn main() {
    println!("{}", env!("CARGO_BIN_NAME"));
}
```
Example
---
Like `is_foo`, `.not`, `.if`

```rust
fn main() {
    let is_foo = true;
    !is_foo.$0
}
```

**Before this PR**

```rust
fn main() {
    let is_foo = true;
    !if is_foo {
        $0
    }
}
```

**After this PR**

```rust
fn main() {
    let is_foo = true;
    if !is_foo {
        $0
    }
}
```
Why? Because sometimes we work on resolving some bug that causes hang/consistent panics/stack overflows/etc., and we put it in a fixture for a test. Then r-a does exactly the same to us, and it's really hard to work this way.
This updates the rust-version file to 80ad557.
…hims

These branches reused the libc::write error string when arguments were absent.

Assisted by an AI coding tool (see CONTRIBUTING.md).

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
…ng-args-messages

fix: Correct missing-args messages for sched_getaffinity and getenv shims
For assist 'convert_to_guarded_return'

Example
---
```rust
fn main() -> i32 {
    if$0 true {
        foo();
    } else {
        bar()
    }
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() -> i32 {
    if false {
        return bar();
    }
    foo();
}
```
ChayimFriedman2 and others added 18 commits April 9, 2026 00:33
…override

Fix [env] in .cargo/config.toml overriding process environment variables
…generate-trait-from-impl

Remove make with SyntaxFactory in generate_trait_from_impl
…de-placeholders

feat: enhance runnable command placeholders
minor: Fix self kw is snippet in type location
internal: Fix lsp_ext field name for RecursiveMemoryLayoutNode
…aph-unwrap

unwrap unnecessary result return type in view_crate_graph
…rms-message-2RJMd

fix: Improve label on add_missing_match_arms assist
changes to build scripts and config.toml should always refresh
…oerce

fix: Check coercion, not unification, in "Fill struct fields", as the criteria to use an existing local as the field's value
fix: Consider the context of the path for `ImportAssets`
fix: Disable the fix for missing-fields when the fields are private
…-extract-struct-from-enum-variant

Migrate extract struct from enum variant to new SyntaxEditor and Port whitespace heuristics to SyntaxEditor
This updates the rust-version file to 4c42051.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 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 Apr 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@lnicola
Copy link
Copy Markdown
Member Author

lnicola commented Apr 9, 2026

@bors r+ p=1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 9, 2026

📌 Commit a186638 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 Apr 9, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@64ddb54.

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

r? @ghost
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@64ddb54.

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

r? @ghost
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.