Skip to content

Releases: rust-lang/rust-analyzer

nightly

20 Jun 06:13
501826b

Choose a tag to compare

nightly Pre-release
Pre-release
Merge pull request #22624 from BenjaminBrienen/pin-node-docker-image

Pin node docker image in order to fix release workflow

2026-06-15

15 Jun 06:20
cc27280

Choose a tag to compare

Commit: cc27280
Release: 2026-06-15 (v0.3.2937)

New Features

  • #22549 support excluding enum variants from flyimport.

Performance Improvements

  • #22579 defer initial workspace flycheck until cache priming completes.

Fixes

  • #22575 (fist contribution) don't count ... as a parameter for function pointers.
  • #22566 fix closure capture analysis with destructuring assignments.
  • #22545 make inline_type_alias work on ADT definitions.
  • #22551 handle macro calls in inline_local_variable.
  • #22584 offer inline_macro in macro calls.
  • #22574 use package id as argument to --package if package when not unique.

Internal Improvements

  • #21868 (first contribution) migrate extract_module assist to SyntaxEditor.
  • #22571 (first contribution) remove unnecessary feature flags from tests.
  • #22505 disallow using LLMs for comments and autonomously-filed PRs or issues.
  • #22588 add RFMF funding links.

See also the changelog post.

2026-06-08

08 Jun 04:51
7ea2b25

Choose a tag to compare

Commit: 7ea2b25
Release: 2026-06-08 (v0.3.2929)

New Features

  • #22469 (first contribution) add infer-vars-not-allowed diagnostic.

  • #22512 (first contribution) parse unstable unnamed enum variants.

  • #22448 add "Evaluate Predicate" command:

    597728705-8273a170-caa5-4ab9-8f17-a5cd04944f10.mp4

  • #22481 lower field defaults.

  • #22495 use mimalloc for Windows releases.

Fixes

  • #22520 don't emit "type annotations needed" errors on include_bytes!().
  • #22524 parse | pattern types.
  • #22503 try to improve completion ranking.
  • #22457 dereference LHS in assignments instead of adding &mut in type_mismatch quick fix.
  • #22507 hide ra@gennew inhaly hints.
  • #22508 don't add both drop and pin_drop in add_missing_impl_members.
  • #22519 don't add unused generic parameters in generate_trait_from_impl.
  • #22523 handle mutable access better in extract_function.
  • #22506 kill proc-macro-srv processes on shutdown.
  • #22522 fix test runnables in rust-project.json.

Internal Improvements

  • #22510 simplify mir::ProjectionElem and bring it closer the rustc version.
  • #22533 remove AST types from FoldKind.
  • #22528 improve panic message when FileSourceRootInput is missing.

See also the changelog post.

2026-06-01

01 Jun 06:54
c5d30e2

Choose a tag to compare

Commit: c5d30e2
Release: 2026-06-01 (v0.3.2921)

New Features

  • #22411 add cannot-implicitly-deref-trait-object diagnostic.

Performance Improvements

  • #22493 make MemDocs cheap to clone since it's snapshotted.

Fixes

  • #22473 port block and loop inference from rustc.
  • #22476 only complete functional record update at the end of the literal.
  • #22449 fix an expected analysis regression with enum variants.
  • #22409, #22453 filter out reference completions for generic reference parameters.
  • #22452 prioritize missing fields in pattern completion.
  • #22437 handle macros in extract_module.
  • #22447 fix extract_variable in macro calls.
  • #22498 also consider library features internal.
  • #22426 fix potential panic in CfgDiff formatting.
  • #22342 don't double references with &mut T in add_reference_here.
  • #21566 fix SyntaxContext roots potentially overlapping interneds.

Internal Improvements

  • #22465 improve syntax mapping in for loop desugaring.
  • #22474 intern MIR projections using the new type interning infrastructure.
  • #22477, #22484 replace ast::make with SyntaxFactory in derive_macro, edits, prettify_macro_expansion_ and rename.
  • #22500 always use sysroot crates for proc-macro-srv.
  • #22427 fix inactive region handling in MiniCore.
  • #22501 don't depend on salsa for the proc-macro-srv CI job.
  • #22492, #22502 use 1 CGU for release builds.

See also the changelog post.

2026-05-25

25 May 04:29
de5824b

Choose a tag to compare

Commit: de5824b
Release: 2026-05-25 (v0.3.2913)

New Features

  • #22406 (first contribution) add mutable-ref diagnostic.
  • #22424 (first contribution) add array-pattern-without-fixed-length diagnostic.
  • #22404 add cannot-index-into diagnostics.
  • #22416 support excluding subitems from completions.

