Releases: rust-lang/rust-analyzer
nightly
Merge pull request #22624 from BenjaminBrienen/pin-node-docker-image Pin node docker image in order to fix release workflow
2026-06-15
Commit: cc27280
Release: 2026-06-15 (v0.3.2937)
New Features
#22549support excluding enum variants from flyimport.
Performance Improvements
#22579defer initial workspace flycheck until cache priming completes.
Fixes
#22575(fist contribution) don't count...as a parameter for function pointers.#22566fix closure capture analysis with destructuring assignments.#22545makeinline_type_aliaswork on ADT definitions.#22551handle macro calls ininline_local_variable.#22584offerinline_macroin macro calls.#22574use package id as argument to--packageif package when not unique.
Internal Improvements
#21868(first contribution) migrateextract_moduleassist toSyntaxEditor.#22571(first contribution) remove unnecessary feature flags from tests.#22505disallow using LLMs for comments and autonomously-filed PRs or issues.#22588add RFMF funding links.
See also the changelog post.
2026-06-08
Commit: 7ea2b25
Release: 2026-06-08 (v0.3.2929)
New Features
-
#22469(first contribution) addinfer-vars-not-alloweddiagnostic. -
#22512(first contribution) parse unstable unnamed enum variants. -
#22448add "Evaluate Predicate" command:597728705-8273a170-caa5-4ab9-8f17-a5cd04944f10.mp4
-
#22481lower field defaults. -
#22495usemimallocfor Windows releases.
Fixes
#22520don't emit "type annotations needed" errors oninclude_bytes!().#22524parse|pattern types.#22503try to improve completion ranking.#22457dereference LHS in assignments instead of adding&mutintype_mismatchquick fix.#22507hidera@gennewinhaly hints.#22508don't add bothdropandpin_dropinadd_missing_impl_members.#22519don't add unused generic parameters ingenerate_trait_from_impl.#22523handle mutable access better inextract_function.#22506killproc-macro-srvprocesses on shutdown.#22522fix test runnables inrust-project.json.
Internal Improvements
#22510simplifymir::ProjectionElemand bring it closer therustcversion.#22533remove AST types fromFoldKind.#22528improve panic message whenFileSourceRootInputis missing.
See also the changelog post.
2026-06-01
Commit: c5d30e2
Release: 2026-06-01 (v0.3.2921)
New Features
#22411addcannot-implicitly-deref-trait-objectdiagnostic.
Performance Improvements
#22493makeMemDocscheap to clone since it's snapshotted.
Fixes
#22473port block and loop inference fromrustc.#22476only complete functional record update at the end of the literal.#22449fix an expected analysis regression with enum variants.#22409,#22453filter out reference completions for generic reference parameters.#22452prioritize missing fields in pattern completion.#22437handle macros inextract_module.#22447fixextract_variablein macro calls.#22498also consider library features internal.#22426fix potential panic inCfgDiffformatting.#22342don't double references with&mut Tinadd_reference_here.#21566fixSyntaxContextroots potentially overlapping interneds.
Internal Improvements
#22465improve syntax mapping inforloop desugaring.#22474intern MIR projections using the new type interning infrastructure.#22477,#22484replaceast::makewithSyntaxFactoryinderive_macro,edits,prettify_macro_expansion_andrename.#22500always use sysroot crates forproc-macro-srv.#22427fix inactive region handling inMiniCore.#22501don't depend onsalsafor theproc-macro-srvCI job.#22492,#22502use 1 CGU for release builds.
See also the changelog post.
2026-05-25
Commit: de5824b
Release: 2026-05-25 (v0.3.2913)
New Features
#22406(first contribution) addmutable-refdiagnostic.#22424(first contribution) addarray-pattern-without-fixed-lengthdiagnostic.#22404addcannot-index-intodiagnostics.#22416support excluding subitems from completions.
Performance Improvements
#22322improve incrementality for modules.
Fixes
#22432(first contribution) filter package-scoped features in flycheck.#22430(first contribution) saturate float to uint cast in const eval.#22415(first contribution) allow wildcard parameters in foreign function declarations.#22252refactor handling of generic parameters inhir::Type.#22396support named consts in range pattern types.#22392don't try autoref during method probe in path mode.#22385auto-import enum variants.#22425expected tuple struct pattern field in expected type completions.#22397complete macro paths in macro calls.#22399fixref_matchcompletions in macro calls.#22408don't complete semicolon in match expression.#22419use grouped annotation inadd_label_to_loop.#22369use wildcard on sad path inreplace_if_let_with_matchwith guard.#22383return a specific error for unimplemented built-in macros.
Internal Improvements
#22420clean up bidirectional proc macro server protocol.
See also the changelog post.
2026-05-18
Commit: ce81cf6
Release: 2026-05-18 (v0.3.2904)
VS Code Extension Publishing Issue
This release is not available on the VS Code Marketplace and OpenVSX due to an infrastructure issue.
Until it's fixed, you can still download it from the GitHub release page.
New Features
#22347,#22355,#22372,#22379,#22380,#22378addinvalid-range-pat-type,non-exhaustive-record-pat,method-call-illegal-sized-bound,fru-in-destructuring-assignment,cannot-be-dereferencedandexplicit-drop-method-usediagnostics.#22082,#22368,#22384add pattern type support.
Performance Improvements
#22329encode the name instead of index inEnumVariantIdfor better incrementality.#22191use theLineIndexinRootDatabasein the proc macro server.
Fixes
#22358,#22381showconstandunsafein signature help.#22357showRunlens forfn mainin bench targets.#22363fix false positivetrait-impl-missing-assoc_itemwithSelf: Sizedbounds.#22376hide duplicate completions originating fromDerefchains.#22367fix spurious reference completions.#22386don't complete::before existing::in paths.#22354don't drop path segment inqualify_path.#22344handle macro calls inextract_function.#22335add parameter to the closures produced byreplace_method_eager_lazy.
Internal Improvements
#22352(first contribution) migrateinline_callassist to `SyntaxEditor.#22313refactor visiting and tracking of placeholder types.#22328remove interning from#[query_group].#22119remove some usages ofDbInterner::conjure.#22391ignoreworkspace/diagnostic/refreshin slow tests.
See also the changelog post.
2026-05-11
Commit: e266f5c
Release: 2026-05-11 (v0.3.2896)
New Features
#22309,#22334(first contributions) addfunctional-record-update-on-non-structandexpected-array-or-slice-patdiagnostics.#22235,#22326addduplicate-fielddiagnostic.#22292add support for deref patterns.#22259complete::in module paths.
Performance Improvements
#22267improve performance of integer-based symbols.#22280cache more things related to lang items.
Fixes
#22303(first contribution) keeprefandmutwhen renaming bindings in macro-generated patterns.#22284(first contribution) work around alsp-modeconfiguration bug.#22295(first contribution) use runnable kind to disambiguate between Cargo and shell commands.#22272don't fetch diagnostics until proc macros are loaded.#22198infer anonymous constants instead of signatures.#22237provide anInferCtxttoTyLoweringContext.#22319don't replace closure capture place types with errors if they fail to normalize.#22285unify types inref_matchcompletions.#22275port async block expected type inference fromrustc.#22271port array andrefexpression inference fromrustc.#22299fix derive helper resolution.#22290respect lint attributes for diagnostics that don't set their main node.#22276remove usage ofreferences_errorin upvar inference.#22266fix handling ofselfinlower_coroutine_body_with_moved_arguments.#22318provide source map for the loweredlet self = selfbinding in async functions.#22274add missing lang items for the trait solver.#22282handle#[rustc_reservation_impl = "reason"].#22315add whitespace to postfix completions in macro calls.#22286use cursor position for indentation in postfix completions.#22302don't split..=inprettify_macro_expansion.#22291don't add associated types with defaults inadd_missing_impl_members.#22304don't offertoggle_macro_delimiteron inner braces.
Internal Improvements
#22312bumprustccrates.#22269fix nested edits inSyntaxEditor.#22308,#22204migratesplit_importandconvert_closure_to_fnassists toSyntaxEditor.#22261migratemissing_fieldsdiagnostic toSyntaxEditor.#22296migrateimpl Traitcompletions toSyntaxEditor.#22320,#22321,#22323migrate macro expansion toSyntaxEditor.#22310removeSourceChangeBuilder::make_mut.#22307removeted-basedincrease_indentanddecrease_indent.#22256addSyntaxEditorversion ofwrap_in_tree_list.
See also the changelog post.
2026-05-04
Commit: f04c372
Release: 2026-05-04 (v0.3.2887)
New Features
#22238,#22239,#22253(first contributions) addmismatched-array-pat-lenandunused-must-usediagnostics.#22186diagnose trait errors 🎉.#22144,#22168,#22145,#22156,#22197,#22193,#22202addtype-must-be-known,generic-default-refers-to-self,invalid-lhs-of-assignment,pattern-arg-in-extern-fn,non-exhaustive-record-exprandunion-expr-must-have-exactly-one-fielddiagnostics.#21987add initial support forgenblocks.#22178allow renaming of elided lifetimes.#22132,#22210add.newpostfix completion based on expected type.#22179addunwrap_blockassist.
Performance Improvements
#22078(first contribution) store parse errors into a side table.#22192keep nonce when cloningRootDatabase.#22187don't internAdtDef.#22189,#22131,#22133drop someArcs.
Fixes
#22098(first contribution) avoid importing prelude paths whenimports.preferPreludeis disabled.#22134,#22195port pattern inference fromrustc.#22141bring type inference closer torustc.#22135suppress inference variables in monomorphization.#22214visit all expressions.#22169parseimplrestrictions after visibility.#22170parsereturn #[attr] expr.#22124don't pick animpl Traitblock ingenerate_function.#22166fix placement of async closure capture hints.#22183propagate ABI to functions declared in extern blocks.#22201improve parser recovery in(a, , b).#22058improveprettify_macro_expansion.#22229add parentheses inconvert_match_to_let_else.#22142don't offer completions for already importedTrait as _.#22154don't completewhereafter qualified paths.#22222emitelseclause in value postfix completions.#22240improve indentation in trait item completion.#22244handle cycles inexpand_glob_import.#22150offeris_some_andandis_none_orinapply_demorgan_iterator.#22151handle negation inapply_demorgan_iterator.#22247handle match arms inunwrap_branch.#22217add semicolon after expression inunwrap_branch.#22184offerunwrap_branchon non-block match arms.#22180offerreplace_arith_opon compound assignments.#22199offerconvert_to_guarded_returnonifexpression withelse ifclause.#22079handleif matches!()inreplace_if_let_with_match.#22215fix a stack overflow when displaying projections.#22265fix panic onimpl ?Sizedinintroduce_named_type_parameter.#22207fix some issues inlower_coroutine_body_with_moved_arguments.#22122be more resilient to deleted directories inAnalysis::from_single_file.
Internal Improvements
#22129lower non-destructuring assignments intoPat::Exprinstead ofPat::Path.#22146clean up string references in postfix completions.#22190ignore a test that might be hanging.#22232refactor thehir-tygenerics data structures.#22194refactorInternedCoroutineClosureId.#22221fix incorrect offset with multiple indels.#22121migrateextract_functionassist toSyntaxEditorand remove old version ofgenerate_impl.#22125,#22020,#22159migratereplace_qualified_name_with_use,inline_callandgenerate_functionassists toSyntaxEditor.#22137migrateconvert_into_to_fromassist toSyntaxEditorand replace some usages ofmod_path_to_ast.#22241migrateinsert_useandinsert_use_as_aliastoSyntaxEditor.#22245migrateAssocItemList::add_itemtoSyntaxEditor.#22243replaceast::makewithSyntaxFactoryinto_generic_args.#22246removeWhereClause::add_predicate.#22242remove some unused methods inedit_in_place.
See also the changelog post.
2026-04-27
Commit: 8954b66
Release: 2026-04-27 (v0.3.2878)
New Features
#21979rename variables in constructors when renaming a field.
Fixes
#22116(first contribution) mark enum variants as deprecated when parent enum is deprecated.#22101port call expression type checking and closure upvar inference fromrustc.#22107improve "Go to definition" on comparison operators.#22085reduce relevance of deprecated items.
Internal Improvements
#22054(first contribution) de-duplicate lints.#22104don't check solver's cache validity on every access.#22105migratewrap_unwrap_cfg_attrassist toSyntaxEditorand replaceast::makewithSyntaxFactoryin few handlers.#22111group unstable features in a struct.
See also the changelog post.
2026-04-20
Commit: adef948
Release: 2026-04-20 (v0.3.2870)
New Features
#21906exclude dependency and standard library results from reference search.#21740support#[rust_analyzer::prefer_underscore_import]to import traitsas _.
Fixes
#22031(first contribution) demoteimplcompletions when an inherentimplblock already exists.#22083(first contribution) respect#[deprecated]when deciding if aModuleDefcompletion is deprecated.#22046(first contribution) add parser support for unstabletype constitems.#22022add parser support forimplandmutrestrictions.#22096useProofTreeVisitorfor unsized coercion.#22025don't add extra dereference after indexing inextract_function.#22044don't complete unstable items that are gated by an internal feature.#22003complete variants of hidden enums through public aliases.#21999fix ref-completion with keyword prefix.#22018enable completions inside strings in VS Code.#22032allow ambiguity in associated type shorthands if they resolve to the same associated type from a supertrait.#22087fix incorrect lifetime hints withself: Selfparameter.#22066recognize#[std::prelude::vX::test].#21487offerextract_variablein macro calls.#22067add parentheses on record literals inreplace_let_with_if_let.#22030fix MIR evaluation of sized &T with recursive const functions.#22073fix panic on empty comments inconvert_comment_block.#22077fix a panic inreplace_if_let_with_match.#22055fixes someupvars_mentionedissues.#22070handle name conflicts inextract_type_aliasa little better.
Internal Improvements
#21835addhir::Type::{as_raw_ptr,is_mutable_raw_ptr}.#22092synchronize function call argument check fudging withrustc.#22048bumprustccrates.#22061bumpsalsa.#22050represent lower coroutines to closures.#22049,#22069store aSyntaxFactoryinsideSyntaxEditor.#22043,#22095,#22042,#22039replaceast::makewithSyntaxFactoryinraw_string,convert_range_for_to_while,expand_glob_importandgenerate_blanket_trait_impl.#22091,#22036migrategenerate_impl_textandIdentPat::set_pattoSyntaxEditor.#22081migrateconvert_iter_for_each_to_forassist toSyntaxEditor.#22037removeset_visibility.#22041removeGenericParamsOwnerEdit.#22057removeclone_for_updatefrommove_const_to_impl.#22063removeLineIndexDatabase.#22065fix new Clippy lints.#22084slim downMiniCoreDebugoutput.#22074supportRUSTFMT_TOOLCHAINforxtask codegen.#22029,#22028runrustdocGitHub action on PRs.
See also the changelog post.