Skip to content

Releases: rust-lang/rust-analyzer

nightly

13 Aug 01:02
b2a58b8
Compare
Choose a tag to compare
nightly Pre-release
Pre-release
Merge pull request #20432 from sgasho/fix/20215_implement_default_mem…

2025-08-11

11 Aug 18:42
9db0550
Compare
Choose a tag to compare

Commit: 9db0550
Release: 2025-08-11 (v0.3.2577)

An Update on the Next Trait Solver

We are very close to switching from chalk to the next trait solver, which will be shared with rustc.
chalk is de-facto unmaintained, and sharing the code with the compiler will greatly improve trait solving accuracy and fix long-standing issues in rust-analyzer.
This will also let us enable more on-the-fly diagnostics (currently marked as experimental), and even significantly improve performance.

However, in order to avoid regressions, we will suspend the weekly releases until the new solver is stabilized.
In the meanwhile, please test the pre-release versions (nightlies) and report any issues or improvements you notice, either on GitHub Issues, GitHub Discussions, or Zulip.

New Features

  • #20420 (first contribution) add config option to exclude locals from document symbol search.

Fixes

  • #20381 check expected type for assignments in completions.
  • #20382 correctly go to impl From from into() even inside macros.
  • #20387 do not remove the original token when descending into derives.
  • #20412 properly handle names matching identifiers in generate_function.
  • #20418 fix extract_expressions_from_format_string on write! calls.
  • #20354 remove no-op calls in remove_dbg.
  • #20384 fix external docs URL for exported macros.

Internal Improvements

  • #20417 (first contribution) fix parsing of trait bound polarity and for-binders.
  • #20419, #20429, #20434 make flycheck generational.
  • #20385 migrate expand_glob_import assist to SyntaxEditor.
  • #20373 generate an ast::Module, not String, in extract_module.
  • #20383 remove ted from replace_named_generic_with_impl.
  • #20380 remove add_attr from edit_in_place because it use ted.
  • #20409 add write! and writeln! to minicore.
  • #20400 disable error reporting when clamping a position.
  • #20393 fix non-LSP compliant Response definition.
  • #20392 report the incorrect payload when failing to deserialize LSP messages.
  • #20389 slim down compile-time artifact progress reports.

See also the changelog post.

2025-08-04

04 Aug 06:06
8d75311
Compare
Choose a tag to compare

Commit: 8d75311
Release: 2025-08-04 (v0.3.2563)

New Features

  • #20351 change callers to use method call syntax when renaming a parameter to self.

Fixes

  • #20313 fix variable substitution in runnables.extraEnv.
  • #20333 do not require all rename definitions to be renameable.
  • #20336 check for snippet cap in generate_mut_trait_impl.
  • #20337 fix bounds display with impl Trait.
  • #20300 don't add Panics section for debug_assert!.
  • #20327 don't show $saved_file literally in IDE status updates.

Internal Improvements

  • #20342 reorganize proc-macro-srv, add --format and --version args.
  • #20311, #20314, #20364, #20368, #20371 migrate convert_tuple_struct_to_named_struct, inline_type_alias, convert_from_to_tryfrom, generate_delegate_methods and generate_trait_from_impl assists to SyntaxEditor.
  • #20303, #20372 migrate path_transform to SyntaxEditor.
  • #20345 add SyntaxEditor::delete_all.
  • #20349 fix new Clippy lints.
  • #20154 improve settings tree descriptions.
  • #20335 use GitHub app for authenticating sync PRs.

See also the changelog post.

2025-07-28

28 Jul 04:53
db02cdc
Compare
Choose a tag to compare

Commit: db02cdc
Release: 2025-07-28 (v0.3.2555)

New Features

  • #19938 add "Generate impl for type" assist.

Fixes

  • #20271 disable tests in flycheck if cfg.setTest is set to false.
  • #20262 fix search of raw labels and lifetimes.
  • #20273 apply adjustments to patterns and expressions when doing pattern analysis.
  • #20281 parse for<'a> [const].
  • #20318 ignore Destruct bounds again.
  • #20290, #20315 use temporary directory for copied lockfiles.
  • #20319 consider all produced artifacts for proc macro dylib search.
  • #20302 fix doc-comment folding with multi-line parameter lists.
  • #20285 use Self when renaming self parameter.
  • #20256 support Deref in generate_mut_trait_impl.
  • #20297 fix whitespace in generate_trait_from_impl.

