Skip to content

Releases: rust-lang/rust-analyzer

2026-04-20

20 Apr 04:36
adef948

Choose a tag to compare

Commit: adef948
Release: 2026-04-20 (v0.3.2870)

New Features

  • #21906 exclude dependency and standard library results from reference search.
  • #21740 support #[rust_analyzer::prefer_underscore_import] to import traits as _.

Fixes

  • #22031 (first contribution) demote impl completions when an inherent impl block already exists.
  • #22083 (first contribution) respect #[deprecated] when deciding if a ModuleDef completion is deprecated.
  • #22046 (first contribution) add parser support for unstable type const items.
  • #22022 add parser support for impl and mut restrictions.
  • #22096 use ProofTreeVisitor for unsized coercion.
  • #22025 don't add extra dereference after indexing in extract_function.
  • #22044 don't complete unstable items that are gated by an internal feature.
  • #22003 complete variants of hidden enums through public aliases.
  • #21999 fix ref-completion with keyword prefix.
  • #22018 enable completions inside strings in VS Code.
  • #22032 allow ambiguity in associated type shorthands if they resolve to the same associated type from a supertrait.
  • #22087 fix incorrect lifetime hints with self: Self parameter.
  • #22066 recognize #[std::prelude::vX::test].
  • #21487 offer extract_variable in macro calls.
  • #22067 add parentheses on record literals in replace_let_with_if_let.
  • #22030 fix MIR evaluation of sized &T with recursive const functions.
  • #22073 fix panic on empty comments in convert_comment_block.
  • #22077 fix a panic in replace_if_let_with_match.
  • #22055 fixes some upvars_mentioned issues.
  • #22070 handle name conflicts in extract_type_alias a little better.

Internal Improvements

  • #21835 add hir::Type::{as_raw_ptr,is_mutable_raw_ptr}.
  • #22092 synchronize function call argument check fudging with rustc.
  • #22048 bump rustc crates.
  • #22061 bump salsa.
  • #22050 represent lower coroutines to closures.
  • #22049, #22069 store a SyntaxFactory inside SyntaxEditor.
  • #22043, #22095, #22042, #22039 replace ast::make with SyntaxFactory in raw_string, convert_range_for_to_while, expand_glob_import and generate_blanket_trait_impl.
  • #22091, #22036 migrate generate_impl_text and IdentPat::set_pat to SyntaxEditor.
  • #22081 migrate convert_iter_for_each_to_for assist to SyntaxEditor.
  • #22037 remove set_visibility.
  • #22041 remove GenericParamsOwnerEdit.
  • #22057 remove clone_for_update from move_const_to_impl.
  • #22063 remove LineIndexDatabase.
  • #22065 fix new Clippy lints.
  • #22084 slim down MiniCore Debug output.
  • #22074 support RUSTFMT_TOOLCHAIN for xtask codegen.
  • #22029, #22028 run rustdoc GitHub action on PRs.

See also the changelog post.

nightly

20 Apr 01:10
adef948

Choose a tag to compare

nightly Pre-release
Pre-release
Merge pull request #22099 from BenjaminBrienen/fix-header

fix lsp-extensions section header

2026-04-13

13 Apr 06:35
7b6e124

Choose a tag to compare

Commit: 7b6e124
Release: 2026-04-13 (v0.3.2862)

New Features

  • #21978 (first contribution) enhance runnable command placeholders.
  • #21964 (first contribution) allow passing extra arguments to cargo metadata.
  • #21012, #21982 complete -> in function return position.

Fixes

  • #21995 (first contribution) don't let Cargo [env] variables override the process ones.
  • #21970, #21968 (first contribution) load Markdown files into the VFS and watch for changes.
  • #21704 (first contribution) load rust-analyzer.toml in virtual workspaces.
  • #21965 improve handling of +#[cfg_attr]+ and +#[cfg]+.
  • #21973 take path context into account in ImportAssets.
  • #21962 fix SyntaxEditor upmapping of nodes with mapped ancestors that aren't mapped themselves.
  • #21981 emit diagnostic for #![cfg]ed out crates.
  • #21977 disable the fix for missing-fields when the fields are private.
  • #22009, #22012 fix spurious import completions in qualified paths with type anchors.
  • #21955 add semicolon for postfix print!-like completions.
  • #21971 check coercion, not unification, in "Fill struct fields".
  • #21953 improve type mismatch "Add Some" fix on block-like expressions.
  • #21952 improve type mismatch fixes inside macro calls.
  • #21920 improve add_missing_match_arms labels.
  • #21957 improve onEnter.
  • #22010 fix rustfmt with relative custom command.
  • #21738 fix stale diagnostics with custom check command.
  • #21969 refrsh workspace when adding a Cargo config.

Internal Improvements

  • #21988, #22011, #21998 add workflow to update generated lints.
  • #21996 migrate extract_struct_from_enum_variant assist to SyntaxEditor.
  • #21993 replace make::trait_ with SyntaxFactory in generate_trait_from_impl.
  • #21997 replace make constructors with SyntaxFactory in generate_single_field_struct_from.
  • #21975 handle token mutability in SyntaxEditor.
  • #21960 move SyntaxEditor precondition handling to its constructor.
  • #21972 remove some redundant clone_subtrees.
  • #21967 derive Clone, Copy, Hash for vfs::ChangeKind.
  • #21963 bump ESLint and TypeScript.
  • #21986 fix RecursiveMemoryLayoutNode field names in the Code extension.
  • #21985 use official npm registry for the Code extension dependencies.

See also the changelog post.

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.