Releases: rust-lang/rust-analyzer
nightly
Merge pull request #22000 from lnicola/sync-from-rust internal: sync from downstream
2026-04-06
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.#19956implement#[feature(more_qualified_paths)].#21322add option to put type hints at the end of the line.#19659add support for folding ranges in chained expressions.#21516publish universal VSIX without a built-in server binary, for unsupported platforms.
Fixes
#21792(first contribution) makematching_bracework 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.#21915fix a cycle in bounds lowering.#21935support#[cfg]on array elements.#21926handle empty expressions in parameter inlay hints.#21937wrap guard in parentheses inreplace_if_let_with_match.#21938fix indent inconvert_let_else_to_match.#21954handle emptyelseblock inconvert_let_else_to_match.#21951report "expected type, found{" in parser.#21695match trait item order intrait_impl_redundant_assoc_item.#21936handle comma at the end of argument inextract_variable.#21902supportenv!completions in nested macro calls.#21903handle negation inifpostfix completion.#20864fix naming ofselfparameter inextract_function.#21919support labels inconvert_to_guarded_return.#21912support tail expressions inconvert_to_guarded_return.#21940support multiple snippet placeholders in VS Code extension.#21921unconditionally pass--include-ignoredfor test runnables.#21922use the correct project root when there are multiple workspaces.#21844support file systems that don't sendCreateevents.#21881fix missing argument error messages forsched_getaffinityandgetenvshims.
Internal Improvements
#21944removeRootQueryDb.#21931move node mutability handling toedit_algo.#21886replacemakeconstructors withSyntaxFactoryingen_trait_fn_body.#21930refactoradd_missing_impl_membersto use more ofSyntaxFactory.#21909allow disabling fixture support.#21933ensure tracing is configured in slow tests.#21806document when crate cycles can occur.#21923set VS Code extension kind explicitly.#21916bump@vscode/vsceandovsx.
See also the changelog post.
2026-03-30
Commit: f1297b2
Release: 2026-03-30 (v0.3.2845)
Fixes
#21588(first contribution) fixasm!symoperand parsing for parenthesizedexprfragments.#21871revertTyLoweringContext::storeafter lowering parent defaults.#21876keep value when trying to produce adefaultcall.#21904fix panic on trailing|inunmerge_match_arm.#21838skip usages inside macro expansions indestructure_{struct,tuple}_binding.#21744keep comments inadd_missing_match_arms.#20681fix indent after fixingtrait_impl_redundant_assoc_item.#21411offermerge_match_armson ambiguous identifier patterns.#21709fix spurious flychecks with multiple workspaces.
Internal Improvements
#21874(first contribution) migrategenerate_default_from_newassist toSyntaxEditor.#21879(first contribution) fix bounds check indebug_assert!.#21823,#21859,#21900implement signature type inference.#21901,#21907only allocate non-empty item blocks.#21897removeArcfromGenericParamsandAstIdMap.#21872renameIndentLevel::singletozero.#21856,#21867,#21866,#21870,#21884replacemakeinreplace_derive_with_manual_impl,generate_impl,generate_new,generate_trait_impl_text_intransitiveandgetterwithSyntaxFactory.#21853extractdefault_fill_exprtoutils.#21862don't trigger GC on slow tests, take 2.
See also the changelog post.
2026-03-23
Commit: b42b63f
Release: 2026-03-23 (v0.3.2836)
New Features
#21395changetest_nameplaceholder toexecutable_arg.
Fixes
#21784remove angle brackets if all lifetime args removed in inline type alias code assist.#21817fix overlapping edits inconvert_named_struct_to_tuple_structandconvert_tuple_struct_to_named_struct.#21333fix expected type analysis for tuple struct patterns.#21424support more runnable kinds inrust-project.json.#20407move out doc comments ingenerate_trait_from_impl.#21768keep qualifiers in function parameter completions.#21756support postfixletcompletions in closures.#21839don't add a second semicolon after postfix completions.#21324improve indentation after postfix completions.#20594fix indentation inconvert_closure_to_fn.#20614offerno_such_fieldfix for empty structs.#20762add fixes fornon_exhaustive_let.#20299name trait after first method ingenerate_trait_from_impl.#21775offerinline_local_variableinlet-chains.#21473offerunwrap_blockonlet-else.#20984offeradd_label_to_looponforandwhileexpressions.#20600offerunwrap_tupleonletexpressions.#21809offerextract_variableon some paths.#21822offeradd_missing_match_armson commas between arms.#21850offeradd_braceson assignments.#20628support nested lifetimes inadd_lifetime_to_type.#20625support multiple attributes inwrap_unwrap_cfg_attr.#20566support partial selections inmerge_imports.#21787keep extra predicates inreplace_is_method_with_if_let_method.#21828prime caches in parallel inscip.
Internal Improvements
#21843(first contribution) migrateconvert_from_to_tryfromassist toSyntaxEditor.#21847migratequalify_method_call,qualify_pathanddesugar_try_exprassists toSyntaxEditor.#21832use mappings inSyntaxFactoryconstructor methods.#21826replaceast::makewithSyntaxFactoryin a fewide-assistsmethods.#21848ignore mapping inexpr_underscore.#21779fix printing of IR types.#21827don't trigger GC on slow tests.#21795fixtest_loading_rust_analyzerwhen rust-project.json is present.#21796add codecov.io badge.
See also the changelog post.
2026-03-16
Commit: 90c8906
Release: 2026-03-16 (v0.3.2828)
Fixes
#21793(first contribution) handle multi-byte UTF-8 identifiers inNameGenerator::suggest_name.#21767remove crate fromEditionedFileId.#21785allow duplicate associated type shorthand resolution if it points to the same associated type.#21820infer generic args forTraitRefand its associated types.#21794validate naming convention for union types.#21771make file watcher recursive.
Internal Improvements
#21818refactorMirLowerCtxto use&ExpressionStoreinstead of&Body.#21788don't re-query source roots per-crate inanalysis-stats.#21804disambiguate error messages whenproc-macro-srvchanges the working directory.
See also the changelog post.
2026-03-09
Commit: 51966da
Release: 2026-03-09 (v0.3.2819)
New Features
#21752go toFromimpl when on "Go to definition" for?.
Fixes
#21745fix a bug in associated type lowering.#21750don't useTypingMode::PostAnalysisfor IDE method resolution.#21747allow never coercions in struct update syntax.#21726alignis_rustABI check withrustc.#21705support expressions incfg_select!.#21728use correct range foradd_missing_match_armsin macro calls.#21719improve formatting inreplace_if_let_with_match.#21687offerdestructure_struct_bindingonselfparameters.#21671complete postfixleton references inmatcharms.#21770update VFS when a watched file is deleted.#21763tweak-Zlockfile-pathpre-release check forbeta.
Internal Improvements
#21782(first contribution) addrust-analyzer parse --json.#21755(first contribution) addhas_pendingmethods toIncoming/Outgoing/ReqQueueinlsp_server.#21764improvesmol_strAPI surface in anticipation for1.0.0.#21774migrateunqualify_method_callassist toSyntaxEditor.#21734replaceast::makein already migrated assists.#21660set upcodecov.#21732define rules for LLMs.
See also the changelog post.
2026-03-02
Commit: 566fe41
Release: 2026-03-02 (v0.3.2811)
Fixes
#21699enable diagnostic for adding auto traits by casting*dyn Tr.#21654mark the RHS of compound assignments asExprIsRead::Yes.#21725fix wrong condition inVisibility::min.#21669supportSpan::parentin proc macro expansion.#21716use-Zlockfile-pathon pre-release 1.95 toolchains as well.#21708don't panic on invalid LSP notifications.#21706don't duplicate enum variants in pattern completion.#21698fix scrutinee indent inreplace_if_let_with_match.
Internal Improvements
#21710,#21720(first contribution) migratefix_visibilityandgenerate_deriveassists toSyntaxEditor.#21681skiprustfmttest if nightly toolchain is missing.
See also the changelog post.
2026-02-23
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 inadd_missing_impl_members.#21675(first contribution) exclude references in macro calls inside tests whenexcludeTestsis enabled.#21664handle cycles insizedness_constraint_for_ty.#21652,#21692fix predicates of built-in derive traits with two parameters defaulting toSelf.#21655complete derive helpers on empty namerefs.#21594complete postfixletandletmin match arms.#21600complete postfixleton block tail expression.#21650don't complete suggested parameters in complex patterns.#21536offertoggle_macro_delimiterin nested macro calls.#21623offerreplace_is_method_with_if_let_methodonis_some_and.#21684pick the enclosing instead of first impl block ingenerate_function.#21688correctly parenthesize inverted condition inconvert_bool_then.#20353support selecting only a subset of fields ingenerate_getter_or_setter.#21389handle references better inconvert_to_guarded_return,replace_if_let_with_matchandreplace_let_with_if_let.#21657supportSpan::span_sourcein proc macro expansion.
Internal Improvements
#21631refactor handling of associated type shorthands.#21630useCARGO_RESOLVER_LOCKFILE_PATHfor lockfile copies on1.95and later.#21643replaceedit_in_place::Indentingenerate_impl.#21661,#21666add integration tests for flycheck.
See also the changelog post.
2026-02-16
Commit: 00a9173
Release: 2026-02-16 (v0.3.2795)
New Features
#21574filter auto-import candidates to make sure the resulting path resolves.#21591split long parameter lists into multiple lines for hover.
Fixes
#21647(first contribution) handleref mutbindings incontains_explicit_ref_binding.#21649treat dereferencing*mut !right-hand side values in assignments as reads.#21611updateallow_normalizationto matchrustc.#21627revert "implement fine-grained request cancellation support".#21644revert "fix stale diagnostics withrust-project.jsonandrustcJSON".#21632treatextern fnparameters as identifiers, not patterns.#21633don't resolve proc macros in value as functions outside their defining crate.#21608use the right index for the close span inset_top_subtree_delimiter_span.#21402don't insert semicolon after function call in array literal.#21583keep associated type bounds inreplace_derive_with_manual_impl.#21381fixSelfhandling ininline_call.
Internal Improvements
#21609userayonfor proc macro loading.#21606,#21507,#21618,#21619migrategenerate_getter_or_setter,introduce_named_lifetime,destructure_tuple_bindingandconvert_tuple_return_typeassists toSyntaxEditor.#21636replaceedit_in_place::Indentin migrated assists.#21584add expression, pattern and binding types iterators toDefWithBody.#21581run clippy as a separate CI step.#21628temporarily pinmirijob toolchain.
See also the changelog post.
2026-02-09
Commit: c75729d
Release: 2026-02-09 (v0.3.2786)
New Features
#21380implement fine-grained request cancellation support.#21572add support for newtry { ... }andtry bikeshed Ty { ...}blocks.
Fixes
#21561fix a glob issue affectingwindows::core::HRESULT.#21579fix a panic on lowering cycles.#21573infer the expected len ininclude_bytes!()to avoid type mismatches.#21569parenthesise more cases like&(impl Trait1 + Trait2).#21578usedisplay_source_code()inReferenceConversionto avoid trying to parse{unknown}.#21526,#21557complete postfixnotandletin conditions.#21508emitelsebranch inmove_guard.#21571fix stale diagnostics withrust-project.jsonandrustcJSON.#21580truncate display version of commands consistently.
Internal Improvements
#21488removeEdition::CURRENT_FIXME.#21599simplify binding hash computation in syntax highlighting.
See also the changelog post.