github rust-lang/rust-analyzer 2026-05-04

latest release: nightly
11 hours ago

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.

Don't miss a new rust-analyzer release

NewReleases is sending notifications on new releases.