Releases: rust-lang/rust-analyzer
2024-03-11
Changelog #224
Commit: 574e23e
Release: 2024-03-11 (v0.3.1877)
New Features
#16662,#16773,#16794add test explorer (disabled by default, enable usingrust-analyzer.testExplorer).#15938,#16756add hover display for trait assoc items
Fixes
#16723(first contribution) complete constants inside format strings.#16769fix argument type inference with associated typeimpl Trait.#16757disable style lints by default (rust-analyzer.diagnostics.styleLints.enable).#16759fix "Go to definition" for constants inside range patterns.#16778bumprustc_pattern_analysisto fix a panic on mismatched types.#16770fix panic on float numbers without dots in chain calls (x.1e0).#16779skip match diagnostics for partially unknown types.#16690use four-space indentation in macro expansion.#16752don't allow destructuring of structs with no public fields.#16766keep attributes in "Generate delegate trait" assist.#16775remove accidental dependency betweenparse_macro_expansionandparse.#16776makeSpanMapaccesses lazy to avoid asalsadependency.#16777don't invalid body query results when generating desugared names.#16781,#16782don't escape\and$in "Extract format expression".#16719add basic support for the VS Code Native Debug extension.
Internal Improvements
#16722(first contribution) avoid some allocations.#16748compute syntax validation errors on demand.#16755usePATHFor toolchain binaries.#16785,#16786,#16787simplify the parser code somewhat.#16742add parent-child relationship betweenSourceRoots.#16703add more methods for resolving AST definitions to their corresponding HIR types.#16763addindexandparent_fnaccessors tohir::Param.#16772addtracingspans tosalsadatabases.#16708,#16751move assist, diagnostics docs and lint definition generation intoxtask codegen.#16747various clean-ups.#16758bump dependencies.
See also the changelog post.
2024-03-04
Changelog #223
Commit: 037924c
Release: 2024-03-04 (v0.3.1868)
New Features
#16638(first contribution) adddestructure_struct_bindingassist.#16651addfill_record_pattern_fieldsassist.#16687support tuples in term search.#16555,#16692speed up completions by considering coherence.
Fixes
#16630fix type inference of closures with predicates.#16679resolve modules in blocks in theidelayer.#16647fix false positive fordyn Traitinreplace_filter_map_next_with_find_map.#16678fix panic when inlining callsites inside macro parameters.#16684don't panic on synthetic syntax in inference diagnostics.#16691fix completions panicking with certain macro setups.#16693prefer sysrootrustcinrust-project.jsonprojects.#16696,#16709handlederef_mutandindex_mutin index expressions.#16727don't highlight related associated items of supertraits.#16702ignore generic arguments in intra-doc link path resolution.#16665prioritizerustupsysroots over system ones.#16695revert doc-comment highlighting.
Internal Improvements
#16670(first contribution) document NeoVim inlay hint configuration.#16673(first contribution) narrow downtyposignore list.#16706dropload-cargodependency on ide.#16738bumprustc_pattern_analysis.#16627add repository URL and code sample sections to the bug report template.#16669mergeBorrowKind::UniqueintoBorrowKind::Mut.#16697addRelPath::to_path_buf()method.#16698derivePartialEq,EqandHashforhir::Param.#16705add public function for resolving callable AST expressions to their HIR equivalents.#16707exportSemanticsImplfromhir.#16680removesalsacompile-fail tests.
See also the changelog post.
2024-02-26
Changelog #222
Commit: 5346002
Release: 2024-02-26 (v0.3.1860)
New Features
#16489(first contribution) create alias when renaming an import.#16589addunresolved-identdiagnostic.#16303addnon-exhaustive-letdiagnostic.#16475support multiple tab stops for edits in VSCode.
Fixes
#16358(first contribution) de-duplicate references from macro expansions.#16621(first contribution) avoid settingRUSTC_BOOTSTRAPfor build scripts, to prevent spurious recompiles.#16590fixremove-unnecessary-elsefalse positives onifexpressions.#16616try to fix potential server hang with build scripts.#16645fix deadlock betweenrecreate_crate_graphandfile_line_index.#16618don't escape{in assists.#16637account for string delimiters correctly in proc macro server.#16606render associated item owner in hover for items other than functions.
Internal Improvements
#16654(first contribution) add-Vshorthand for--version.#16643,#16652reducesalsamemory usage.#16612fetch toolchain and data layout for detached files.#13112set up handling of auto trait bounds, but leave it disabled due to performance problems.#16617attempt to add a timeout torustc_tests.#16648pinrustc-testscommit.#16649,#16650disablerustc-testsmetrics.#16601check out repository before runningtypos.#16646remove some repeated words.#16668sync from downstream.
See also the changelog post.
2024-02-19
Changelog #221
Commit: 68c506f
Release: 2024-02-19 (v0.3.1850)
New Features
#16092(first contribution) introduce term search torust-analyzer.#16117(first contribution) prioritize constructors and builders in completions.#15923improve support for ignored proc macros.#15476substitute$saved_filein customcheckcommands.
Fixes
#16550(first contribution) activate on top levelCargo.tomlandrust-project.jsonfiles.#16530fix macro transcriber emitting incorrect lifetime tokens.#16541highlight doc comments.#16547validate literals in proc macro server'sFreeFunctions::literal_from_str.#16544only complete traits inimpl ... for.#16553improve parser error recovery on=in record field initializer and patterns.#16554pass.cargo/config.tomlenvironment variables to proc-macro server.#16563setRUSTUP_TOOLCHAINand invoke the proxies instead of sysroot binaries.#16247fix build scripts not being rebuilt on some occasions.#16574fixneedless_returnfalse positives on trailing inner item declarations.#16582respect textual length of paths infind_path.#16583ignore type mismatches between{unknown}and non-{unknown}types.#16586remove cargo knowledge fromCrateData.#16569place snippets correctly in multi-edit assists.#16579fix snippets being placed leftwards of where they should be.#16559fill in SCIP documentation fields.
Internal Improvements
#16588(first contribution) parse (nightly)constandasynctrait bounds.#16587(first contribution) update GitHub actions and Node version.#16576(first contribution) add license files tolsp-server.#15003add basic support forbecomeexpressions (tail calls).#16577migrate assists to the structured snippet API, part 7 of 7.#16446implementliteral_from_strin proc macro server.#16537,#16545make tool discovery prefer sysroot paths.#16540makemacro_argquery always returns aTokenTree.#16560set channel override when querying the sysroot metadata.#16558updateJsonProjectto include optional fields.#16562addclippyandrustfmtproblem matchers to CI.#16573removesalsacompile tests.#16533bumprustc_pattern_analysis.#16585bumpactions/checkouttov4.#16598,#16599,#16600downgradeactions/checkout,actions/setup-nodeand Node in release workflow.#16597sync from downstream.
See also the changelog post.
2024-02-12
Changelog #220
Commit: c06ca6c
Release: 2024-02-12 (v0.3.1839)
New Features
#16510add option to only runcargo checkon the current package.#16502add unnecessary else diagnostic.#16460add trailing return diagnostic.#16477add incorrect case diagnostics for traits and their associated items.#16454addbreakandreturnpostfix completions.#16424add support for convertingletstatements to guarded returns.#15863addUnindexedProjectnotification for LSP clients.
Fixes
#16487(first contribution) improveDerefhandling in "Generate getter" assist.#16509render visibility for tuple struct fields.#16124improve parser error recovery on missing arguments in call expressions.#16484preservewhereclause when expanding built-in derive macros.#16462improve error message when proc-macros have not yet been built.#16497fix spacing when inlining functions defined in macros.#16517fix crash insidefilter_unnecessary_boundson missing generic parameter.
Internal Improvements
#16482(first contribution) use boxed slice forSubtree::token_trees.#16503movesalsafork in-tree.#16505optimize input queries that take no arguments.#16527remove hack for self-referentialSyntaxContexts.#16467migrate assists to the structured snippet API, part 6.#16474instrument more paths usingtracing.#16499bumprustc_pattern_analysis.#16525abstract more overItemTreeLoc-like structs.#16470lint against debug prints and disallowed types using Clippy.#16500run Clippy on Windows, not Linux.#16518,#16519,#16521enable more Clippy lints.#16492,#16532sync from downstream.
See also the changelog post.
2024-02-05
Changelog #219
Commit: 39ad79b
Release: 2024-02-05 (v0.3.1831)
New Features
#16439support "Go to definition" from insideinclude!d files.#16417add "Normalize import" assist and improve "Merge imports".#16441add option to exclude tests from references search results.
Fixes
#15730(first contribution) add postfix completion forlet .. else.#16453undo special bracket classification in VS Code config.
Internal Improvements
#16463(first contribution) remove references toabi_amdgpu_kernel.#16394,#16456extendtracingintegration and use it inhprof.#16459use improvedadjusted_display_rangefor all diagnostics.#16461remove unnecessary usages ofExpansionInfo.#16447clean upmirerror variants.#16479use MacOS 12 runners for releases.#16451work through temporarily allowed Clippy lints, part 2.#16413runclippyon CI.#16448,#16469add typo check to CI.#16476sync from downstream.#16416VS Code: report conflict withpanicbit.cargo.
See also the changelog post.
2024-01-29
Changelog #218
Commit: 7219414
Release: 2024-01-29 (v0.3.1823)
New Features
#16420use upstream exhaustiveness checker.
Fixes
#16431(first contribution) useadjusted_display_range_newinmismatched_arg_countdiagnostic.#16427filter#[cfg]-ed out fields when lowering record patterns.
Internal Improvements
#16415makeTryToNavtrait public.#16435do not return code lens data after resolving.#16434restructure and clean uphir-expanda bit.
See also the changelog post.
2024-01-22
Changelog #217
Commit: d410d4a
Release: 2024-01-22 (v0.3.1815)
New Features
#16370show additional value information when hovering over literals.#16374,#16375show implemented notable traits on hover.#16391add config to allow renaming of non-local definitions.#16372addOneimport granularity.
Fixes
-
#16349add error recovery foruse_tree_listparsing: -
#16385fix intra-doc links. -
#15868inferOUT_DIRwhen workspace root contains a symlink. -
#16396fix panic when extracting struct from enum variant. -
#16378handleSelfParambetter in "Inline call". -
#16405includeforin "Convert to guarded return". -
#16314parsemacro_rulesas macro name. -
#16367makevalue_tyquery fallible.
Internal Improvements
#15636,#16383(first contribution) show which roots are being scanned in progress messages.#16196(first contribution) renamegeneratortocoroutine.#16409(first contribution) remove some unused code.#16350speed up line index calculation via NEON for aarch64.#16395speed up line ending normalization usingmemchr.#16366make data queries transparent over their diagnostics variant.#16352,#16389portrustfmt's algorithm for import ordering.#16351eagerly lower enum variants inCrateDefMapconstruction.#16388recordFnAbi.#16356add unstable config for loading the sysroot sources viacargo metadata.#16380,#16387runcargo metadataon sysroot for CI metrics.#16384make use of some newSmolStrimprovements.#16397refactormacro_callto be consistent with other parsers.#16398automatically fix Clippy lints.#16401expand lint tables and make Clippy happy.#16404work through temporarily allowed Clippy lints, part 1.#16406addmax_line_lengthto.editorconfig.#16364,#16412sync from downstream.
See also the changelog post.
2024-01-15
Changelog #216
Commit: 9d8889c
Release: 2024-01-15 (v0.3.1807)
New Features
-
#16209(first contribution) add assist to merge nestedifs:merge_ifs.mp4
-
#16308use$cratefor built-in derives.
Fixes
#16265(first contribution) includepub(crate)imports in suggestions.#16348fix nestedinclude!s resolving from the wrong base file.#16312fixrust-analyzer-proc-macro-srvfailing to launch on Windows.#16277fix panic ingenerate_delegate_methods.#16333preserve extracted block comments in "Extract function".#16310fix parsing of method calls on ranges.#16274consider#[doc(notable_trait)]for completion relevance.
Internal Improvements
#16307don't store the VFS contents in memory.#16329minor perf and memory improvements.#16347consider all kinds of explicit private imports infind_path.#16319differentiate between VFS configuration and file change events.#16275fixast::Path::segmentsimplementation.#16334bumpsalsa.#16317sync from downstream.#16271removesysroot-abifeature flag fromproc-macro-test.#16309recognize proc macro server unexpectedly quitting and report the exit code.#16311remove therustc_dependenciescrate.#16339replacesource_root_cratesoutput hash set with a slice.
See also the changelog post.
2024-01-08
Changelog #215
Commit: af40101
Release: 2024-01-08 (v0.3.1799)
New Features
-
#16222(first contribution) addunresolved_assoc_itemdiagnostic: -
#16279support IDE features for tuple fields: -
#15933resolve inherent and implemented associated items in doc comments: -
#16100add quick fix for unresolved methods when an associated function with the same name exists: -
#16011addrust-analyzer.cargo.buildScripts.rebuildOnSaveoption to rebuild proc macros on save if they change. -
#16223add quick fix for "Redundant associated item" diagnostic: -
#16298add inlay hint for exclusive ranges:
Fixes
-
#16081(first contribution) keep trailing whitespace in doc comments. -
#16139(first contribution) give methods a container name. -
#16136make the expected completion type a tad smarter with function types: -
#16258,#16261,#16267,#16270rewrite and optimizeImportMap::search_dependencies. -
#16268remove result limit for trait-importing method completions. -
#16153tell user thatlinkedProjectsis set when failing to discover projects. -
#16234fix focus range in attribute/derive upmapping. -
#16085fix type inference withIndexMutreturning references. -
#15810fix panic with macros in "Convert boolean to enum" and "Promot local to constant" assists. -
#16067make "Introduce named generic" assist work with nested types. -
#16068pick up new generic names on conflict in "Introduce named generic". -
#16114fixSelftype replacement in "Inline function". -
#16199resolveSelfin "Extract struct from enum variant". -
#16049don't complete callable parantheses in struct literals. -
#16241give a userful error whenrustccannot be found in explicit sysroot. -
#16285fix panic on unaligned#[repr(packed)]. -
#16062updaterust-analyzer.cargo.checkdocumentation references torust-analyzer.check.
Internal Improvements
#16179(first contribution) populate new SCIPSymbolInformationfields.#16213(first contribution) update dev guide based on the 2024-01-01 release.#16252(first contribution) switch toexpected.assert_eqforidetests.#15922,#16238,#16262(first contribution) update Gentoo installation instructions.#16302(first contribution) add a basicREADME.mdto theline-indexcrate.#16290reduceVeccloning in MIR lowering and eval.#16237reduceArcallocations inmacro_expand.#16082migrate assists to the structured snippet API, part 5.- clean up and enhance readability of
generate_delegate_trait. #16226expose whether the channel has been dropped inlsp-servererrors.#16211use[workspace.lints.clippy]to configure lints.#16256only compare relevant parts inide::{runnables, inlay_hints}tests.#16260replace single usage ofcheck_expectwithcheck_diagnostics.#16294fix some minorclippy::perfissues.#16248addproc-macro-testcrate back to the main workspace.#16249sync from downstream.
See also the changelog post.







