Skip to content

Releases: rust-lang/rust-analyzer

2025-04-28

28 Apr 05:40
d8887c0
Compare
Choose a tag to compare

Commit: d8887c0
Release: 2025-04-28 (v0.3.2441)

New Features

Fixes

  • #19622 (first contribution) fix some bugs in the string rewriting assists.
  • #19604 (first contribution) add semicolon to use completion.
  • #19657 improve support for offset_of!().
  • #19636 fix completion_snippets_custom config always erroring out.
  • #19650 support unstable UnsafePinned struct in type layout computation.
  • #19647 fix panics in inlay hints that produce empty text edits for closure return types.
  • #19684 report error when unable to parse a DiscoverProjectMessage.

Internal Improvements

  • #19678 arena-allocate LifetimeRefs.
  • #19655 fold hygiene map into the bindings themselves.
  • #19677 remove WherePredicateTypeTarget.
  • #19644 make predefined symbols const instead of static.
  • #19688 add some missing shrink_to_fit()s and upgrade dashmap and hashbrown.
  • #19624 bump chalk to make the generic parameter order match rustc.
  • #19661 bump salsa.

See also the changelog post.

2025-04-21

21 Apr 07:40
723121e
Compare
Choose a tag to compare

Commit: 723121e
Release: 2025-04-21 (v0.3.2431)

New Features

Fixes

  • #19576 (first contribution) ignore more rustfmt parsing errors.
  • #19596 include generic parameters and default values in signature help.
  • #19590 add pub(crate) mod option for unlinked files.
  • #19588 include inline format macro variables in "Extract into function".
  • #19589 fix highlighting for tail expr in labelled blocks.
  • #19619 sort notable traits in hover.
  • #19612 fix a bug with predicate lowering of associated items.
  • #19613 fix panic with implemented trait method that declares an extra lifetime parameter.
  • #19579 prevent panics on cyclic dependencies dependency between closures.
  • #19628, #19642 don't ignore config values that fail to parse.

Internal Improvements

  • #19578 (first contribution) normalize drive letters in the VS Code extension.
  • #19638, #19639 (first contribution) add anchors to configuration options and fix dead links to the manual.
  • #19616 make hir-ty non-diagnostic queries transparent (saves 56 MB on analysis-stats self).
  • #19617 make HirFileId, EditionedFileId and macro files salsa structs (saves 165 MB on analysis-stats self).
  • #19591 use ast::TokenTree in make::expr_macro.
  • #19572 migrate expand_rest_pattern to SyntaxEditor.
  • #19568 migrate destructure_struct_binding to SyntaxEditor.
  • #19569 return correct types for make::expr_* methods.
  • #19600 pin the rustc used for the proc-macro-src CI job.
  • #19521 cancel parallel CI jobs if tests fail.

See also the changelog post.

2025-04-14

14 Apr 05:53
8365cf8
Compare
Choose a tag to compare

Commit: 8365cf8
Release: 2025-04-14 (v0.3.2379)

New Features

  • #19255, #19554 (first contribution) add "Locate child modules" command.

Fixes

  • #19432 fix another false positive invalid cast diagnostic.
  • #19563 walk const block expressions for unsafety checking.
  • #19541 prefer imports of matching types for argument lists.
  • #19461 fix shadowing of modules by types.
  • #19571 fix missing test update notifications when there are hyphens in the target name and exclude dependencies from "Run all".

Internal Improvements

  • #19425 (first contribution) make drop glue info less verbose.
  • #19462, #19558, #19570 lower TypeRefs before type inference.
  • #19536 port closure inference from rustc.
  • #19566 use the callable_item_signature query in dyn-compatibility checks.
  • #19550 turn LifetimeRef into an enum.
  • #19562 tweak invalid signature bitflags.
  • #19573 render sigantures in "View HIR" command.
  • #19512 fix some stdx lints.
  • #19559 switch to Rust 1.86.
  • #19565 add prime-caches subcommand.

See also the changelog post.

2025-04-07

07 Apr 05:25
588948f
Compare
Choose a tag to compare

Commit: 588948f
Release: 2025-04-07 (v0.3.2370)

Fixes

  • #19526 (first contribution) use constant, not const in rustdoc links.
  • #19447 add impl for completion.
  • #19515 don't drop references with more than one definition.
  • #19501 fix a regression in MBE expansion.
  • #19531 fix format_args! lowering for 1.87.
  • #19522 fix panic in "View crate graph".
  • #19523 fix proc macro server spawning.
  • #19514 fix bracket colorization in strings.

