Skip to content

Releases: rust-lang/rust-analyzer

2024-01-01

01 Jan 12:33

Choose a tag to compare

Changelog #214

Commit: 9db5155
Release: 2024-01-01 (v0.3.1791)

Fixes

  • #16221 (first contribution) fix panic in some macros due to unhandled SyntaxContextId::SELF_REF.
  • #16096 (first contribution) update VS Code extension panic problem matcher.
  • #16224 fix handling of hygiene in the presence of SyntaxContextId::SELF_REF.

Internal Improvements

  • #16217 (first contribution) simplify implementation of apply_document_changes.

See also the changelog post.

2023-12-25

25 Dec 07:41

Choose a tag to compare

Changelog #213

Commit: 85fb463
Release: 2023-12-25 (v0.3.1782)

New Features

  • #16088 implement a rust-analyzer span-backed proc-macro server mode.

Fixes

  • #16155 (first contribution) don't assume ASCII in remove_markdown.
  • #16152 resolve alias before resolving enum variant.
  • #16163 de-duplicate annotations.
  • #16165 update metavariable expression implementation.
  • #16066, #16185 remove unnecessary braces after with unused imports.
  • #16167 fully remove dummy spans.
  • #16175 correctly set and mark the proc-macro spans.
  • #16178 fix span marking for built-in function-like macros.
  • #16184 fix Semantics node caching in completion analysis.
  • #16158 desugar doc comments correctly for MBE.
  • #16137 complete exported macros in #[macro_use($0)].

Internal Improvements

  • #16182 update world symbols request definiton, prefer focus range for macros.
  • #16183 clean up Expander a bit.
  • #16143 move proc macro knowledge out of base-db and into hir-expand.
  • #16145 split out a span crate.
  • #16150 move out WithFixture into dev-only crate.
  • #16151 add minimal support for the 2024 edition.
  • #16144 sync from downstream.
  • #16149 don't fail changelog generation on missing PRs.

See also the changelog post.

2023-12-18

18 Dec 06:53

Choose a tag to compare

Changelog #212

Commit: 21b06c1
Release: 2023-12-18 (v0.3.1774)

Fixes

  • #15887 (first contribution) fix tuple to named struct conversion inside macro calls some more.
  • #16106 fix syntax bridge assigning invalid spans to lifetime tokens.
  • #16061 fix fragment parser on incomplete parses.
  • #16130 remove subtrees with fake spans in syntax fix-up.
  • #16131 fix false positive type mismatch in const reference patterns.
  • #16094 replace doc_comments_and_attrs with collect_attrs, second round.
  • #16089 query for nearest parent block around the hint to resolve.

Internal Improvements

  • #16099 improve import asset performance a bit, bump limit, and shorten the paths.
  • #16125 run rust-analyzer on rustc UI tests in metrics.
  • #16115 update built-in attributes.
  • #16102, #16104 publish and bump line-index.
  • #16123 remove ModuleId from TypeOwnerId.
  • #16098 sync from downstream.

See also the changelog post.

2023-12-11

11 Dec 06:16

Choose a tag to compare

Changelog #211

Commit: 457b966
Release: 2023-12-11 (v0.3.1766)

New Features

  • #15959 replace TokenMap with an abstraction that matches reality.

  • #16027 add support for implicit format args:

    rename-format-args.mp4

  • #16034 support multiple navigation targets when the focus range is in the macro definition site:

    Screen recording showing two Go to definition results for tcx.def_span in the rustc source code

  • #15990 diagnose extra trait impl items:

    Screenshot showing an error on a trait impl item that's not a member of original trait

  • #15627 prioritize import suggestions based on the expected type:

    Screenshot showing the flyimport pop-up prioritizing std::sync::atomic::Ordering in a fetch_add call

Fixes

  • #15896 (first contribution) show placeholder while getting runnable list from server:

    Screenshot showing a Looking for runnables... in the picker before cargo test and cargo check show up

  • #15515 (first contribution) improve handling of binary expressions on the left-hand side of "Flip binary expression".

  • #16009 (first contribution) don't search for ControlFlow as string in "Extract function".

  • #16028 make drop inlay hints more readable:

    Screenshot showing drop hints appearing now after the semicolon

  • #16024 fix runnables working directory on Windows.

  • #16054 fix token downmapping being quadratic.

  • #16016 don't insert parantheses around fields in struct literals.

  • #16041 fix WideChar offsets calculation in line-index.

  • #16073 replace doc_comments_and_attrs with collect_attrs.

  • #16035 fix diagnostics panicking when resolving to different files due to macros.

  • #16037 don't print proc-macro panic backtraces in the logs.

  • #15486 fix item tree lowering pub(self) to pub().

  • #15705 resolve Self type references in delegate method assist.

  • #16048 fix concat_bytes! expansion emitting an identifier.

  • #16058 reduce spans for unresolved field and method diagnostics.

  • #16060 fix completion in format_args! with invalid template.

  • #16078 fix "View Mir", "View Hir" and "Interpret function" when the caret is inside a macro.

  • #16039 don't emit missing items diagnostic for negative impls.

  • #16045 fix panic with closure inside array length.

  • #16055 fall back to method resolution on unresolved field access.