Performance Improvements

  • #22322 improve 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.
  • #22252 refactor handling of generic parameters in hir::Type.
  • #22396 support named consts in range pattern types.
  • #22392 don't try autoref during method probe in path mode.
  • #22385 auto-import enum variants.
  • #22425 expected tuple struct pattern field in expected type completions.
  • #22397 complete macro paths in macro calls.
  • #22399 fix ref_match completions in macro calls.
  • #22408 don't complete semicolon in match expression.
  • #22419 use grouped annotation in add_label_to_loop.
  • #22369 use wildcard on sad path in replace_if_let_with_match with guard.
  • #22383 return a specific error for unimplemented built-in macros.

Internal Improvements

  • #22420 clean up bidirectional proc macro server protocol.

See also the changelog post.

2026-05-18

18 May 02:50
ce81cf6

Choose a tag to compare

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, #22378 add invalid-range-pat-type, non-exhaustive-record-pat, method-call-illegal-sized-bound, fru-in-destructuring-assignment, cannot-be-dereferenced and explicit-drop-method-use diagnostics.
  • #22082, #22368, #22384 add pattern type support.

Performance Improvements

  • #22329 encode the name instead of index in EnumVariantId for better incrementality.
  • #22191 use the LineIndex in RootDatabase in the proc macro server.

Fixes

  • #22358, #22381 show const and unsafe in signature help.
  • #22357 show Run lens for fn main in bench targets.
  • #22363 fix false positive trait-impl-missing-assoc_item with Self: Sized bounds.
  • #22376 hide duplicate completions originating from Deref chains.
  • #22367 fix spurious reference completions.
  • #22386 don't complete :: before existing :: in paths.
  • #22354 don't drop path segment in qualify_path.
  • #22344 handle macro calls in extract_function.
  • #22335 add parameter to the closures produced by replace_method_eager_lazy.

Internal Improvements

  • #22352 (first contribution) migrate inline_call assist to `SyntaxEditor.
  • #22313 refactor visiting and tracking of placeholder types.
  • #22328 remove interning from #[query_group].
  • #22119 remove some usages of DbInterner::conjure.
  • #22391 ignore workspace/diagnostic/refresh in slow tests.

See also the changelog post.

2026-05-11

11 May 04:58
e266f5c

Choose a tag to compare

Commit: e266f5c
Release: 2026-05-11 (v0.3.2896)

New Features

  • #22309, #22334 (first contributions) add functional-record-update-on-non-struct and expected-array-or-slice-pat diagnostics.
  • #22235, #22326 add duplicate-field diagnostic.
  • #22292 add support for deref patterns.
  • #22259 complete :: in module paths.

Performance Improvements

  • #22267 improve performance of integer-based symbols.
  • #22280 cache more things related to lang items.

Fixes

  • #22303 (first contribution) keep ref and mut when renaming bindings in macro-generated patterns.
  • #22284 (first contribution) work around a lsp-mode configuration bug.
  • #22295 (first contribution) use runnable kind to disambiguate between Cargo and shell commands.
  • #22272 don't fetch diagnostics until proc macros are loaded.
  • #22198 infer anonymous constants instead of signatures.
  • #22237 provide an InferCtxt to TyLoweringContext.
  • #22319 don't replace closure capture place types with errors if they fail to normalize.
  • #22285 unify types in ref_match completions.
  • #22275 port async block expected type inference from rustc.
  • #22271 port array and ref expression inference from rustc.
  • #22299 fix derive helper resolution.
  • #22290 respect lint attributes for diagnostics that don't set their main node.
  • #22276 remove usage of references_error in upvar inference.
  • #22266 fix handling of self in lower_coroutine_body_with_moved_arguments.
  • #22318 provide source map for the lowered let self = self binding in async functions.
  • #22274 add missing lang items for the trait solver.
  • #22282 handle #[rustc_reservation_impl = "reason"].
  • #22315 add whitespace to postfix completions in macro calls.
  • #22286 use cursor position for indentation in postfix completions.
  • #22302 don't split ..= in prettify_macro_expansion.
  • #22291 don't add associated types with defaults in add_missing_impl_members.
  • #22304 don't offer toggle_macro_delimiter on inner braces.

Internal Improvements

  • #22312 bump rustc crates.
  • #22269 fix nested edits in SyntaxEditor.
  • #22308, #22204 migrate split_import and convert_closure_to_fn assists to SyntaxEditor.
  • #22261 migrate missing_fields diagnostic to SyntaxEditor.
  • #22296 migrate impl Trait completions to SyntaxEditor.
  • #22320, #22321, #22323 migrate macro expansion to SyntaxEditor.
  • #22310 remove SourceChangeBuilder::make_mut.
  • #22307 remove ted-based increase_indent and decrease_indent.
  • #22256 add SyntaxEditor version of wrap_in_tree_list.