Internal Improvements

  • #20272 (first contribution) fix size asserts on x86_64-unknown-linux-gnux32.
  • #20293, #20306, #20307, #20270 migrate replace_derive_with_manual_impl, add_missing_impl_members, convert_to_guarded_return, extract_expressions_from_format_string and generate_new to SyntaxEditor.
  • #20269 migrate AstNodeEdit::Indent to SyntaxEditor.
  • #20289 remove ExpressionStoreDiagnostics::MacroError.
  • #20278 fupport filtering in analysis-stats MIR lowering.
  • #20280, #20282, #20279 set up rustc-josh-sync.

See also the changelog post.

2025-07-21

21 Jul 05:47
58e507d
Compare
Choose a tag to compare

Commit: 58e507d
Release: 2025-07-21 (v0.3.2547)

New Features

  • #19783 add "Generate From impl from single field" assist.
  • #20265 support cfg_select! for the standard library.

Fixes

  • #20238 infer lifetimes for GATs in expression/pattern positions.
  • #19917 handle AsRef and Borrow in "Generate IndexMut impl from Index".
  • #20247 transform tail expression & to &mut in "Generate TraitMut impl from Trait".
  • #20255 fix bounds in "Generate Deref impl".

Internal Improvements

  • #20233 (first contribution) expand lsp-server example.
  • #20178 clean up cargo config querying.
  • #20234 remove {ConstParam,TypeParam}::remove_default.
  • #20246 add AsMut to minicore prelude.

See also the changelog post.

2025-07-14

14 Jul 04:44
591e3b7
Compare
Choose a tag to compare

Commit: 591e3b7
Release: 2025-07-14 (v0.3.2539)

New Features

  • #20054 support folding multi-line parameter list with the function body:

    Screen recording demonstrating folding the parameter list of a function together with its body

  • #20185 include enum variants in world symbols.

  • #20109 make generate_new work for tuple structs.

Fixes

  • #20192 fix a panic in documentation rendering.
  • #20180 always bump in the parser in err_and_bump.
  • #20200 revert "re-enable fixpoint iteration for variance computation".
  • #20212 fix dyn inlay hints with parantheses and don't display them on HRTBs.
  • #20210 make naked_asm! safe to call and fix global_asm!.
  • #20232 normalize projection types before const eval.
  • #20235 fix where clause position in trait associated item completion.

Internal Improvements

  • #20219 outline parts of ExpressionStore into a different allocation.
  • #20198, #20211, #20218 migrate pull_assignment_up, convert_named_struct_to_tuple_struct, convert_match_to_let_else, generate_impl and remove_dbg assists to SyntaxEditor.

See also the changelog post.

2025-07-09

09 Jul 08:42
e429bac
Compare
Choose a tag to compare

Commit: e429bac
Release: 2025-07-09 (v0.3.2533)

New Features

  • #20185 include enum variants in world symbols.

Fixes

  • #20192 fix a panic in documentation rendering.
  • #20180 always bump in the parser in err_and_bump.
  • #20200 revert "re-enable fixpoint iteration for variance computation".

Internal Improvements

  • #20198 migrate pull_assignment_up assist to SyntaxEditor.

2025-07-07

07 Jul 05:29
0ac6559
Compare
Choose a tag to compare

Commit: 0ac6559
Release: 2025-07-07 (v0.3.2527)

New Features

Fixes

  • #20151 only remove keyword prefixes (macro@ or macro ) from links in the docs if the target is inferred.
  • #20158 don't warn about the proc macro server when the sysroot is missing.
  • #20160 reduce diagnostic range for macro_calls!.
  • #20120 fix value resolution in match patterns.
  • #20161 fix closure capture analysis for let expressions.
  • #20167 improve #[derive(Default)] expansion.
  • #20031 respect length limit and improve adjustment hint tooltips.
  • #20179 handle divergence in destructuring assignments.
  • #20159 always couple --compile-time-deps with --all-targets.
  • #20170 improve flycheck and build script progress reporting.
  • #20112 add workaround for missing Delimiter::None support to built-in macros.
  • #20126 improve panic message on discover command spawning errors.
  • #20148 honor rust-analyzer.cargo.noDeps option when fetching sysroot metadata.

