Releases: rust-lang/rust-analyzer
2024-10-07
Commit: 2b750da
Release: 2024-10-07 (v0.3.2137)
New Features
#18085provide an option (rust-analyzer.cfg.setTest) to not setcfg(test).
Fixes
#18207(first contribution) suggest UpperCamelCase instead of CamelCase to matchrustc.#18210fix resolution of labels inside macro calls.#18206handle block expressions as modules when finding their parents.#18219fix incorrect bootstrap error message.#18255use external stack in borrow check DFS.
Internal Improvements
#18167send less data for completions, if possible.#18234filter out opaque tokens when descending into macros for some IDE features.#18195removeDefaultfrom OpQueue.#18227add JSONtracingLayerfor profiling start-up.
See also the changelog post.
2024-09-30
Commit: 822644d
Release: 2024-09-30 (v0.3.2129)
New Features
#17923(first contribution) add option to rebuild project before restarting debugging.#18180index workspace symbols at start-up rather than on the first search.
Fixes
#18160fix name resolution with renamed imports and shadowing.#18164handle import aliases inremove_unused_imports.#18161improve reference handling in consuming postfix completions.#18172support#[expect]in attribute completion and hover.#18162report lifetime GATs as object-unsafe.#18123disambiguate package names in flycheck.#18166fix a bug in span map merging.#18184pass--all-targetsfor build scripts in more CLI commands.#18193don't report start-up error when a workspace discovery command is configured.
Internal Improvements
#18205(first contribution) rename object-safety todyn-compatibility.#18196addSyntaxFactoryto simplify generating nodes with syntax mappings.#18181addtracingto project discovery and VFS loading.#18192includerust-project.jsonbuild files in VFS.#18157respect--disable-proc-macrosinanalysis-stats.#18208allow overriding proc macro server inanalysis-stats.#18188bump MSRV to 1.81.#18175dropCOMPLETION_MARKEREaster egg.
See also the changelog post.
2024-09-23
Commit: 1301e42
Release: 2024-09-23 (v0.3.2121)
Note
Because of infrastructure issues, this release is not available on GitHub Releases.
New Features
#18135add diagnostics forunsafe_op_in_unsafe_fn.#18131replace$cratein user-visible macro expansions.#18151support${concat(...)}metavariable expressions.#18137supportexpr_2021fragment specifiers.
Fixes
#18136(first contribution) don't lint names of#[no_mangle]extern functions.#18128don't show lints and quick fixes in code generated by external macros.#18117always cache macro expansion root nodes inSemantics.#18139extendtype_variable_tablewhen index is larger than the table size.#18146remove check that text ofparse_expr_from_str()matches the produced parsed tree.#18153account for rawness in$exprfragments.#18108take#[cfg_attr]into account for lint attributes.#18132don't complete;in closure return expressions.
Internal Improvements
#18134extendSourceChangeBuilderto make make working withSyntaxEditoreasier.#18169temporarily disable GitHub releases.
See also the changelog post.
2024-09-16
Commit: 94b526f
Release: 2024-09-16 (v0.3.2112)
New Features
#18038generate names for tuple struct fields in "Fill match arms".#18018automatically add semicolon when completing unit-returning function call.
Fixes
#18052(first contribution) don't output hex when inlining integer constants.#18041improve name suggestions for variables extracted from function calls.#18075render patterns when hovering on function parameters.#18093skip diagnostics when casting todyn Trait.#18092correctly escape strings instringify!.#18101fix false positive error when casting literals.#18106don't report typed hole error inasm!outoperands.#18073fix "immutable tree" ingenerate_delegate_trait.#18119fix printing of constants greater thani128::MAX.#18099improve handling of lint attributes.#18050offerreplace_qualified_name_with_useon the first segment of a path.#18107don't emit empty inlay hint parts.#18105don't panic on invalid LSP notifications from buggy clients.
Internal Improvements
#18032add preliminarySyntaxEditorfunctionality.#18057improve testing infra forrust-analyzer.toml.#18080remove crate graph deduplication logic.#17904add CLI command to report unresolved references.
See also the changelog post.
2024-09-09
Commit: 08c7bbc
Release: 2024-09-09 (v0.3.2104)
New Features
#17984implement cast typecheck and diagnostics.#18022,#18053add IDE support forasm!expressions.
Fixes
#18031suggest name in pattern completion.#18016use existing type aliases in "Wrap return type inResult".#18028prevent lifetime hint panic in non-generic definitions.#18045keep loop blocks during lowering.#18068setTraitRefself types explicitly during lowering.#18067prevent MIR building when unknown types are present.#18059don't clobber discovered projects when updating settings.
Internal Improvements
#18026tweak completion scoring.#18044add edition-dependent keyword highlighting tests.#18065catch panics from diagnostics computation.#18066don't panic LSP writer thread when the receiver gets dropped.
See also the changelog post.
2024-09-02
Commit: 779d9ee
Release: 2024-09-02 (v0.3.2096)
New Features
#17814,#17999implement object-safety and add it to hover.#17940,#17941implement "Convert closure to function" assist.#17757implement "Toggle macro delimiters" assist.#17985implement "Add explicit enum discriminants" assist.#18006add an option to hide deprecated items from completion.#18010support function types in lifetime elision hints.
Fixes
#17972revert "#17936 implementmodule_path!".#17994fixTokenStream::to_stringimplementation dropping quotation marks.#17987fix resolution of shadowed built-in macros.#17963show error lifetime arguments as'_.#17737sprinkle some sugar on asyncimpl Traitcompletions.#17970fix "Unwrap block" for blocks with modifiers.#17991don't add unnecessary reference in "Extract variable".#17973expand proc macros in workspace, not package root.#17993keep field attributes when converting between tuples and named structs.#17982consider indentation in "Generate impl" and "Generate trait impl".#18015handle attributes in "Flip comma".#18003do not report missing unsafe onaddr_of!(EXTERN_OR_MUT_STATIC).#18005don't suggestforloops inimpl T for Ain function bodies.#17962update return type syntax to match compiler.#17988fix incorrect symbol definitions in SCIP output.
Internal Improvements
#17975,#18009(first contribution) do not assumerustupis installed inxtask codegen.#18008,#18012make inlay hint resolution more reliable.#17945recategorize config classes.#17967prepare for stand-alone MBE tests.#17992avoid newlines in worspace fetch errors.#18011add some doc-comments toOpQueue.#17974drop Apache license appendices.
See also the changelog post.
2024-08-27
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
Commit: 7106cd3
Release: 2024-08-26 (v0.3.2086)
New Features
#17936implementmodule_path!.#17857allow declaringcfggroups inrust-project.json.#17927,#17955speed up search for short associated functions.
Fixes
#17942implement floating point casts in const eval.#17958ConsiderDerefimpls in trait method completions.#17960useextra_test_bin_argsin Test Explorer runner.#17925include generics when loweringextern type.#17928keep comments in "Convertwhiletoloop".#17924fix panic when a TAIT exists in a RPIT.#17932fix semantic highlighting panics during start-up.#17939,#17948improve handling ofSizedpredicates.#17943improve proc macro panic message and workspace loading failure diagnostic.#17912,#17946run flycheck without reverse dependencies when target is specified.#17949watch build files fromrust-project.json.#17956keep original error when retryingcargo metadatawith--no-deps.#17913add workspace-level config torust-analyzer.toml.
Internal Improvements
#17888removeinvocationLocationin favor ofinvocationStrategy.#17886wait for cache priming before reporting that the server is ready.#17898improve macro token mapping heuristics.#17961don't allocate autoderef steps when not needed.#17930remove the ability to configure the user config path.
See also the changelog post.
2024-08-19
Commit: fa00326
Release: 2024-08-19 (v0.3.2078)
New Features
#17845implement TAIT and fix ATPIT.#17853supportmin_exhaustive_patterns.#17595implement lifetime inference.#17915make 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.#17864build and run build scripts for LSIF.#17859support#[rustc_deprecated_safe_2024].#17905properly account for editions in names.#17863resolve included files to their calling modules in IDE layer.#17865emit non-exhaustive let diagnostics for async and unsafe blocks.#17882fix panic while canonicalizing erroneous projection type.#17893fix panic on associated functions with type annotations.#17916fix panic while loweringimpl Traitparameter of parent generics.#17867handle trailing excess comma in "Convert to named struct".
Internal Improvements
#17903(first contribution) don't kill the flycheck process command group.#17908test for word boundary inFindUsages.#17842,#17843optimize channel usage.#17850send back empty responses while the VFS is still loading.#17876remove unreachable logic for include token mapping.#17896check the edition for edition-dependent syntax kinds.#17891be more resilient to bad language item definitions in binary operator inference.#17907replaceonce_cellwith thestdtypes.#17862fix auto-publishing workflow.#17909removerust-analyzer.workspace.discoverProjectRunner.
See also the changelog post.
2024-08-12
Commit: 0daeb5c
Release: 2024-08-12 (v0.3.2070)
New Features
#17791add diagnostic forawaitoutside ofasync.#17795load sysroot library viacargo metadata(for toolchains after176e54520 2024-08-04).#17775,#17824segregate syntax and semantic diagnostics to improve latency.#17771load VFS config changes in parallel.
Fixes
#17802supress type mismatches in calls with mismatched argument counts.#17823attach unconfigured diagnostics to the right file for modules.#17784support inlay hints for more expressions with labels.#17844respect non-stdpreference infind_path.#17805fix panic inpath_transformwith default type parameters.#17813fix type equality check for non-ADT types in usage search.#17832fix panic while rendering function type hint withimpl Traitparameters.#17818support.rust-project.jsonin addition torust-project.json.
Internal Improvements
#17825offload diagnostics serialization to the task pool.#17794turnErasedFileAstIdinto a newtype.#17821remove unnecessaryCfgFlagdefinition inproject-model.#17809include vendored crates inStaticIndex.#17831mergeflycheckinto the mainrust-analyzercrate.#17799split outsyntax-bridgeinto a separate crate.#17772reorganizedebug.ts.#17745,#17827add missing repository and description fields to the crate manifests.#17793suggest installing the MSVC Redistributable in the manual.
See also the changelog post.