Internal Improvements

  • #19490 (first contribution) fix panic in analysis-stats progress line slicing.
  • #19492 avoid a needless block_def_map() access.
  • #19496 replace some #[salsa::invoke]s with invoke_actual.
  • #19494 unwrap some unnecessary Arcs.
  • #19482 clean up parameter name inlay hint filtering heuristics.
  • #19509 drop AssistKind::None.
  • #19484 fix new lints in nightly.
  • #19520 align usage of default and new with style guide.
  • #19485 clean up CI a bit.
  • #19493 disable rust-cache in CI.
  • #19533 set up a job matrix for rust-cross.
  • #19519 add rust-analyzer.cargo.noDeps option.

See also the changelog post.

2025-03-31

31 Mar 05:31
fb133c8
Compare
Choose a tag to compare

Commit: fb133c8
Release: 2025-03-31 (v0.3.2362)

New Features

  • #19375 allow crate authors to disable completions using #[rust_analyzer::completions].
  • #19388 parse unsafe record fields.
  • #19347 add diagnostic for ambiguous &impl 'a + Sized.

Fixes

  • #19475 (first contribution) fix debug source map.
  • #19433 fix let else to if let else conversion.
  • #19435 fix ranges in closure return inlay hints.
  • #19466 fix a bug in orphan rule check.
  • #19474 fix, clarify and require a value for proc_macro_cwd of CrateData.

Internal Improvements

  • #19440 replace custom ThinVec with the thin-vec crate.
  • #19451 use medium durability for crate graph changes, high for library source files.
  • #19359 emit lines of code and item tree counts in analysis-stats.
  • #19457 remove salsa dependency from proc macro server again.
  • #19446, #19448 run tests under cargo miri.
  • #19422 clean up VS Code output channels, drop debug.openDebugPane.
  • #19430 bump dependencies.

See also the changelog post.

2025-03-24

24 Mar 05:46
37acea8
Compare
Choose a tag to compare

Commit: 37acea8
Release: 2025-03-24 (v0.3.2353)

Fixes

  • #19384 fix stale "Building CrateGraph" report.
  • #19416 handle multiple #[repr(..)] attributes correctly.
  • #19362 speed up resolving a "Generate delegate method" assist.
  • #19348 add text edit support for return type hints on non-block body closures.
  • #19413 properly calculate the layout of unsized tuple pointers.
  • #19320 mark manual trait implementations as unsafe when replacing a derive.
  • #19400 fix syntax highlighting for &raw const / &raw mut in standalone files.
  • #19397 add postfix completion for const block.
  • #19005 fix testing of packages with multiple targets.

Internal Improvements

  • #19408 replace #[derive]s to reduce codegen burden for generated syntax types.
  • #19390 do not use Expander in associated item lowering.
  • #19412 remove some unnecessary usages of Semantics.
  • #19429 remove unused dependencies.
  • #19419 render layout and other extra information when hovering Self.
  • #19329 add some docs to proc-macro-api.
  • #19379 bump Edition::CURRENT to 2024.
  • #19378 trigger salsa LRU at the end of analysis-stats.
  • #19315 do not generate docs with in xtask codegen --check.
  • #19391 clean up proc-macro-srv CI job.

See also the changelog post.

2025-03-17

17 Mar 06:29
b0632f7
Compare
Choose a tag to compare

Commit: b0632f7
Release: 2025-03-17 (v0.3.2345)

Announcement

This release brings two major changes, which might make it slightly spicier than usual.

The first is upgrading to the latest version of salsa, the incremental evaluation framework used by rust-analyzer.
This will make it possible to implement parallel evaluation and persistency in the future.

The second change is to use salsa for the crate graph, making it incremental.
Adding or removing a dependency, or editing a build script or proc macro, will now invalidate only the affected crates instead of the entire workspace.

New Features

  • #19079, #19332 warn when a rename will change the meaning of the program:

    Screen.Recording.2025-02-02.015127.mp4

  • #18964 put a new batch of salsa on rust-analyzer.

  • #19337 put salsa on the crate graph.

  • #19271 add "Convert for into while let" assist.

Fixes

  • #19344 add icons to VS Code views:

    Screenshot showing an icon on the Explorer: Rust Dependencies sidebar

  • #19252 fix syntax fixup producing invalid punctuation.

  • #19333 fix diagnostics being cleared right after being received.

  • #19330 normalize projections in evaluated const display and layout calculation.

  • #19363 display varargs in completion detail.

  • #19325 rank ADT constructors as such for completion scoring.

  • #19326 add missing name-ref parents to syntactic highlighting.

  • #19327 fix path macro hygiene.

  • #19311 log build script error output for Cargo projects.

  • #19351 don't panic when the crate graph isn't ready.

  • #19356 avoid recursively debug printing crates.

