Releases: rust-lang/rust-analyzer
2025-05-12
Commit: 2bafe9d
Release: 2025-05-12 (v0.3.2457)
New Features
#19740add assist to unwrap a type into its single generic argument.
Fixes
#19751(first contribution) supportCARGO_MANIFEST_PATH.#19763complete parentheses and method call arguments if the next line starts with a tuple.#19742fix incorrect handling of unresolved non-module imports in name resolution.#19746fix proc-macro API creating malformed negative literals.#19747fixmove_boundsassists with lifetimes.#19434support negative numbers inconcat!.#19764don't deref twice in postfix snippets.#19738fix panic on<T as Tr>without an associated type.#19507fix path resolution in outer doc comments.
Internal Improvements
#19721handle parallelism better in cache priming.#19707de-Arcdefmap queries.#19750remove unnecessary token length check for macros in renaming.#19749remove unnecessaryAsAnytrait.#19772make diagnostics experimental by default.#19748direct users to discussions instead of issues for questions.
See also the changelog post.
2025-05-05
Commit: 3b57c00
Release: 2025-05-05 (v0.3.2449)
Fixes
#19704add underscore mode for expression filling.#19733implement mut to const pointer cast for method resolution.#19732fix associated type bound variable starting index.#19699properly escape raw names in labels.#19247fix span info inmir::Operand.#19723improve parser recovery a bit.#19581render more lifetimes.#19735improve theletandletmsnippets.#19739temporarily disable fixpoint for variance computation.
Internal Improvements
#19685(first contribution) add PGO support toxtask install.#19713clean upcfgcheck handling in expression store lowering.#19469migratemerge_imports,unmerge_importsandlet_else_to_matchtoSyntaxEditor.#19708de-Arclanguage item queries.#19712clean up cache priming cancellation handling.#19731simplify macro call id construction.#19714remove unnecessary extension trait.#19719adjust panic context printing.#19727remove a couple of unnecessaryclones.#19716bump salsa (saves 212 MB onanalysis-stats self).
See also the changelog post.
2025-04-28
Commit: d8887c0
Release: 2025-04-28 (v0.3.2441)
New Features
#19634,#19629allow unsetting env vars inextraEnvconfigs.#19479,#19676,#19672,#19675add some new diagnostics for incorrect generic arguments.#19692add an assist to remove underscores from used variables.#19653parsesuper let.#19643parse generic consts.
Fixes
#19622(first contribution) fix some bugs in the string rewriting assists.#19604(first contribution) add semicolon tousecompletion.#19657improve support foroffset_of!().#19636fixcompletion_snippets_customconfig always erroring out.#19650support unstableUnsafePinnedstruct in type layout computation.#19647fix panics in inlay hints that produce empty text edits for closure return types.#19684report error when unable to parse aDiscoverProjectMessage.
Internal Improvements
#19678arena-allocateLifetimeRefs.#19655fold hygiene map into the bindings themselves.#19677removeWherePredicateTypeTarget.#19644make predefined symbolsconstinstead ofstatic.#19688add some missingshrink_to_fit()s and upgradedashmapandhashbrown.#19624bumpchalkto make the generic parameter order matchrustc.#19661bumpsalsa.
See also the changelog post.
2025-04-21
Commit: 723121e
Release: 2025-04-21 (v0.3.2431)
New Features
#19582,#19585,#19586,#19595,#19597,#19611,#19614,#19618enable PGO for most builds (except ARM) for about a 20% speed-up.
Fixes
#19576(first contribution) ignore morerustfmtparsing errors.#19596include generic parameters and default values in signature help.#19590addpub(crate) modoption for unlinked files.#19588include inline format macro variables in "Extract into function".#19589fix highlighting for tail expr in labelled blocks.#19619sort notable traits in hover.#19612fix a bug with predicate lowering of associated items.#19613fix panic with implemented trait method that declares an extra lifetime parameter.#19579prevent panics on cyclic dependencies dependency between closures.#19628,#19642don't ignore config values that fail to parse.
Internal Improvements
#19578(first contribution) normalize drive letters in the VS Code extension.#19638,#19639(first contribution) add anchors to configuration options and fix dead links to the manual.#19616makehir-tynon-diagnostic queries transparent (saves 56 MB onanalysis-stats self).#19617makeHirFileId,EditionedFileIdand macro filessalsastructs (saves 165 MB onanalysis-stats self).#19591useast::TokenTreeinmake::expr_macro.#19572migrateexpand_rest_patterntoSyntaxEditor.#19568migratedestructure_struct_bindingtoSyntaxEditor.#19569return correct types formake::expr_*methods.#19600pin therustcused for theproc-macro-srcCI job.#19521cancel parallel CI jobs if tests fail.
See also the changelog post.
2025-04-14
Commit: 8365cf8
Release: 2025-04-14 (v0.3.2379)
New Features
Fixes
#19432fix another false positive invalid cast diagnostic.#19563walk const block expressions for unsafety checking.#19541prefer imports of matching types for argument lists.#19461fix shadowing of modules by types.#19571fix missing test update notifications when there are hyphens in the target name and exclude dependencies from "Run all".
Internal Improvements
#19425(first contribution) make drop glue info less verbose.#19462,#19558,#19570lowerTypeRefs before type inference.#19536port closure inference fromrustc.#19566use thecallable_item_signaturequery indyn-compatibility checks.#19550turnLifetimeRefinto an enum.#19562tweak invalid signature bitflags.#19573render sigantures in "View HIR" command.#19512fix somestdxlints.#19559switch to Rust 1.86.#19565addprime-cachessubcommand.
See also the changelog post.
2025-04-07
Commit: 588948f
Release: 2025-04-07 (v0.3.2370)
Fixes
#19526(first contribution) useconstant, notconstinrustdoclinks.#19447addimpl forcompletion.#19515don't drop references with more than one definition.#19501fix a regression in MBE expansion.#19531fixformat_args!lowering for 1.87.#19522fix panic in "View crate graph".#19523fix proc macro server spawning.#19514fix bracket colorization in strings.
Internal Improvements
#19490(first contribution) fix panic inanalysis-statsprogress line slicing.#19492avoid a needlessblock_def_map()access.#19496replace some#[salsa::invoke]s withinvoke_actual.#19494unwrap some unnecessaryArcs.#19482clean up parameter name inlay hint filtering heuristics.#19509dropAssistKind::None.#19484fix new lints in nightly.#19520align usage ofdefaultandnewwith style guide.#19485clean up CI a bit.#19493disablerust-cachein CI.#19533set up a job matrix forrust-cross.#19519addrust-analyzer.cargo.noDepsoption.
See also the changelog post.
2025-03-31
Commit: fb133c8
Release: 2025-03-31 (v0.3.2362)
New Features
#19375allow crate authors to disable completions using#[rust_analyzer::completions].#19388parseunsaferecord fields.#19347add diagnostic for ambiguous&impl 'a + Sized.
Fixes
#19475(first contribution) fix debug source map.#19433fixlet elsetoif let elseconversion.#19435fix ranges in closure return inlay hints.#19466fix a bug in orphan rule check.#19474fix, clarify and require a value forproc_macro_cwdofCrateData.
Internal Improvements
#19440replace customThinVecwith thethin-veccrate.#19451use medium durability for crate graph changes, high for library source files.#19359emit lines of code and item tree counts inanalysis-stats.#19457removesalsadependency from proc macro server again.#19446,#19448run tests undercargo miri.#19422clean up VS Code output channels, dropdebug.openDebugPane.#19430bump dependencies.
See also the changelog post.
2025-03-24
Commit: 37acea8
Release: 2025-03-24 (v0.3.2353)
Fixes
#19384fix stale "BuildingCrateGraph" report.#19416handle multiple#[repr(..)]attributes correctly.#19362speed up resolving a "Generate delegate method" assist.#19348add text edit support for return type hints on non-block body closures.#19413properly calculate the layout of unsized tuple pointers.#19320mark manual trait implementations as unsafe when replacing a derive.#19400fix syntax highlighting for&raw const/&raw mutin standalone files.#19397add postfix completion for const block.#19005fix testing of packages with multiple targets.
Internal Improvements
#19408replace#[derive]s to reduce codegen burden for generated syntax types.#19390do not useExpanderin associated item lowering.#19412remove some unnecessary usages ofSemantics.#19429remove unused dependencies.#19419render layout and other extra information when hoveringSelf.#19329add some docs toproc-macro-api.#19379bumpEdition::CURRENTto 2024.#19378triggersalsaLRU at the end ofanalysis-stats.#19315do not generate docs with inxtask codegen --check.#19391clean upproc-macro-srvCI job.
See also the changelog post.
2025-03-17
Commit: b0632f7
Release: 2025-03-17 (v0.3.2345)
Announcement
This release brings two major changes, which might make it slightly spicier than usual.
The first is upgrading to the latest version of salsa, the incremental evaluation framework used by rust-analyzer.
This will make it possible to implement parallel evaluation and persistency in the future.
The second change is to use salsa for the crate graph, making it incremental.
Adding or removing a dependency, or editing a build script or proc macro, will now invalidate only the affected crates instead of the entire workspace.
New Features
-
#19079,#19332warn when a rename will change the meaning of the program:Screen.Recording.2025-02-02.015127.mp4
-
#18964put a new batch ofsalsaon rust-analyzer. -
#19337putsalsaon the crate graph. -
#19271add "Convertforintowhile let" assist.
Fixes
-
#19344add icons to VS Code views: -
#19252fix syntax fixup producing invalid punctuation. -
#19333fix diagnostics being cleared right after being received. -
#19330normalize projections in evaluated const display and layout calculation. -
#19363display varargs in completion detail. -
#19325rank ADT constructors as such for completion scoring. -
#19326add missing name-ref parents to syntactic highlighting. -
#19327fixpathmacro hygiene. -
#19311log build script error output for Cargo projects. -
#19351don't panic when the crate graph isn't ready. -
#19356avoid recursively debug printing crates.
Internal Improvements
#19314(first contribution)impl HasSource for VariantDef.#19367drop legacysalsa.#19354prepare for Return Type Notation (RTN) and add a diagnostic.#19232bump chalk to get support for async closures.#19305vendorquery-group-macroin rust-analyzer.#19364add missingwith_durabilitycalls.#19368removeCrateGraphBuilder::iter_mut.#19236switch to the 2024 edition.#19369do not error out for actions with no data to resolve.#19366remove legacySyntaxContextIdre-export.#19228split up some ADT queries.#19355render root syntax contexts more clearly.#19343makeGenericParamsCollector::type_or_constsprivate.#19328run proc-macro server tests in a separate CI job.#19334remove generated mdbook files.
See also the changelog post.
2025-03-10
Commit: 5e7dd31
Release: 2025-03-10 (v0.3.2337)
New Features
Fixes
#19226(first contribution) improve completions that return a reference.#19279(first contribution) addletmand improveletkeyword completion.#19308bring back support for Rust 1.78 projects.#19261support tuple structs inexpand_rest_pattern.#19324fix adding of brackets in "Inline variable".#19297fix completion relevance check.#19290warn whencargo metadatafails.#19292handle modifiers in punctuation highlighting.#19274don't highlight unsafe definitions asunsafe.#19295make "rust-analyzer: Run" available in manifest file.
Internal Improvements
#19288(first contribution) usesize_offrom the prelude.#19244,#19275warn when the active toolchain is too old.#19286twiddle with therustupinvocation on CI.
See also the changelog post.
