Skip to content

Releases: rust-lang/rust-analyzer

nightly

10 Apr 01:06
64ddb54

Choose a tag to compare

nightly Pre-release
Pre-release
Merge pull request #22000 from lnicola/sync-from-rust

internal: sync from downstream

2026-04-06

06 Apr 06:10
38fb8f9

Choose a tag to compare

Commit: 38fb8f9
Release: 2026-04-06 (v0.3.2854)

Universal VSIX

This release adds a platform-independent VSIX that VS Code will install on platforms where rust-analyzer doesn't offer binaries.
On supported platforms, the extension should keep working as before, but a Code bug might cause it to fail to activate.
If that happens, you should uninstall and reintall the rust-analyzer extension.

New Features

  • #21928 (first contribution) support macro expansion in #[doc = ...] attributes.
  • #19956 implement #[feature(more_qualified_paths)].
  • #21322 add option to put type hints at the end of the line.
  • #19659 add support for folding ranges in chained expressions.
  • #21516 publish universal VSIX without a built-in server binary, for unsupported platforms.

Fixes

  • #21792 (first contribution) make matching_brace work when cursor the cursor is not on a bracket.
  • #21942 (first contribution) silence type mismatch diagnostic when type is unknown.
  • #21924 (first contribution) update Neovim setup instructions.
  • #21915 fix a cycle in bounds lowering.
  • #21935 support #[cfg] on array elements.
  • #21926 handle empty expressions in parameter inlay hints.
  • #21937 wrap guard in parentheses in replace_if_let_with_match.
  • #21938 fix indent in convert_let_else_to_match.
  • #21954 handle empty else block in convert_let_else_to_match.
  • #21951 report "expected type, found {" in parser.
  • #21695 match trait item order in trait_impl_redundant_assoc_item.
  • #21936 handle comma at the end of argument in extract_variable.
  • #21902 support env! completions in nested macro calls.
  • #21903 handle negation in if postfix completion.
  • #20864 fix naming of self parameter in extract_function.
  • #21919 support labels in convert_to_guarded_return.
  • #21912 support tail expressions in convert_to_guarded_return.
  • #21940 support multiple snippet placeholders in VS Code extension.
  • #21921 unconditionally pass --include-ignored for test runnables.
  • #21922 use the correct project root when there are multiple workspaces.
  • #21844 support file systems that don't send Create events.
  • #21881 fix missing argument error messages for sched_getaffinity and getenv shims.

Internal Improvements

  • #21944 remove RootQueryDb.
  • #21931 move node mutability handling to edit_algo.
  • #21886 replace make constructors with SyntaxFactory in gen_trait_fn_body.
  • #21930 refactor add_missing_impl_members to use more of SyntaxFactory.
  • #21909 allow disabling fixture support.
  • #21933 ensure tracing is configured in slow tests.
  • #21806 document when crate cycles can occur.
  • #21923 set VS Code extension kind explicitly.
  • #21916 bump @vscode/vsce and ovsx.

See also the changelog post.

2026-03-30

30 Mar 04:56
f1297b2

Choose a tag to compare

Commit: f1297b2
Release: 2026-03-30 (v0.3.2845)

Fixes

  • #21588 (first contribution) fix asm! sym operand parsing for parenthesized expr fragments.
  • #21871 revert TyLoweringContext::store after lowering parent defaults.
  • #21876 keep value when trying to produce a default call.
  • #21904 fix panic on trailing | in unmerge_match_arm.
  • #21838 skip usages inside macro expansions in destructure_{struct,tuple}_binding.
    • #21860, #21865 wrap ascribed type in Option<> or Result<> in desugar_try_expr with let - else.
  • #21744 keep comments in add_missing_match_arms.
  • #20681 fix indent after fixing trait_impl_redundant_assoc_item.
  • #21411 offer merge_match_arms on ambiguous identifier patterns.
  • #21709 fix spurious flychecks with multiple workspaces.

Internal Improvements

  • #21874 (first contribution) migrate generate_default_from_new assist to SyntaxEditor.
  • #21879 (first contribution) fix bounds check in debug_assert!.
  • #21823, #21859, #21900 implement signature type inference.
  • #21901, #21907 only allocate non-empty item blocks.
  • #21897 remove Arc from GenericParams and AstIdMap.
  • #21872 rename IndentLevel::single to zero.
  • #21856, #21867, #21866, #21870, #21884 replace make in replace_derive_with_manual_impl, generate_impl, generate_new, generate_trait_impl_text_intransitive and getter with SyntaxFactory.
  • #21853 extract default_fill_expr to utils.
  • #21862 don't trigger GC on slow tests, take 2.

See also the changelog post.

2026-03-23

23 Mar 06:05
b42b63f

Choose a tag to compare

Commit: b42b63f
Release: 2026-03-23 (v0.3.2836)

New Features

  • #21395 change test_name placeholder to executable_arg.