Internal Improvements

  • #19314 (first contribution) impl HasSource for VariantDef.
  • #19367 drop legacy salsa.
  • #19354 prepare for Return Type Notation (RTN) and add a diagnostic.
  • #19232 bump chalk to get support for async closures.
  • #19305 vendor query-group-macro in rust-analyzer.
  • #19364 add missing with_durability calls.
  • #19368 remove CrateGraphBuilder::iter_mut.
  • #19236 switch to the 2024 edition.
  • #19369 do not error out for actions with no data to resolve.
  • #19366 remove legacy SyntaxContextId re-export.
  • #19228 split up some ADT queries.
  • #19355 render root syntax contexts more clearly.
  • #19343 make GenericParamsCollector::type_or_consts private.
  • #19328 run proc-macro server tests in a separate CI job.
  • #19334 remove generated mdbook files.

See also the changelog post.

2025-03-10

10 Mar 07:06
5e7dd31
Compare
Choose a tag to compare

Commit: 5e7dd31
Release: 2025-03-10 (v0.3.2337)

New Features

  • #19243 allow unsetting default #[cfg]s.
  • #19265 add diagnostic for dangling dyn and impl.

Fixes

  • #19226 (first contribution) improve completions that return a reference.
  • #19279 (first contribution) add letm and improve let keyword completion.
  • #19308 bring back support for Rust 1.78 projects.
  • #19261 support tuple structs in expand_rest_pattern.
  • #19324 fix adding of brackets in "Inline variable".
  • #19297 fix completion relevance check.
  • #19290 warn when cargo metadata fails.
  • #19292 handle modifiers in punctuation highlighting.
  • #19274 don't highlight unsafe definitions as unsafe.
  • #19295 make "rust-analyzer: Run" available in manifest file.

Internal Improvements

  • #19288 (first contribution) use size_of from the prelude.
  • #19244, #19275 warn when the active toolchain is too old.
  • #19286 twiddle with the rustup invocation on CI.

See also the changelog post.

2025-03-04

04 Mar 09:56
02862f5
Compare
Choose a tag to compare

Commit: 02862f5
Release: 2025-03-04 (v0.3.2330)

New Features

  • #19243 allow unsetting default #[cfg]s.

Fixes

  • #19226 (first contribution) improve completions that return a reference.
  • #19261 support tuple structs in expand_rest_pattern.

Internal Improvements

See also the changelog post.

2025-03-03

03 Mar 06:06
81ff38f
Compare
Choose a tag to compare

Commit: 81ff38f
Release: 2025-03-03 (v0.3.2328)

Announcement

The x86-64, AArch64 and ARM Linux binaries now target GLIBC 2.28, and will keep doing so for the foreseeable future, which might be until June 2029.

In addition, this version drops support for toolchains older than 1.82.

New Features

  • #18987 calculate drop glue and show it on hover.
  • #19259 add "flip or-pattern" assist.
  • #19230 set up Zig on CI and start using it in rust-analyzer.

Fixes

  • #19197 (first contribution) update insta inline snapshot using cargo insta when clicking "Update Test" runnable.
  • #19246 (first contribution) add anchor for intra-doc links to associated items.
  • #19266 (first contribution) add identifier to pull diagnostic LSP capabilities.
  • #19211 include private items in completions for local crates.
  • #19223 support target features implications in target_feature 1.1.
  • #19204 allow package/feature format for features.
  • #19241 map crate ids for proc macros in sysroot crate graph construction.
  • #19249 avoid unnecessary parantheses in prefix adjustment hints.
  • #19250 use precedence calculation for parentheses in inline_local_variable.
  • #19221 add tab stop to impl body in generate_trait_impl.

Internal Improvements

  • #19239 (first contribution) configure out performance counters on ohos to fix compilation.
  • #19096 allow rust-project.json to specify sysroot workspace.
  • #19225 migrate remove_mut, remove_parantheses and remove_unused_param to SyntaxEditor.
  • #19171 migrate apply_demorgan to SyntaxEditor.
  • #19253 migrate convert_bool_then to SyntaxEditor.
  • #19251 remove syntax editing from parenthesis computation.
  • #19257 clean up syntax highlighting.
  • #19219 vendor always-assert into stdx.
  • #19237 enable doctests.
  • #19218 make release builds from source non-incremental.
  • #19194 bump VS Code extension deps.

See also the changelog post.