Skip to content

Releases: rust-lang/rust-analyzer

nightly

15 Nov 00:41
fc98e06
Compare
Choose a tag to compare
nightly Pre-release
Pre-release
Merge pull request #18503 from SomeoneToIgnore/kb/better-resolve-inde…

2024-11-11

11 Nov 07:03
30e71b6
Compare
Choose a tag to compare

Commit: 30e71b6
Release: 2024-11-11 (v0.3.2180)

New Features

  • #18473 include extern blocks and macros in file outline.

Fixes

  • #18475 support new #[rustc_intrinsic] attribute and fallback bodies.

Internal Improvements

  • #18493 (first contribution) update supported debug engines in configuration.
  • #18486 change minimum VS Code version from 1.78 to 1.83.

See also the changelog post.

2024-11-04

04 Nov 09:33
a341d59
Compare
Choose a tag to compare

Commit: a341d59
Release: 2024-11-04 (v0.3.2172)

New Features

  • #18312 (first contribution) include let statements in file outline.
  • #18420 support +#[cfg(true)]+ and +#[cfg(false)]+.
  • #18469 show static values on hover.
  • #18470 allow interpreting consts and statics with the Interpret command.
  • #18385 add assist to generate a type alias for a function.

Fixes

  • #18436 only render type layout info on definitions, not usages.
  • #18422 properly resolve prelude paths in modules inside blocks.
  • #18413 allow public re-exports of extern crate imports.
  • #18432 honor diagnostic refresh capability.
  • #18382 fix flyimport for aliased functions and modules.
  • #18446 only parse safe as a contextual keyword in extern blocks.
  • #18453 fix parsing of patterns with leading |.

Internal Improvements

  • #18304 (first contribution) add developer setup instructions.
  • #18437 (first contribution) publish test-fixture as ra_ap_test_fixture.
  • #18256 (first contribution) start using Option::is_none_or.
  • #18074 build source map for hir_def::TypeRefs.
  • #18427 clean up TypeRef lowering.
  • #18447 avoid interior mutability in TyLoweringContext.
  • #18448 move child_by_source from hir-def to hir.
  • #18421 move text-edit into ide-db.
  • #18412 stop producing .gz artifacts for Windows.

See also the changelog post.

2024-10-28

28 Oct 06:15
3b3a87f
Compare
Choose a tag to compare

Commit: 3b3a87f
Release: 2024-10-28 (v0.3.2162)

A Note on Windows Artifacts

The next release will stop including .gz artifacts for Windows.
These are harder to use than the .zip ones, which should be used instead.

New Features

  • #18294 (first contribution) support Option in "Wrap/Unwrap return type".
  • #18362, #18370 (first contribution) support "Go to definition" on range operators and patterns.
  • #18359 (first contribution) add option to not start the server on initialization.
  • #18264 implement mixed-site hygiene.
  • #18404, #18408 implement pull model for diagnostics.
  • #18349 render aliased type documentation when alias doesn't have any.
  • #18418 split macro-error diagnostic so users can ignore parts of it.

Fixes

  • #18407 (first contribution) fix formatting on welcome page.
  • #18376 add text edits to more inlay hints.
  • #18361 fix token downmapping failing for include! inputs.
  • #18254 nail destructuring assignment down once and for all.
  • #18337 don't show private items from modules nested in blocks in completions.
  • #18360 improve completions for extern blocks.
  • #18371 fix parsing of use bounds.
  • #18388 Fix checking for false labelDetailsSupport value.
  • #18395 add missing target_has_atomic and target_has_atomic_load_store cfg flags.
  • #18390 prevent public re-exports of private items.
  • #18417 correctly handle #"" before the 2024 edition.
  • #18419 put leading | in patterns under OrPat.
  • #18415 mark "Remove dbg!" as a quick fix for better prioritization.
  • #18366 fix Markdown display in status bar message.
  • #18399 respect config to disable native diagnostics.
  • #18386 don't crash when local time offset is unavailable.