Fixes

  • #21784 remove angle brackets if all lifetime args removed in inline type alias code assist.
  • #21817 fix overlapping edits in convert_named_struct_to_tuple_struct and convert_tuple_struct_to_named_struct.
  • #21333 fix expected type analysis for tuple struct patterns.
  • #21424 support more runnable kinds in rust-project.json.
  • #20407 move out doc comments in generate_trait_from_impl.
  • #21768 keep qualifiers in function parameter completions.
  • #21756 support postfix let completions in closures.
  • #21839 don't add a second semicolon after postfix completions.
  • #21324 improve indentation after postfix completions.
  • #20594 fix indentation in convert_closure_to_fn.
  • #20614 offer no_such_field fix for empty structs.
  • #20762 add fixes for non_exhaustive_let.
  • #20299 name trait after first method in generate_trait_from_impl.
  • #21775 offer inline_local_variable in let-chains.
  • #21473 offer unwrap_block on let-else.
  • #20984 offer add_label_to_loop on for and while expressions.
  • #20600 offer unwrap_tuple on let expressions.
  • #21809 offer extract_variable on some paths.
  • #21822 offer add_missing_match_arms on commas between arms.
  • #21850 offer add_braces on assignments.
  • #20628 support nested lifetimes in add_lifetime_to_type.
  • #20625 support multiple attributes in wrap_unwrap_cfg_attr.
  • #20566 support partial selections in merge_imports.
  • #21787 keep extra predicates in replace_is_method_with_if_let_method.
  • #21828 prime caches in parallel in scip.

Internal Improvements

  • #21843 (first contribution) migrate convert_from_to_tryfrom assist to SyntaxEditor.
  • #21847 migrate qualify_method_call, qualify_path and desugar_try_expr assists to SyntaxEditor.
  • #21832 use mappings in SyntaxFactory constructor methods.
  • #21826 replace ast::make with SyntaxFactory in a few ide-assists methods.
  • #21848 ignore mapping in expr_underscore.
  • #21779 fix printing of IR types.
  • #21827 don't trigger GC on slow tests.
  • #21795 fix test_loading_rust_analyzer when rust-project.json is present.
  • #21796 add codecov.io badge.

See also the changelog post.

2026-03-16

16 Mar 05:35
90c8906

Choose a tag to compare

Commit: 90c8906
Release: 2026-03-16 (v0.3.2828)

Fixes

  • #21793 (first contribution) handle multi-byte UTF-8 identifiers in NameGenerator::suggest_name.
  • #21767 remove crate from EditionedFileId.
  • #21785 allow duplicate associated type shorthand resolution if it points to the same associated type.
  • #21820 infer generic args for TraitRef and its associated types.
  • #21794 validate naming convention for union types.
  • #21771 make file watcher recursive.

Internal Improvements

  • #21818 refactor MirLowerCtx to use &ExpressionStore instead of &Body.
  • #21788 don't re-query source roots per-crate in analysis-stats.
  • #21804 disambiguate error messages when proc-macro-srv changes the working directory.

See also the changelog post.

2026-03-09

09 Mar 05:33
51966da

Choose a tag to compare

Commit: 51966da
Release: 2026-03-09 (v0.3.2819)

New Features

  • #21752 go to From impl when on "Go to definition" for ?.

Fixes

  • #21745 fix a bug in associated type lowering.
  • #21750 don't use TypingMode::PostAnalysis for IDE method resolution.
  • #21747 allow never coercions in struct update syntax.
  • #21726 align is_rust ABI check with rustc.
  • #21705 support expressions in cfg_select!.
  • #21728 use correct range for add_missing_match_arms in macro calls.
  • #21719 improve formatting in replace_if_let_with_match.
  • #21687 offer destructure_struct_binding on self parameters.
  • #21671 complete postfix let on references in match arms.
  • #21770 update VFS when a watched file is deleted.
  • #21763 tweak -Zlockfile-path pre-release check for beta.

Internal Improvements

  • #21782 (first contribution) add rust-analyzer parse --json.
  • #21755 (first contribution) add has_pending methods to Incoming/Outgoing/ReqQueue in lsp_server.
  • #21764 improve smol_str API surface in anticipation for 1.0.0.
  • #21774 migrate unqualify_method_call assist to SyntaxEditor.
  • #21734 replace ast::make in already migrated assists.
  • #21660 set up codecov.
  • #21732 define rules for LLMs.

See also the changelog post.

2026-03-02

02 Mar 06:23
566fe41

Choose a tag to compare

Commit: 566fe41
Release: 2026-03-02 (v0.3.2811)

