Skip to content

Releases: rust-lang/rust-analyzer

2022-12-26

26 Dec 08:03
Compare
Choose a tag to compare

Changelog #161

Commit: 74ae2dd
Release: 2022-12-26

New Features

  • #13699 implement location links for type inlay hints (disabled until Code 1.76 release because of a bug):

    Screen recording showing clicking on inlay hint parts

  • #13817 add option to hide adjustment hints outside of unsafe blocks and functions:

    Screenshot showing an <unsize>&raw mut * on the RHS of let ptr: *mut [u8] = &mut []

Fixes

  • #13805 (first contribution) complete enum variants without parens when snippets are disabled.
  • #13794 fix "parser seems stuck" panics when parsing colossal files.
  • #13795 use the correct edition when formatting code in path dependencies.
  • #13800 don't match let expressions and inline consts in expr MBE fragments.
  • #13820 fix binding mode hints always adding parentheses to or-patterns.
  • #13831 don't autofill associated type trait bounds when generating an implementation.
  • #13764 correctly check for redundant parentheses in the remove_parentheses assist.
  • #13806 skip hints for identity (T -> T) adjustments.
  • #13814, #13818 calculate the TargetDataLayout correctly for the selected target.
  • #13840 handle lifetime variables in CallableSig query.

Internal Improvements

  • #13828, #13829, #13835 (first contributions) fix redundant_clone, explicit_auto_deref, uninlined_format_args clippy warnings.
  • #13830 use a default derives and strip_prefix.
  • #13771 add xtask command for publishing release notes on GitHub Releases.
  • #13804 split inlay hints into modules by type.
  • #13822 thread FamousDefs through the inlay hints.

See also original changelog.

2022-12-19

19 Dec 10:53
Compare
Choose a tag to compare
Auto merge of #13792 - Veykril:flycheck, r=Veykril

Add a command to clear flycheck diagnostics

And document the flycheck notifications

2022-12-12

12 Dec 07:53
Compare
Choose a tag to compare
Auto merge of #13756 - flodiebold:simplify-assoc-item-subst, r=flodie…

2022-12-05

05 Dec 09:51
Compare
Choose a tag to compare
Auto merge of #13721 - Veykril:incoherent-impls, r=Veykril

Support `rustc_has_incoherent_inherent_impls`

Fixes us not resolving `<dyn Error>::downcast` now that `Error` moved to core, while that assoc function is declared in `alloc`.

2022-11-28

28 Nov 10:07
Compare
Choose a tag to compare
Auto merge of #13681 - lowr:fix/extract-function-tail-expr, r=Veykril

fix: check tail expressions more precisely in `extract_function`

Fixes #13620

When extracting expressions with control flows into a function, we can avoid wrapping tail expressions in `Option` or `Result` when they are also tail expressions of the container we're extracting from (see #7840, #9773). This is controlled by `ContainerInfo::is_in_tail`, but we've been computing it by checking if the tail expression of the range to extract is contained in the container's syntactically last expression, which may be a block that contains both tail and non-tail expressions (e.g. in #13620, the range to be extracted is not a tail expression but we set the flag to true).

This PR tries to compute the flag as precise as possible by utilizing `for_each_tail_expr()` (and also moves the flag to `Function` struct as it's more of a property of the function to be extracted than of the container).

2022-11-21

21 Nov 06:48
Compare
Choose a tag to compare
Auto merge of #13653 - VannTen:fix/doc-typo-vim-lsp, r=Veykril

Fix typo on 'configuration' anchor

https://rust-analyzer.github.io/manual.html#_configuration lands you at
the start of the page, while
https://rust-analyzer.github.io/manual.html#configuration correctly puts
you at the correct anchor

2022-11-14

14 Nov 07:49
Compare
Choose a tag to compare
Auto merge of #13607 - Veykril:proc-macro-error, r=Veykril

internal: Add version info to unsupported proc macro abi error

cc https://github.com/rust-lang/rust-analyzer/issues/13589#issuecomment-1311824473

2022-11-07

07 Nov 08:10
Compare
Choose a tag to compare
Auto merge of #13556 - pd4d10:patch-1, r=lnicola

docs: fix adoc links

Correct #13536 with adoc link syntax

2022-10-31

31 Oct 06:19
Compare
Choose a tag to compare
Auto merge of #13505 - lowr:feat/gats, r=flodiebold

Clean up tests and add documentation for GATs related stuff

This is a follow-up PR for #13494.

- addresses https://github.com/rust-lang/rust-analyzer/pull/13494#discussion_r1006774897
- documents the ordering constraint on `Binders` and `Substitution` (which is not really follow-up for the previous PR, but it was introduced to support GATs and I strongly feel it's worth it)

2022-10-24

24 Oct 16:12
Compare
Choose a tag to compare
Auto merge of #13471 - Veykril:invoc-strategy-once, r=Veykril

Handle multiple projects sharing dependency correctly in `once` strategy