Skip to content

Releases: rust-lang/rust-analyzer

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.

nightly

18 Sep 00:35
Compare
Choose a tag to compare
nightly Pre-release
Pre-release
Auto merge of #18119 - ChayimFriedman2:signed-const, r=HKalbasi

fix: Fix printing of constants greater than `i128::MAX`

Fixes #18116.

2024-09-09

09 Sep 05:58
Compare
Choose a tag to compare

Commit: 08c7bbc
Release: 2024-09-09 (v0.3.2104)

New Features

  • #17984 implement cast typecheck and diagnostics.
  • #18022, #18053 add IDE support for asm! expressions.

Fixes

  • #18031 suggest name in pattern completion.
  • #18016 use existing type aliases in "Wrap return type in Result".
  • #18028 prevent lifetime hint panic in non-generic definitions.
  • #18045 keep loop blocks during lowering.
  • #18068 set TraitRef self types explicitly during lowering.
  • #18067 prevent MIR building when unknown types are present.
  • #18059 don't clobber discovered projects when updating settings.

Internal Improvements

  • #18026 tweak completion scoring.
  • #18044 add edition-dependent keyword highlighting tests.
  • #18065 catch panics from diagnostics computation.
  • #18066 don't panic LSP writer thread when the receiver gets dropped.

See also the changelog post.

2024-09-02

02 Sep 05:07
Compare
Choose a tag to compare

Commit: 779d9ee
Release: 2024-09-02 (v0.3.2096)

New Features

  • #17814, #17999 implement object-safety and add it to hover.
  • #17940, #17941 implement "Convert closure to function" assist.
  • #17757 implement "Toggle macro delimiters" assist.
  • #17985 implement "Add explicit enum discriminants" assist.
  • #18006 add an option to hide deprecated items from completion.
  • #18010 support function types in lifetime elision hints.

Fixes

  • #17972 revert "#17936 implement module_path!".
  • #17994 fix TokenStream::to_string implementation dropping quotation marks.
  • #17987 fix resolution of shadowed built-in macros.
  • #17963 show error lifetime arguments as '_.
  • #17737 sprinkle some sugar on async impl Trait completions.
  • #17970 fix "Unwrap block" for blocks with modifiers.
  • #17991 don't add unnecessary reference in "Extract variable".
  • #17973 expand proc macros in workspace, not package root.
  • #17993 keep field attributes when converting between tuples and named structs.
  • #17982 consider indentation in "Generate impl" and "Generate trait impl".
  • #18015 handle attributes in "Flip comma".
  • #18003 do not report missing unsafe on addr_of!(EXTERN_OR_MUT_STATIC).
  • #18005 don't suggest for loops in impl T for A in function bodies.
  • #17962 update return type syntax to match compiler.
  • #17988 fix incorrect symbol definitions in SCIP output.

Internal Improvements

  • #17975, #18009 (first contribution) do not assume rustup is installed in xtask codegen.
  • #18008, #18012 make inlay hint resolution more reliable.
  • #17945 recategorize config classes.
  • #17967 prepare for stand-alone MBE tests.
  • #17992 avoid newlines in worspace fetch errors.
  • #18011 add some doc-comments to OpQueue.
  • #17974 drop Apache license appendices.

See also the changelog post.

2024-08-27

27 Aug 07:18
Compare
Choose a tag to compare
Auto merge of #17972 - rust-lang:revert-17936-module_path, r=Veykril

Revert "feat: Implement `module_path` macro"

Reverts rust-lang/rust-analyzer#17936 Fixes https://github.com/rust-lang/rust-analyzer/issues/17968

2024-08-26

26 Aug 06:01
Compare
Choose a tag to compare

Commit: 7106cd3
Release: 2024-08-26 (v0.3.2086)

New Features

  • #17936 implement module_path!.
  • #17857 allow declaring cfg groups in rust-project.json.
  • #17927, #17955 speed up search for short associated functions.

Fixes

  • #17942 implement floating point casts in const eval.
  • #17958 Consider Deref impls in trait method completions.
  • #17960 use extra_test_bin_args in Test Explorer runner.
  • #17925 include generics when lowering extern type.
  • #17928 keep comments in "Convert while to loop".
  • #17924 fix panic when a TAIT exists in a RPIT.
  • #17932 fix semantic highlighting panics during start-up.
  • #17939, #17948 improve handling of Sized predicates.
  • #17943 improve proc macro panic message and workspace loading failure diagnostic.
  • #17912, #17946 run flycheck without reverse dependencies when target is specified.
  • #17949 watch build files from rust-project.json.
  • #17956 keep original error when retrying cargo metadata with --no-deps.
  • #17913 add workspace-level config to rust-analyzer.toml.

Internal Improvements

  • #17888 remove invocationLocation in favor of invocationStrategy.
  • #17886 wait for cache priming before reporting that the server is ready.
  • #17898 improve macro token mapping heuristics.
  • #17961 don't allocate autoderef steps when not needed.
  • #17930 remove the ability to configure the user config path.

See also the changelog post.

2024-08-19

19 Aug 04:15
Compare
Choose a tag to compare

Commit: fa00326
Release: 2024-08-19 (v0.3.2078)

New Features

  • #17845 implement TAIT and fix ATPIT.
  • #17853 support min_exhaustive_patterns.
  • #17595 implement lifetime inference.
  • #17915 make rust-analyzer partially work while offline.