See also the changelog post.

2026-05-04

04 May 05:21
f04c372

Choose a tag to compare

Commit: f04c372
Release: 2026-05-04 (v0.3.2887)

New Features

  • #22238, #22239, #22253 (first contributions) add mismatched-array-pat-len and unused-must-use diagnostics.
  • #22186 diagnose trait errors 🎉.
  • #22144, #22168, #22145, #22156, #22197, #22193, #22202 add type-must-be-known, generic-default-refers-to-self, invalid-lhs-of-assignment, pattern-arg-in-extern-fn, non-exhaustive-record-expr and union-expr-must-have-exactly-one-field diagnostics.
  • #21987 add initial support for gen blocks.
  • #22178 allow renaming of elided lifetimes.
  • #22132, #22210 add .new postfix completion based on expected type.
  • #22179 add unwrap_block assist.

Performance Improvements

Fixes

  • #22098 (first contribution) avoid importing prelude paths when imports.preferPrelude is disabled.
  • #22134, #22195 port pattern inference from rustc.
  • #22141 bring type inference closer to rustc.
  • #22135 suppress inference variables in monomorphization.
  • #22214 visit all expressions.
  • #22169 parse impl restrictions after visibility.
  • #22170 parse return #[attr] expr.
  • #22124 don't pick an impl Trait block in generate_function.
  • #22166 fix placement of async closure capture hints.
  • #22183 propagate ABI to functions declared in extern blocks.
  • #22201 improve parser recovery in (a, , b).
  • #22058 improve prettify_macro_expansion.
  • #22229 add parentheses in convert_match_to_let_else.
  • #22142 don't offer completions for already imported Trait as _.
  • #22154 don't complete where after qualified paths.
  • #22222 emit else clause in value postfix completions.
  • #22240 improve indentation in trait item completion.
  • #22244 handle cycles in expand_glob_import.
  • #22150 offer is_some_and and is_none_or in apply_demorgan_iterator.
  • #22151 handle negation in apply_demorgan_iterator.
  • #22247 handle match arms in unwrap_branch.
  • #22217 add semicolon after expression in unwrap_branch.
  • #22184 offer unwrap_branch on non-block match arms.
  • #22180 offer replace_arith_op on compound assignments.
  • #22199 offer convert_to_guarded_return on if expression with else if clause.
  • #22079 handle if matches!() in replace_if_let_with_match.
  • #22215 fix a stack overflow when displaying projections.
  • #22265 fix panic on impl ?Sized in introduce_named_type_parameter.
  • #22207 fix some issues in lower_coroutine_body_with_moved_arguments.
  • #22122 be more resilient to deleted directories in Analysis::from_single_file.

Internal Improvements

  • #22129 lower non-destructuring assignments into Pat::Expr instead of Pat::Path.
  • #22146 clean up string references in postfix completions.
  • #22190 ignore a test that might be hanging.
  • #22232 refactor the hir-ty generics data structures.
  • #22194 refactor InternedCoroutineClosureId.
  • #22221 fix incorrect offset with multiple indels.
  • #22121 migrate extract_function assist to SyntaxEditor and remove old version of generate_impl.
  • #22125, #22020, #22159 migrate replace_qualified_name_with_use, inline_call and generate_function assists to SyntaxEditor.
  • #22137 migrate convert_into_to_from assist to SyntaxEditor and replace some usages of mod_path_to_ast.
  • #22241 migrate insert_use and insert_use_as_alias to SyntaxEditor.
  • #22245 migrate AssocItemList::add_item to SyntaxEditor.
  • #22243 replace ast::make with SyntaxFactory in to_generic_args.
  • #22246 remove WhereClause::add_predicate.
  • #22242 remove some unused methods in edit_in_place.

See also the changelog post.

2026-04-27

27 Apr 04:56
8954b66

Choose a tag to compare

Commit: 8954b66
Release: 2026-04-27 (v0.3.2878)

New Features

  • #21979 rename variables in constructors when renaming a field.

Fixes

  • #22116 (first contribution) mark enum variants as deprecated when parent enum is deprecated.
  • #22101 port call expression type checking and closure upvar inference from rustc.
  • #22107 improve "Go to definition" on comparison operators.
  • #22085 reduce relevance of deprecated items.

Internal Improvements

  • #22054 (first contribution) de-duplicate lints.
  • #22104 don't check solver's cache validity on every access.
  • #22105 migrate wrap_unwrap_cfg_attr assist to SyntaxEditor and replace ast::make with SyntaxFactory in few handlers.
  • #22111 group unstable features in a struct.

See also the changelog post.

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.