Internal Improvements

  • #16036 (first contribution) make ParamLoweringMode accessible.
  • #15986 use triomphe::Arc::from_iter.
  • #16042 bump salsa.
  • #16022 don't explicitly warn against semicolon_in_expressions_from_macros.
  • #16038 publish lsp-server 0.7.5.
  • #16043 bump and unlock some dependencies.

See also the changelog post.

2023-12-04

04 Dec 06:49

Choose a tag to compare

Changelog #210

Commit: e402c49
Release: 2023-12-04 (v0.3.1756)

New Features

  • #15879 implement completion for callable fields:

    Screenshot showing a struct field of fn() type in the completion results

  • #16000 initial support for implicit drop inlay hints (rust-analyzer.inlayHints.implicitDrops.enable):

    Screenshot showing drop(var) inlay hints when var is dropped

Fixes

  • #15961 (first contribution) improve error handling for top-level let statements.
  • #15993 (first contribution) use package root as working directory when launching the debugger.
  • #15970 fix variant resolution through for type aliases.
  • #15994 report error on comma after base struct functional update syntax.
  • #15857 fix spacing after using "Remove redundant parentheses".
  • #15971 don't report missing match arms for empty match body.

Internal Improvements

  • #15946 (first contribution) simplify workspace de-duplication.
  • #15985 bump triomphe.
  • #15912 remove unused PhantomData.

See also the changelog post.

2023-11-27

27 Nov 06:18

Choose a tag to compare

Changelog #209

Commit: 237712f
Release: 2023-11-27 (v0.3.1748)

New Features

  • #15956, #15962 (first contribution) improve completion label details display:

    Screenshot showing the completion label details like the originating trait for a method displayed in gray by VS Code

  • #15846 (first contribution) add VS Code option to suppress internal error notifications.

Fixes

  • #15940 ensure renames happen after edits.
  • #15911 handle default constant values in trait_impl_missing_assoc_item diagnostic.
  • #15825 better resolve associated item with type bound.
  • #15754 de-dup duplicate crates with differing origins in CrateGraph construction.

Internal Improvements

  • #15894 (first contribution) make LSP initialization cancellable.
  • #15944 (first contribution) update Arch Linux package URL.
  • #15921 use PathSegment::qualifying_trait.
  • #15960 replace option.map(cond) == Some(true) with option.is_some_and(cond).
  • #15967 switch to our own salsa fork.

See also the changelog post.

2023-11-20

20 Nov 06:53

Choose a tag to compare

Changelog #208

Commit: 255eed4
Release: 2023-11-20 (v0.3.1740)

New Features

  • #15891 diagnose some orphan trait impl cases:

    Screenshot showing an error on impl Copy for String

  • #15895 diagnose missing associated items in trait impls:

    Screenshot showing an error on a trait implementation with a missing associated const value

  • #15893 diagnose incorrect unsafety for trait impls:

    Screenshot showing an error on a safe trait implementation of an unsafe trait, and on an unsafe implementation of a safe trait

Fixes

  • #15901 diagnose everything in nested items.
  • #15903 make line! and column! expand to literals.

Internal Improvements

  • #15875 fix PathSegment grammar.
  • #15899, #15917 sync from downstream.
  • #15874 migrate assists to the structured snippet API, part 4.
  • #15925 remove debugging code in path resolution.
  • #15902, #15913 bump some deps.
  • #15830 VS Code: expose workspaces to other extensions, remove addProject command.
  • #15900 disable VSIX builds for win32-ia32, which VS Code no longer supports.
  • #15904 bump minimum supported VS Code to 1.78.

See also the changelog post.

2023-11-13

13 Nov 06:53

Choose a tag to compare

Changelog #207

Commit: 416e9c8
Release: 2023-11-13 (v0.3.1730)

New Features

  • #15847 preview struct fields on hover:

    Screen recording showing that hover tooltips on structs now include a list the fields

  • #15871 add config for preferring / ignoring prelude modules when inserting imports.

Fixes

  • #15860 truncate closure capture place for raw pointer.
  • #15864 be more lax when finding Self references.
  • #15854 ignore #[doc(hidden)] when implementing missing members.
  • #15866 improve check when overriding expansion limit for include!.

Internal Improvements

  • #15881 (first contribution) fix JSON syntax in VS Code settings samples.
  • #15849 update rustc dependencies.
  • #15880 include TOML files in the vfs.

See also the changelog post.

2023-11-06

06 Nov 06:25

Choose a tag to compare

Changelog #206

Commit: c1c9e10
Release: 2023-11-06 (v0.3.1722)

New Features

  • #15819 (first contribution) skip token tree limit for include! macro calls.

  • #15832 add generate_mut_trait_impl assist:

    Screen recording showing the assist adding an IndexMut impl from an existing Index one

Fixes

  • #15827 (first contribution) add formatters category to VSCode metadata.

  • #15788 allow importing traits as _:

    Screen recording showing both import Foo and import Foo as _ being available in the quick fix menu

  • #15834 fix docs path for derive macros.

See also the changelog post.

2023-10-30

30 Oct 05:38

Choose a tag to compare

Changelog #205

Commit: f493207
Release: 2023-10-30 (v0.3.1713)

Fixes

  • #15809 make extract_variable assist easier to trigger:

    Screen recording showing the assist triggerring on a method call, if statement and array, without selecting them first.

  • #15780 import trait if needed for unqualify_method_call assist:

    Screen recording showing an import being added when the assist is used.

Internal Improvements

  • #15806 bump scip dependency.

See also the changelog post.