Fixes

  • #21699 enable diagnostic for adding auto traits by casting *dyn Tr.
  • #21654 mark the RHS of compound assignments as ExprIsRead::Yes.
  • #21725 fix wrong condition in Visibility::min.
  • #21669 support Span::parent in proc macro expansion.
  • #21716 use -Zlockfile-path on pre-release 1.95 toolchains as well.
  • #21708 don't panic on invalid LSP notifications.
  • #21706 don't duplicate enum variants in pattern completion.
  • #21698 fix scrutinee indent in replace_if_let_with_match.

Internal Improvements

  • #21710, #21720 (first contribution) migrate fix_visibility and generate_derive assists to SyntaxEditor.
  • #21681 skip rustfmt test if nightly toolchain is missing.

See also the changelog post.

2026-02-23

23 Feb 05:43
0c746f6

Choose a tag to compare

Commit: 0c746f6
Release: 2026-02-23 (v0.3.2803)

Fixes

  • #21635 (first contribution) improve #[cfg] handling when inserting or merging imports.
  • #21665 (first contribution) don't qualify parameter names in add_missing_impl_members.
  • #21675 (first contribution) exclude references in macro calls inside tests when excludeTests is enabled.
  • #21664 handle cycles in sizedness_constraint_for_ty.
  • #21652, #21692 fix predicates of built-in derive traits with two parameters defaulting to Self.
  • #21655 complete derive helpers on empty namerefs.
  • #21594 complete postfix let and letm in match arms.
  • #21600 complete postfix let on block tail expression.
  • #21650 don't complete suggested parameters in complex patterns.
  • #21536 offer toggle_macro_delimiter in nested macro calls.
  • #21623 offer replace_is_method_with_if_let_method on is_some_and.
  • #21684 pick the enclosing instead of first impl block in generate_function.
  • #21688 correctly parenthesize inverted condition in convert_bool_then.
  • #20353 support selecting only a subset of fields in generate_getter_or_setter.
  • #21389 handle references better in convert_to_guarded_return, replace_if_let_with_match and replace_let_with_if_let.
  • #21657 support Span::span_source in proc macro expansion.

Internal Improvements

  • #21631 refactor handling of associated type shorthands.
  • #21630 use CARGO_RESOLVER_LOCKFILE_PATH for lockfile copies on 1.95 and later.
  • #21643 replace edit_in_place::Indent in generate_impl.
  • #21661, #21666 add integration tests for flycheck.

See also the changelog post.

2026-02-16

16 Feb 07:18
00a9173

Choose a tag to compare

Commit: 00a9173
Release: 2026-02-16 (v0.3.2795)

New Features

  • #21574 filter auto-import candidates to make sure the resulting path resolves.
  • #21591 split long parameter lists into multiple lines for hover.

Fixes

  • #21647 (first contribution) handle ref mut bindings in contains_explicit_ref_binding.
  • #21649 treat dereferencing *mut ! right-hand side values in assignments as reads.
  • #21611 update allow_normalization to match rustc.
  • #21627 revert "implement fine-grained request cancellation support".
  • #21644 revert "fix stale diagnostics with rust-project.json and rustc JSON".
  • #21632 treat extern fn parameters as identifiers, not patterns.
  • #21633 don't resolve proc macros in value as functions outside their defining crate.
  • #21608 use the right index for the close span in set_top_subtree_delimiter_span.
  • #21402 don't insert semicolon after function call in array literal.
  • #21583 keep associated type bounds in replace_derive_with_manual_impl.
  • #21381 fix Self handling in inline_call.

Internal Improvements

  • #21609 use rayon for proc macro loading.
  • #21606, #21507, #21618, #21619 migrate generate_getter_or_setter, introduce_named_lifetime, destructure_tuple_binding and convert_tuple_return_type assists to SyntaxEditor.
  • #21636 replace edit_in_place::Indent in migrated assists.
  • #21584 add expression, pattern and binding types iterators to DefWithBody.
  • #21581 run clippy as a separate CI step.
  • #21628 temporarily pin miri job toolchain.

See also the changelog post.

2026-02-09

09 Feb 07:17
c75729d

Choose a tag to compare

Commit: c75729d
Release: 2026-02-09 (v0.3.2786)

New Features

  • #21380 implement fine-grained request cancellation support.
  • #21572 add support for new try { ... } and try bikeshed Ty { ...} blocks.

Fixes

  • #21561 fix a glob issue affecting windows::core::HRESULT.
  • #21579 fix a panic on lowering cycles.
  • #21573 infer the expected len in include_bytes!() to avoid type mismatches.
  • #21569 parenthesise more cases like &(impl Trait1 + Trait2).
  • #21578 use display_source_code() in ReferenceConversion to avoid trying to parse {unknown}.
  • #21526, #21557 complete postfix not and let in conditions.
  • #21508 emit else branch in move_guard.
  • #21571 fix stale diagnostics with rust-project.json and rustc JSON.
  • #21580 truncate display version of commands consistently.

Internal Improvements

  • #21488 remove Edition::CURRENT_FIXME.
  • #21599 simplify binding hash computation in syntax highlighting.

See also the changelog post.