Skip to content

Releases: rust-lang/rust-analyzer

nightly

20 May 00:31
Compare
Choose a tag to compare
nightly Pre-release
Pre-release
Auto merge of #17259 - lnicola:sync-from-rust, r=lnicola

internal: Sync from downstream

2024-05-13

13 May 05:13
Compare
Choose a tag to compare
Auto merge of #17208 - Wilfred:log_error_from_threads, r=Veykril

fix: Report both IO errors and main_loop errors

If rust-analyzer receives a malformed LSP request, the IO thread terminates with a meaningful error, but then closes the channel.

Once the channel has closed, the main_loop also terminates, but it only has RecvError and can't show a meaningful error. As a result, rust-analyzer would incorrectly claim that the client forgot to shutdown.

```
$ buggy_lsp_client | rust-analyzer
Error: client exited without proper shutdown sequence
```

Instead, include both error messages when the server shuts down.

2024-05-06

06 May 06:33
Compare
Choose a tag to compare

Changelog #232

Commit: c4618fe
Release: 2024-05-06 (v0.3.1950)

Fixes

  • #17177 (first contribution) hide Run lens when lenses are disabled.
  • #17160 create generics for impl traits in associated types.
  • #17190 fix panic on dyn Trait with lifetimes.
  • #17157 don't retry requests that rely on positions, and version resolve data.
  • #17161 discard file paths that aren't valid UTF-8.
  • #17172 correctly handle no_core/no_std for preludes.
  • #17175, #17176 fix implicit tyype argument lowering.
  • #17138 make "Generate function" emit a constructor stub for functions called new.

Internal Improvements

  • #17144 (first contribution) remove confusing rust-project.json example from the docs.
  • #17168 (first contribution) switch from winapi to windows-sys.
  • #17148 match tracing span with function names.

See also the changelog post.

2024-04-29

29 Apr 07:29
Compare
Choose a tag to compare

Changelog #231

Commit: f216be4
Release: 2024-04-29 (v0.3.1940)

Fixes

  • #16972 (first contribution) make cargo run always available for binaries.
  • #17131 (first contribution) use different codes for "no such field" errors based on variant type.
  • #17135 compute expression scopes for inline consts.
  • #17145 fix source roots creation on changes.
  • #17151 avoid item tree collisions for attributes on generic parameters.
  • #17153 fix doc comment desugaring for proc macros.
  • #17021 support hovering limits for ADTs.
  • #17134 don't render unknown lifetimes in generic arguments.

Internal Improvements

  • #17143 show workspace info in the status bar.
  • #17102 add more tracing spans to project loading.
  • #17150 make sure josh rustc-pull doesn't add new root commits.

See also the changelog post.

2024-04-22

22 Apr 05:40
Compare
Choose a tag to compare

Changelog #230

Commit: 47a901b
Release: 2024-04-22 (v0.3.1932)

New Features

  • #16813 add wrap/unwrap #[cfg_attr] assist.
  • #17094 add "Convert From to TryFrom" assist.
  • #17110 add minimal cargo-script support.
  • #17118 allow .rs files to be used linkedProjects.
  • #16057 render matched declarative macro arm on hover.

Fixes

  • #17115 (first contribution) try to generate more meaningful names in JSON converter.
  • #16877 fix impl Trait<Self> causing stack overflows.
  • #17055 replace just the variable name in the "Unused variable" quick fix.
  • #17093 avoid some circular symlinks in VFS.
  • #17024 handle escaped chars in doc comments.
  • #17074 add static and const highlight token types.
  • #17105 make test harness arguments configurable.

Internal Improvements

  • #17104 (first contribution) bump actions in metrics.yaml.
  • #16639 redesign rust-analyzer::config.
  • #17078 improve diagnostics performance.
  • #16726 remove #[cfg(test)] hacks.
  • #17108 clean up #[cfg] and environment handling in project-model.
  • #16938 handle BeginPanic in const eval.
  • #17119 extract common fields out of ProjectWorkspace variants.
  • #17037 improve TokenSet implementation and add reserved keywords.
  • #17072 use hir_fmt_args everywhere in hir_ty::display.
  • #17070 remove unnecessay GlobalState::send_hint_refresh_query field.
  • #17087 fix a few tracing spans without .entered().
  • #17083 improve ReferenceCategoryType.
  • #16257 teach Cargo about #[cfg(rust_analyzer)].
  • #17025 use josh for subtree syncs.
  • #17095 add a CONTRIBUTING.md.

See also the changelog post.

2024-04-15

15 Apr 05:22
Compare
Choose a tag to compare

Changelog #229

Commit: 5dbe3fe
Release: 2024-04-15 (v0.3.1924)

Fixes

  • #17019 don't confuse paths with source roots sharing the same prefix.
  • #17063 fix inlay hint resolution.
  • #17056 run cargo test per workspace in the test explorer.
  • #17054 revert "fix: postfix snippet completion source range".
  • #17051 auto-close triple backticks.

Internal Improvements

  • #17034 (first contribution) document enabling the Flatpak Rust SDK extension.
  • #17033 log flycheck errors.
  • #17062 temporarily disable unlinked file popup.
  • #16450, #17065 prepare parser interface for editions.
  • #17059 make function builder create AST directly.
  • #17030 bump chalk.
  • #17035 run Windows tests on PRs too.

See also the changelog post.

2024-04-08

08 Apr 06:23
Compare
Choose a tag to compare

Changelog #228

Commit: 7a8374c
Release: 2024-04-08 (v0.3.1916)

New Features

  • #16924, #16988 add rust-analyzer.cargo.allTargets to configure passing --all-targets to cargo invocations.