Internal Improvements

  • #18372 (first contribution) switch CI from bors to merge queues.
  • #18373 merge separate inlay hints targeting the same range.
  • #18391 log original syntax on panic.
  • #18394, #18396 pretty-print Config in "Status" command.
  • #18402 improve proc macro error message for failed build scripts.
  • #18410 invert token iteration order in macro mapping.
  • #17954 update rustc-hash to version 2.
  • #18392 swap query call order in file_item_tree_query to help with caching issue.
  • #18409 only construct a resolver during macro descension when needed.
  • #18368 add test for LSIF macro-generated constants.
  • #18405 update changelog generation for merge queues.

See also the changelog post.

2024-10-21

21 Oct 06:31
Compare
Choose a tag to compare

Commit: 9323b53
Release: 2024-10-21 (v0.3.2154)

New Features

  • #18152 highlight exit points of async blocks.
  • #18291 respect references.excludeTests in Call Hierarchy.
  • #18350, #18354 add initial support for safe in extern blocks.
  • #18292 support renaming self parameters in functions.

Fixes

  • #18265, #18320 (first contribution) add support for LLDB-DAP.
  • #18226 (first contribution) fix parsing of use in generic parameters.
  • #18229 (first contribution) make rustfmt.overrideCommand relative to project, not workspace root.
  • #18336 (first contribution) increase macro expansion token limit once more.
  • #18278 do not consider matching of places that evaluate to ! to diverge, and disallow coercions from them.
  • #18217 stop doing cast checks for unknown pointer kinds.
  • #18252 do not consider mutable usage of deref to *mut T as deref_mut.
  • #18299 fix Ok wrapping quick fix for return statements.
  • #18275 don't expand #[test_case].

Internal Improvements

  • #18242 don't resolve extern crates in import fixed point resolution.
  • #18216 return structs instead of tuples from OpQueues.
  • #18331 support more trivial types in is_sized check.
  • #17990 use local time when formatting logs.
  • #18243, #18300 clamp LSP columns to line length.
  • #18328 fix running analysis-stats against the standard libraries on CI.
  • #18335 fix .editorconfig glob.

See also the changelog post.

2024-10-14

14 Oct 06:09
Compare
Choose a tag to compare

Commit: d7628c0
Release: 2024-10-14 (v0.3.2146)

Fixes

  • #18246 fix crash in prettify_macro_expansion() when the node isn't the whole file.
  • #18245 fix detail label in completions.
  • #18247 fix something_to_resolve sometimes being reset in completion_item
  • #18269 display constructor types in a nicer way.
  • #18289 fix panic on JSON projects with relative buildfile paths.

Internal Improvements

  • #18266 use macos-13 runners and bump MACOSX_DEPLOYMENT_TARGET to 13.0.
  • #18281 stop using spawnSync in the VS Code extension.

See also the changelog post.

2024-10-07

07 Oct 06:04
Compare
Choose a tag to compare

Commit: 2b750da
Release: 2024-10-07 (v0.3.2137)

New Features

  • #18085 provide an option (rust-analyzer.cfg.setTest) to not set cfg(test).

Fixes

  • #18207 (first contribution) suggest UpperCamelCase instead of CamelCase to match rustc.
  • #18210 fix resolution of labels inside macro calls.
  • #18206 handle block expressions as modules when finding their parents.
  • #18219 fix incorrect bootstrap error message.
  • #18255 use external stack in borrow check DFS.

Internal Improvements

  • #18167 send less data for completions, if possible.
  • #18234 filter out opaque tokens when descending into macros for some IDE features.
  • #18195 remove Default from OpQueue.
  • #18227 add JSON tracing Layer for profiling start-up.

See also the changelog post.

2024-09-30

30 Sep 03:27
Compare
Choose a tag to compare

