Skip to content

rust-analyzer subtree update#155046

Merged
rust-bors[bot] merged 209 commits intorust-lang:mainfrom
lnicola:sync-from-ra
Apr 10, 2026
Merged

rust-analyzer subtree update#155046
rust-bors[bot] merged 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();
}
```
Veykril and others added 9 commits April 9, 2026 08:39
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
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 10, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 10, 2026

☀️ Test successful - CI
Approved by: lnicola
Duration: 3h 15m 10s
Pushing 7659cec to main...

@rust-bors rust-bors bot merged commit 7659cec into rust-lang:main Apr 10, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing dd82fd2 (parent) -> 7659cec (this PR)

Test differences

Show 120 test diffs

Stage 0

  • attrs::docs::tests::docs: [missing] -> pass (J0)
  • attrs::tests::docs: pass -> [missing] (J0)
  • completions::env_vars::tests::complete_in_expanded_env_macro: [missing] -> pass (J0)
  • completions::postfix::tests::postfix_completion_for_nots: [missing] -> pass (J0)
  • env::cargo_config_env_respects_process_env: [missing] -> pass (J0)
  • expr_store::tests::body::array_element_cfg: [missing] -> pass (J0)
  • flycheck::test_flycheck_diagnostics_with_override_command_cleared_after_fix: [missing] -> pass (J0)
  • folding_ranges::tests::test_fold_let_stmt_with_chained_methods: [missing] -> pass (J0)
  • folding_ranges::tests::test_fold_let_stmt_with_chained_methods_without_collapsed_text: [missing] -> pass (J0)
  • folding_ranges::tests::test_fold_tail_expr: [missing] -> pass (J0)
  • handlers::add_missing_match_arms::tests::label_multiple_missing_arms: [missing] -> pass (J0)
  • handlers::add_missing_match_arms::tests::label_single_missing_arm: [missing] -> pass (J0)
  • handlers::auto_import::tests::consider_definition_kind: [missing] -> pass (J0)
  • handlers::convert_let_else_to_match::tests::convert_let_else_to_match_with_empty_else_block: [missing] -> pass (J0)
  • handlers::convert_let_else_to_match::tests::convert_let_else_to_match_with_some_indent: [missing] -> pass (J0)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_else_block: [missing] -> pass (J0)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_else_block_in_statement: pass -> [missing] (J0)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_never_type_else_block_in_statement: [missing] -> pass (J0)
  • handlers::convert_to_guarded_return::tests::ignore_else_branch: pass -> [missing] (J0)
  • handlers::convert_to_guarded_return::tests::ignore_else_branch_has_non_never_types_in_statement: [missing] -> pass (J0)
  • handlers::extract_function::tests::method_in_trait: [missing] -> pass (J0)
  • handlers::extract_variable::tests::extract_var_in_arglist_with_comma: [missing] -> pass (J0)
  • handlers::inactive_code::tests::inactive_crate: [missing] -> pass (J0)
  • handlers::missing_fields::tests::coerce_existing_local: [missing] -> pass (J0)
  • handlers::type_mismatch::tests::test_ignore_unknown_mismatch: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_concat_macro: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_field_with_macro: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_include_str_macro: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_macro_argument_expr_issue_7688: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_macro_generated_method_stringify_self_ty: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_macro_on_outlined_mod: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_mixed_literal_and_macro: [missing] -> pass (J0)
  • hover::tests::test_hover_doc_attr_user_macro_returning_string: [missing] -> pass (J0)
  • inlay_hints::bind_pat::tests::type_hints_end_of_line_placement: [missing] -> pass (J0)
  • inlay_hints::bind_pat::tests::type_hints_end_of_line_placement_chain_expr: [missing] -> pass (J0)
  • inlay_hints::chaining::tests::chaining_hints_end_of_line_placement: [missing] -> pass (J0)
  • inlay_hints::param_name::tests::param_name_hints_show_after_empty_arg: [missing] -> pass (J0)
  • ratoml::ratoml_virtual_workspace: [missing] -> pass (J0)
  • render::tests::enum_variant_name_exact_match_is_high_priority: [missing] -> pass (J0)
  • tests::item::fn_item_where_kw: [missing] -> pass (J0)
  • tests::regression::regression_21899: [missing] -> pass (J0)
  • tests::runner::err::function_ret_type_missing_arrow: [missing] -> pass (J0)
  • tests::traits::more_qualified_paths: [missing] -> pass (J0)
  • tests::type_pos::fn_return_type_missing_thin_arrow: [missing] -> pass (J0)
  • tests::type_pos::fn_return_type_missing_thin_arrow_infer_ref_type: [missing] -> pass (J0)
  • tests::type_pos::fn_return_type_missing_thin_arrow_path_completion_with_generic_args: [missing] -> pass (J0)
  • typing::on_enter::tests::does_not_indent_block_with_too_much_content: pass -> [missing] (J0)
  • typing::on_enter::tests::does_not_indent_empty_block: pass -> [missing] (J0)
  • typing::on_enter::tests::indents_item_lists: [missing] -> pass (J0)
  • typing::on_enter::tests::trims_spaces_around_brace_contents: [missing] -> pass (J0)

Stage 1

  • attrs::docs::tests::docs: [missing] -> pass (J1)
  • attrs::tests::docs: pass -> [missing] (J1)
  • completions::env_vars::tests::complete_in_expanded_env_macro: [missing] -> pass (J1)
  • completions::postfix::tests::postfix_completion_for_nots: [missing] -> pass (J1)
  • env::cargo_config_env_respects_process_env: [missing] -> pass (J1)
  • flycheck::test_flycheck_diagnostics_with_override_command_cleared_after_fix: [missing] -> pass (J1)
  • folding_ranges::tests::test_fold_let_stmt_with_chained_methods_without_collapsed_text: [missing] -> pass (J1)
  • folding_ranges::tests::test_fold_tail_expr: [missing] -> pass (J1)
  • handlers::add_missing_match_arms::tests::label_catch_all_only: [missing] -> pass (J1)
  • handlers::add_missing_match_arms::tests::label_multiple_missing_arms: [missing] -> pass (J1)
  • handlers::add_missing_match_arms::tests::label_single_missing_arm: [missing] -> pass (J1)
  • handlers::auto_import::tests::consider_definition_kind: [missing] -> pass (J1)
  • handlers::convert_let_else_to_match::tests::convert_let_else_to_match_with_empty_else_block: [missing] -> pass (J1)
  • handlers::convert_let_else_to_match::tests::convert_let_else_to_match_with_some_indent: [missing] -> pass (J1)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_else_block: [missing] -> pass (J1)
  • handlers::convert_to_guarded_return::tests::convert_if_let_has_else_block_in_statement: pass -> [missing] (J1)
  • handlers::convert_to_guarded_return::tests::convert_let_inside_for_with_else: [missing] -> pass (J1)
  • handlers::convert_to_guarded_return::tests::convert_let_inside_labeled_block: [missing] -> pass (J1)
  • handlers::convert_to_guarded_return::tests::ignore_else_branch: pass -> [missing] (J1)
  • handlers::convert_to_guarded_return::tests::ignore_else_branch_has_non_never_types_in_statement: [missing] -> pass (J1)
  • handlers::extract_function::tests::method_in_trait: [missing] -> pass (J1)
  • handlers::extract_variable::tests::extract_var_in_arglist_with_comma: [missing] -> pass (J1)
  • handlers::inactive_code::tests::inactive_crate: [missing] -> pass (J1)
  • handlers::missing_fields::tests::coerce_existing_local: [missing] -> pass (J1)
  • handlers::missing_fields::tests::inaccessible_fields: [missing] -> pass (J1)
  • handlers::trait_impl_redundant_assoc_item::tests::quickfix_order: [missing] -> pass (J1)
  • handlers::type_mismatch::tests::test_ignore_unknown_mismatch: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_concat_macro: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_field_with_macro: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_include_str_macro: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_macro_generated_method_stringify_self_ty: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_macro_on_outlined_mod: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_mixed_literal_and_macro: [missing] -> pass (J1)
  • hover::tests::test_hover_doc_attr_user_macro_returning_string: [missing] -> pass (J1)
  • inlay_hints::bind_pat::tests::type_hints_end_of_line_placement: [missing] -> pass (J1)
  • inlay_hints::bind_pat::tests::type_hints_end_of_line_placement_chain_expr: [missing] -> pass (J1)
  • inlay_hints::param_name::tests::param_name_hints_show_after_empty_arg: [missing] -> pass (J1)
  • ratoml::ratoml_virtual_workspace: [missing] -> pass (J1)
  • tests::item::fn_item_where_kw: [missing] -> pass (J1)
  • tests::regression::regression_21899: [missing] -> pass (J1)
  • tests::traits::more_qualified_paths: [missing] -> pass (J1)
  • tests::type_pos::fn_return_type_missing_thin_arrow: [missing] -> pass (J1)
  • tests::type_pos::fn_return_type_missing_thin_arrow_infer_ref_type: [missing] -> pass (J1)
  • tests::type_pos::fn_return_type_missing_thin_arrow_path_completion: [missing] -> pass (J1)
  • tests::type_pos::fn_return_type_missing_thin_arrow_path_completion_with_generic_args: [missing] -> pass (J1)
  • typing::on_enter::tests::does_not_indent_block_with_too_much_content: pass -> [missing] (J1)
  • typing::on_enter::tests::does_not_indent_empty_block: pass -> [missing] (J1)
  • typing::on_enter::tests::indents_block_with_multiple_statements: [missing] -> pass (J1)
  • typing::on_enter::tests::indents_empty_brace_pairs: [missing] -> pass (J1)
  • typing::on_enter::tests::trims_spaces_around_brace_contents: [missing] -> pass (J1)

(and 16 additional test diffs)

Additionally, 4 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 7659cec4ed1457bc0d1f636127e66e8fe5008928 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 2h 21m -> 1h 36m (-31.8%)
  2. dist-x86_64-mingw: 2h 2m -> 2h 34m (+26.7%)
  3. x86_64-msvc-ext2: 1h 53m -> 1h 25m (-24.5%)
  4. dist-apple-various: 1h 30m -> 1h 45m (+17.6%)
  5. x86_64-mingw-1: 2h 40m -> 3h 2m (+14.0%)
  6. aarch64-apple: 2h 43m -> 3h 5m (+13.1%)
  7. dist-aarch64-llvm-mingw: 1h 39m -> 1h 50m (+11.1%)
  8. dist-x86_64-apple: 2h -> 1h 49m (-9.2%)
  9. x86_64-msvc-1: 2h 40m -> 2h 27m (-7.8%)
  10. x86_64-mingw-2: 2h 39m -> 2h 27m (-7.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (7659cec): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (secondary 7.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
7.4% [7.4%, 7.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 488.849s -> 492.281s (0.70%)
Artifact size: 395.54 MiB -> 395.57 MiB (0.01%)

@lnicola lnicola deleted the sync-from-ra branch April 10, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. 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.