Fixes

  • #17000 (first contribution) set the right postfix snippet completion source range.
  • #16968 silence type mismatches involving unresolved projections.
  • #16997 fix patch_cfg_if not applying with stitched sysroot.
  • #17006 fix some cfg censoring bugs.
  • #17003 fix off-by-one in LSP offset conversion.
  • #16961 fix crate IDs when multiple workspaces are loaded.
  • #16970 fix tasks in tasks.json.
  • #17016 apply cargo flags in test explorer.
  • #17014 consider #[exported_name=main] functions in test modules as tests.

Internal Improvements

  • #16996 lower Outlives goals and respect them in display impls.
  • #17002 consider ADT generic parameter defaults for unsubstituted layout calculations.
  • #16979 use contiguous indices for enum variants in pattern analysis.
  • #17023 slight clean-ups and perf improvements.
  • #16920 fix new nightly Clippy lints.
  • #16986 add client information to bug report template.

See also the changelog post.

2024-04-01

01 Apr 05:37
Compare
Choose a tag to compare

Changelog #227

Commit: e4a405f
Release: 2024-04-01 (v0.3.1906)

New Features

  • #16805, #16960, #16967 implement lifetime lowering and resolution.
  • #16906 add struct hover field display limit (rust-analyzer.hover.show.structFields).

Fixes

  • #16964 revert debug extension priorities.
  • #16965 use LLDB when debugging with C++ extension on MacOS.
  • #16957 check for client relative glob pattern support before using them.
  • #16971 resolve tests per file instead of crate in test explorer.
  • #16975 prompt the user to reload the window when enabling test explorer.

Internal Improvements

  • #16944 revert to the crates.io version of rustc_pattern_analysis.
  • #16930 support choosing the allocator in xtask dist.

See also the changelog post.

2024-03-25

25 Mar 06:28
Compare
Choose a tag to compare

Changelog #226

Commit: 6f6b03f
Release: 2024-03-25 (v0.3.1896)

New Features

  • #16852 implement ATPIT.
  • #16860 syntax highlighting improvements.

Fixes

  • #16915 (first contribution) fix stack overflow on recursive const types.
  • #16913 make file watching work on Windows and improve subsequent change detection.
  • #16935 handle CTFE panicking like rustc.
  • #16830 fix panic on impl Trait associated types in where clauses.
  • #16905, #16927 rename ProcMacroKind::FuncLike to Bang.
  • #16919 handle self::super in paths.
  • #16880 use --workspace and --no-fail-fast in test explorer.
  • #16868 handle attributes when auto-closing left braces.
  • #16822 improve resolution for inlay hints targetting the same position.
  • #16871, #16886 skip problematic cyclic dev-dependencies.
  • #16885 improve parser recovery for match arms.
  • #16812 fix "Go to implementation" for impls inside blocks.
  • #16909 keep the Attr::Literal spans.
  • #16911 fix hang on projects depending on rustc_private.

Internal Improvements

  • #16835 share token trees between derive attributes and their proc macros.
  • #16879 add fuel to match checking.
  • #16895 resolve whether $pat is $pat_param or not using hygiene.
  • #16839 support arbitrary shell command runnables.
  • #16884 move grammar codegen into xtask.
  • #16889, #16899, #16918 enforce UTF-8 paths.
  • #16892 don't try to read root crate file contents before VFS.
  • #16912 remove Span trait.
  • #16863 bump rustc dependencies and use in-tree rustc_pattern_analysis.
  • #16928 build x86_64-unknown-linux-gnu releases on Rocky Linux 8 (GLIBC 2.28).
  • #16904 bump rust-cache action.
  • #16929 bump release actions and Node version.

See also the changelog post.

2024-03-18

18 Mar 07:00
Compare
Choose a tag to compare

Changelog #225

Commit: b6d1887
Release: 2024-03-18 (v0.3.1885)

Announcement

Today's release switches to Ubuntu 20.04 for building the official binaries, bringing the minimum supported GLIBC version to 2.31.
Upgrading was forced by GitHub Actions moving form Node.js 16 to 20.
See #16793 for more information.

Affected distributions include Debian 10, Ubuntu 18.04, Enterprise Linux 7 and 8, and Amazon Linux 2.
For now, the alternatives are building from source, or using the rust-analyzer toolchain component.

New Features

  • #16789 apply #[cfg] to proc macro inputs.
  • #16834 support macro calls in eager macros for IDE features.
  • #16808 add proc macro semantic token type.

Fixes

  • #16762 (first contribution) add quick fix for "undersolved field" diagnostic.
  • #16810 add fix for "unused variable" diagnostic.
  • #16856 fix where clause rendering on hover.
  • #16846 fix panic and incorrect handling of use in extract_module.
  • #16861 ignore some warnings if they originate from macro expansions.
  • #16845 show compilation progress in test explorer.
  • #16847 distinguish integration tests from crates in test explorer.
  • #16820 don't auto-close block comments in strings.

Internal Improvements

  • #16819 improve rooted upmapping.
  • #16832 shrink MacroCallLoc.
  • #16841 use associated items as anchors for spans.
  • #16842 make proc macro definition site spans more resistant to invalidation.
  • #16844 replace Span with SyntaxContextId in MacroCallLoc.
  • #16771 don't desugar self parameter into a pattern.
  • #16335 compress file text using LZ4.
  • #16473 stop eagerly resolving inlay hint text edits for VS Code.
  • #16749, #16811 some method resolution clean-ups.
  • #16862 remove redundant clones
  • #16784 remove synstructure const hack support.
  • #16851 build linux-gnu releases on Ubuntu 20.04.

See also the changelog post.