Releases: rust-lang/rust-analyzer
Releases · rust-lang/rust-analyzer
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.
2024-08-05
Commit: c9109f2
Release: 2024-08-05 (v0.3.2062)
New Features
#17707use spans for built-in and declarative macro expansion errors.#17735introduce workspace-levelrust-analyzer.toml.
Fixes
#17750don't require absolute paths inlinkedProjects.#17715let glob imports override other globs' visibility.#17747fix inference for method calls with elided lifetimes.#17755applyIndexMutobligations for non-assigning mutable usages.#17741makeinclude!work with raw string literals.#17763insert a tailOk(())in type mismatch quick fix.#17736showasyncin trait method completions.#17789insert a generic args forimpl Traitduring lowering.#17742don't retry inlay hint and code lens requests.
Internal Improvements
#17705(first contribution) use oldestrustuprust-analyzer when toolchain override is present.#17722use VS Code logging helpers.#17770removeTryFromimplementation forAbsPathBuf.
See also the changelog post.
2024-07-29
Commit: fd74511
Release: 2024-07-29 (v0.3.2053)
New Features
#17542Support "Go to definition" and "Find all references" on control flow keywords.#17676add preliminary support for the+ use<..>precise_capturingsyntax.
Fixes
#17511(first contribution) fix trait solving withDerefas a supertrait.#17472(first contribution) filter run unit tests by crate when running them.#17660fix again the path resolution for included submodules.#17706fixinclude!s withexprfragment inputs.#17586allow macro expansions intoRestPatin tuple args.#17697support the newcargo config get envformat.#17709fix hover links.#17713fix panic on unresolved index fields.#17720flip the naming of the doc-comment to comment assist.
Internal Improvements
#17675(first contribution) remove thelens.forceCustomCommandsconfig.#17670enable LRU for thebody_with_source_mapquery.#17671shrinkBinding.#17695shrinkTypeRefby 8 bytes.#17693remove params and fields fromAstIdMap.#17668remove incorrectnever!invocations forasyncfunctions.#17647rename internal rust-analyzer commands.#17698remove unusedtracemodule.#17690fix and enableunsafe_op_in_unsafe_fn.#17483improverust-analyzer.tomlerror reporting.#17667use the rustuprust-analyzercomponent whenrust-toolchain.tomlexists.#17610addImpl::all_in_module(…)for more localized querying.#17674add version and config to theStatuscommand.#17395removeUnindexedProjectnotification.
Others
See also the changelog post.
2024-07-22
Commit: 4afe0d5
Release: 2024-07-22 (v0.3.2045)
New Features
#17588(first contribution) add incorrect case diagnostics for enum variant fields and all variables/params.#17620,#17640,#17646make parser edition-aware.#17635add inlay hint support for lifetime labels in block expressions.#17246teach rust-analyzer to discoverlinked_projects.
Fixes
#17650(first contribution) fix path resolution for child modules of those expanded byinclude!.#17587trigger a rename in VS Code "Extract variable".#17649be more robust to type errors in match analysis.#17656allow flyimport to import modules that shadow a primitive.#17653prefer standard library paths over shorter extern re-exports.#17611don't callmacro_argdirectly inExpandDatabase::syntax_context.#17622handle renaming in "Merge imports".#17605setRUSTC_TOOLCHAINfor runnables.
Internal Improvements
#17584,#17603,#17604implement symbol interning.#17657makeCfgExprslightly smaller.#17638reduce memory usage ofsalsaslots by 8 bytes.#17639some moresalsamemory improvements.#17559,#17601encode ident rawness and literal kind separately intt::Leaf.#17655morefind_pathimprovements.#17618supportrustc_skip_during_method_dispatch.#17617derive syntax kind information from ungrammar file.#17637removerust-analyzer.openFAQcommand.#17616fix incorrect generic parameter hint defaults.#17641don't take references informat_args!and friends.
See also the changelog post.