Commit: 822644d
Release: 2024-09-30 (v0.3.2129)

New Features

  • #17923 (first contribution) add option to rebuild project before restarting debugging.
  • #18180 index workspace symbols at start-up rather than on the first search.

Fixes

  • #18160 fix name resolution with renamed imports and shadowing.
  • #18164 handle import aliases in remove_unused_imports.
  • #18161 improve reference handling in consuming postfix completions.
  • #18172 support #[expect] in attribute completion and hover.
  • #18162 report lifetime GATs as object-unsafe.
  • #18123 disambiguate package names in flycheck.
  • #18166 fix a bug in span map merging.
  • #18184 pass --all-targets for build scripts in more CLI commands.
  • #18193 don't report start-up error when a workspace discovery command is configured.

Internal Improvements

  • #18205 (first contribution) rename object-safety to dyn-compatibility.
  • #18196 add SyntaxFactory to simplify generating nodes with syntax mappings.
  • #18181 add tracing to project discovery and VFS loading.
  • #18192 include rust-project.json build files in VFS.
  • #18157 respect --disable-proc-macros in analysis-stats.
  • #18208 allow overriding proc macro server in analysis-stats.
  • #18188 bump MSRV to 1.81.
  • #18175 drop COMPLETION_MARKER Easter egg.

See also the changelog post.

2024-09-23

23 Sep 08:49
Compare
Choose a tag to compare

Commit: 1301e42
Release: 2024-09-23 (v0.3.2121)

Note

Because of infrastructure issues, this release is not available on GitHub Releases.

New Features

  • #18135 add diagnostics for unsafe_op_in_unsafe_fn.
  • #18131 replace $crate in user-visible macro expansions.
  • #18151 support ${concat(...)} metavariable expressions.
  • #18137 support expr_2021 fragment specifiers.

Fixes

  • #18136 (first contribution) don't lint names of #[no_mangle] extern functions.
  • #18128 don't show lints and quick fixes in code generated by external macros.
  • #18117 always cache macro expansion root nodes in Semantics.
  • #18139 extend type_variable_table when index is larger than the table size.
  • #18146 remove check that text of parse_expr_from_str() matches the produced parsed tree.
  • #18153 account for rawness in $expr fragments.
  • #18108 take #[cfg_attr] into account for lint attributes.
  • #18132 don't complete ; in closure return expressions.

Internal Improvements

  • #18134 extend SourceChangeBuilder to make make working with SyntaxEditor easier.
  • #18169 temporarily disable GitHub releases.

See also the changelog post.

2024-09-16

16 Sep 06:22
Compare
Choose a tag to compare

Commit: 94b526f
Release: 2024-09-16 (v0.3.2112)

New Features

  • #18038 generate names for tuple struct fields in "Fill match arms".
  • #18018 automatically add semicolon when completing unit-returning function call.

Fixes

  • #18052 (first contribution) don't output hex when inlining integer constants.
  • #18041 improve name suggestions for variables extracted from function calls.
  • #18075 render patterns when hovering on function parameters.
  • #18093 skip diagnostics when casting to dyn Trait.
  • #18092 correctly escape strings in stringify!.
  • #18101 fix false positive error when casting literals.
  • #18106 don't report typed hole error in asm! out operands.
  • #18073 fix "immutable tree" in generate_delegate_trait.
  • #18119 fix printing of constants greater than i128::MAX.
  • #18099 improve handling of lint attributes.
  • #18050 offer replace_qualified_name_with_use on the first segment of a path.
  • #18107 don't emit empty inlay hint parts.
  • #18105 don't panic on invalid LSP notifications from buggy clients.

Internal Improvements

  • #18032 add preliminary SyntaxEditor functionality.
  • #18057 improve testing infra for rust-analyzer.toml.
  • #18080 remove crate graph deduplication logic.
  • #17904 add CLI command to report unresolved references.

See also the changelog post.