Fixes

  • #17833 (first contribution) reuse recursion limit as expansion depth limit.
  • #17900 (first contribution) add option to exclude vendored libraries from SCIP/LSIF output.
  • #17864 build and run build scripts for LSIF.
  • #17859 support #[rustc_deprecated_safe_2024].
  • #17905 properly account for editions in names.
  • #17863 resolve included files to their calling modules in IDE layer.
  • #17865 emit non-exhaustive let diagnostics for async and unsafe blocks.
  • #17882 fix panic while canonicalizing erroneous projection type.
  • #17893 fix panic on associated functions with type annotations.
  • #17916 fix panic while lowering impl Trait parameter of parent generics.
  • #17867 handle trailing excess comma in "Convert to named struct".

Internal Improvements

  • #17903 (first contribution) don't kill the flycheck process command group.
  • #17908 test for word boundary in FindUsages.
  • #17842, #17843 optimize channel usage.
  • #17850 send back empty responses while the VFS is still loading.
  • #17876 remove unreachable logic for include token mapping.
  • #17896 check the edition for edition-dependent syntax kinds.
  • #17891 be more resilient to bad language item definitions in binary operator inference.
  • #17907 replace once_cell with the std types.
  • #17862 fix auto-publishing workflow.
  • #17909 remove rust-analyzer.workspace.discoverProjectRunner.

See also the changelog post.

2024-08-12

12 Aug 05:10
Compare
Choose a tag to compare

Commit: 0daeb5c
Release: 2024-08-12 (v0.3.2070)

New Features

  • #17791 add diagnostic for await outside of async.
  • #17795 load sysroot library via cargo metadata (for toolchains after 176e54520 2024-08-04).
  • #17775, #17824 segregate syntax and semantic diagnostics to improve latency.
  • #17771 load VFS config changes in parallel.

Fixes

  • #17802 supress type mismatches in calls with mismatched argument counts.
  • #17823 attach unconfigured diagnostics to the right file for modules.
  • #17784 support inlay hints for more expressions with labels.
  • #17844 respect non-std preference in find_path.
  • #17805 fix panic in path_transform with default type parameters.
  • #17813 fix type equality check for non-ADT types in usage search.
  • #17832 fix panic while rendering function type hint with impl Trait parameters.
  • #17818 support .rust-project.json in addition to rust-project.json.

Internal Improvements

  • #17825 offload diagnostics serialization to the task pool.
  • #17794 turn ErasedFileAstId into a newtype.
  • #17821 remove unnecessary CfgFlag definition in project-model.
  • #17809 include vendored crates in StaticIndex.
  • #17831 merge flycheck into the main rust-analyzer crate.
  • #17799 split out syntax-bridge into a separate crate.
  • #17772 reorganize debug.ts.
  • #17745, #17827 add missing repository and description fields to the crate manifests.
  • #17793 suggest installing the MSVC Redistributable in the manual.

See also the changelog post.

2024-08-05

05 Aug 04:46
Compare
Choose a tag to compare

Commit: c9109f2
Release: 2024-08-05 (v0.3.2062)

New Features

  • #17707 use spans for built-in and declarative macro expansion errors.
  • #17735 introduce workspace-level rust-analyzer.toml.

Fixes

  • #17750 don't require absolute paths in linkedProjects.
  • #17715 let glob imports override other globs' visibility.
  • #17747 fix inference for method calls with elided lifetimes.
  • #17755 apply IndexMut obligations for non-assigning mutable usages.
  • #17741 make include! work with raw string literals.
  • #17763 insert a tail Ok(()) in type mismatch quick fix.
  • #17736 show async in trait method completions.
  • #17789 insert a generic args for impl Trait during lowering.
  • #17742 don't retry inlay hint and code lens requests.

Internal Improvements

  • #17705 (first contribution) use oldest rustup rust-analyzer when toolchain override is present.
  • #17722 use VS Code logging helpers.
  • #17770 remove TryFrom implementation for AbsPathBuf.

See also the changelog post.

2024-07-29

29 Jul 05:25
Compare
Choose a tag to compare

Commit: fd74511
Release: 2024-07-29 (v0.3.2053)

New Features

  • #17542 Support "Go to definition" and "Find all references" on control flow keywords.
  • #17676 add preliminary support for the + use<..> precise_capturing syntax.

Fixes

  • #17511 (first contribution) fix trait solving with Deref as a supertrait.
  • #17472 (first contribution) filter run unit tests by crate when running them.
  • #17660 fix again the path resolution for included submodules.
  • #17706 fix include!s with expr fragment inputs.
  • #17586 allow macro expansions into RestPat in tuple args.
  • #17697 support the new cargo config get env format.
  • #17709 fix hover links.
  • #17713 fix panic on unresolved index fields.
  • #17720 flip the naming of the doc-comment to comment assist.

Internal Improvements

  • #17675 (first contribution) remove the lens.forceCustomCommands config.
  • #17670 enable LRU for the body_with_source_map query.
  • #17671 shrink Binding.
  • #17695 shrink TypeRef by 8 bytes.
  • #17693 remove params and fields from AstIdMap.
  • #17668 remove incorrect never! invocations for async functions.
  • #17647 rename internal rust-analyzer commands.
  • #17698 remove unused trace module.
  • #17690 fix and enable unsafe_op_in_unsafe_fn.
  • #17483 improve rust-analyzer.toml error reporting.
  • #17667 use the rustup rust-analyzer component when rust-toolchain.toml exists.
  • #17610 add Impl::all_in_module(…) for more localized querying.
  • #17674 add version and config to the Status command.
  • #17395 remove UnindexedProject notification.

Others

See also the changelog post.