Internal Improvements

  • #20175 (first contribution) remove special handling for box patterns in match_check.
  • #20124 remove last use of rustc_pattern_analysis::Captures.
  • #20156 restructure proc macro loading erros.
  • #20157 re-enable fixpoint iteration for variance computation.
  • #20184 remove dead field from InferenceContext.
  • #20169 skip unnecessary BodySourceMap's eq.
  • #20134, #20135, #20136, #20137, #20165 migrate replace_is_method_with_if_let_method, promote_local_to_const, toggle_macro_delimiter, wrap_unwrap_cfg_attr and unmerge_match_arm assists to SyntaxEditor.
  • #20132 add AsMut, Borrow and BorrowMut to minicore.
  • #20144 add load_workspace_into_db version of load_workspace.
  • #19923 bump salsa.

See also the changelog post.

2025-06-30

30 Jun 05:07
6df1213
Compare
Choose a tag to compare

Commit: 6df1213
Release: 2025-06-30 (v0.3.2519)

New Features

  • #20077 (first contribution) take an optional "args": "cursor" in the VS Code "Run" command.
  • #19546 highlight return values as related to match / if / =>.
  • #20100 lower PointeeSized to ?Sized to support the new Sized trait hierarchy.
  • #20105 parse new [const] Trait syntax.

Fixes

  • #20110 don't show float completions on integer literals.
  • #20096 don't show notifications on failed rustfmt calls.
  • #20121 don't append --compile-time-deps to build script commands.
  • #20073 use ROOT hygiene for args in the new format_args! expansion.
  • #20069 fix cargo project manifest not pointing to the workspace root.
  • #20072 respect configured build.target-dir.
  • #20061 don't wrap exit points with the right type in "Wrap return type".
  • #20103 prettify AST in PathTransform if it's coming from a macro.
  • #20080 clean up and expand folding_ranges.
  • #20092 don't complain about rustc workspace loading if it's not required.
  • #20036 don't default to 'static for trait object lifetimes.

Internal Improvements

  • #20012 (first contribution) bump literal-escaper.
  • #20088 de-Arc trait items query.
  • #20087 short-circuit a couple of queries.
  • #20106 make the VariantFields query more idiomatic.
  • #20098 unify formatting of progress messages.
  • #20104 clean up provideCodeActions VS Code hook.
  • #20116 cancel CI workflow only after the main matrix has finished.
  • #20084 fix CI job cancellation on Windows.

See also the changelog post.

2025-06-23

23 Jun 06:14
0100bc7
Compare
Choose a tag to compare

Commit: 0100bc7
Release: 2025-06-23 (v0.3.2509)

New Features

  • #19939 add rust-analyzer.assist.preferSelf to prefer Self instead of the enum name in assists.
  • #20047 use cargo check --compile-time-deps when available.
  • #20020 reload workspaces when cargo config changes.
  • #20018 copy lockfile into target directory before invoking cargo metadata.
  • #20056 support the new format_args! expansion in 1.89.
  • #20014 show what cargo metadata is doing.

Fixes

  • #19945 add quickfix to the private-field diagnostic.
  • #20025 (first contribution) hide imported private methods if "private editable" is disabled.
  • #20041 revert "turn BlockId into a #[salsa::tracked]".
  • #20022 never make type mismatch diagnostic stable, even when there is a fix.
  • #20023 improve completions in if / while expression conditions.
  • #20039 fix closure capturing in let expressions.
  • #20035 pass --color=always from Test Explorer.

Internal Improvements

  • #19495 start infesting ide crates with a 'db lifetime.
  • #20046 add hir::TypeParam::parent method.
  • #20050 improve documentation for excluding imports from symbol search.

See also the changelog post.