Skip to content

Releases: rust-lang/rust-analyzer

2023-08-28

28 Aug 09:16
Compare
Choose a tag to compare

Changelog #196

Commit: 144526c
Release: 2023-08-28 (v0.3.1641)

New Features

  • #15374 (first contribution) implement extern crate completion.

Fixes

  • #15512 update offset intrinsic to match 1.72.
  • #15517 fix unknown label diagnostics for while let loop with label in condition.

Internal Improvements

  • #15385 (first contribution) pass target in proc-macro-test to fix cross-compilation on Darwin hosts.
  • #15490 fix help text for rust-analyzer.check.invocation{Strategy,Location}.
  • #15503 report the rust-analyzer version in the SCPI metadata.
  • #15494 sync from downstream.
  • #15523 use RUSTC_BOOTSTRAP when running analysis-stats on the standard library.
  • #15495 unpin serde.

See also the changelog post.

2023-08-21

21 Aug 08:59
Compare
Choose a tag to compare

Changelog #195

Commit: 83b3ba1
Release: 2023-08-21 (v0.3.1631)

New Features

  • #15477 record import aliases in symbol index.
  • #15446 add status bar button to toggle check on save.

Fixes

  • #15463 show generic constant defaults in hover.
  • #15473 honor #[doc(hidden)] in auto-import and completions.
  • #15383 suggest type completions for type arguments and constant completions for constant arguments.
  • #15418 fix signature help of methods generated by macros.
  • #15410 rewrite De Morgan's assist to avoid string manipulation.
  • #15179 substitute default values of const params in "Add missing members".
  • #15420 increase the buffer size for the discover project command.

Internal Improvements

  • #15466 add offset param to token descend API.
  • #15472 record import origins in ItemScope and PerNs.
  • #15426, #15429, #15434 de-unwrap convert_to_guarded_return, generate_delegate_methods and generate_derive.
  • #15461 always collect memory usage info in analysis-stats.
  • #15482 pin serde to the last non-blobby release.

See also the changelog post.

2023-08-14

14 Aug 07:27
Compare
Choose a tag to compare

Changelog #194

Commit: 2fbe69d
Release: 2023-08-14 (v0.3.1623)

New Features

  • #15262 (first contribution) add rust-analyzer.check.ignore setting to ignore specific check diagnostics.

Fixes

  • #15350 handle #[cfg]s on generic parameters.
  • #15405 support doc links that resolve to fields.
  • #15416 correctly display fully-qualified associated types correctly.
  • #15419 add MIR lowering support for tuple destructing assignment.
  • #15415 fix float parser hack creating empty NameRef tokens.
  • #15250 don't use control flow when keeping the tail expression of the original function.
  • #15445 fix only_types config filtering out traits from world symbols.
  • #15438 fix parser getting stuck in eager macro inputs.

Internal Improvements

  • #15217 (first contribution) convert unwrap to expect in lsp-server and add a debug log.
  • #15422 record import source IDs.
  • #15435 derive block attributes from block item tree.
  • #15436 preserve resolve_obligations_as_possible allocation across calls.
  • #15423, #15433 de-unwrap convert_named_struct_to_tuple_struct and remove_unused_imports.
  • #15417 use Cast::cast() instead of explicit interning.
  • #15428 fix pinned version of lsp-types.
  • #15421 add more error context when failing to invoke the Rust toolchain.

See also the changelog post.

2023-08-07

07 Aug 05:10
Compare
Choose a tag to compare

Changelog #193

Commit: baee6b3
Release: 2023-08-07 (v0.3.1615)

New Features

  • #14723 (first contribution) add "Remove unused imports" assist:

    remove-unused-imports.mp4

Fixes

  • #15361 expand eager macros to delimited comma-separated expression list.
  • #15366 remove faulty unwrap in eager macro expansion.
  • #15367 strip unused token ids from eager macro input token maps.
  • #15380 fix unsized struct problems in MIR eval.
  • #15348 exclude non-identifier aliases from completions.
  • #15050 skip #[doc(hidden)] methods in "Implement default members" and "Convert +#[derive]+ to manual impl".
  • #15376 make "Convert match to matches!" assist trigger on non-literal bool arms.
  • #15345 don't provide add_missing_match_arms assist when up-mapping match arm list failed.
  • #15397 remove unwraps from "Generate delegate trait".
  • #15406 don't provide generate_default_from_new when impl self type is missing.
  • #15391 set the default status bar button action to "Open logs".
  • #15392 use the warning color when server is stopped.

Internal Improvements

  • #15373 (first contribution) desugar while to loop and break.
  • #15390 improve MIR interpreter performance by caching.
  • #15269 defer structured snippet rendering to allow escaping snippet bits.
  • #15377 record extern crate declarations in the HIR.
  • #15401 turn unresolved proc macro expansions into missing expressions.
  • #15378 rename Import to Use in hir-def, add unused placeholder variants for UseId.
  • #15393 qualify parameters by the containing function in SCIP.
  • #15358 add triagebot no-merges config.

See also the changelog post.

2023-07-31

31 Jul 05:51
Compare
Choose a tag to compare

Changelog #192

Commit: 429a381
Release: 2023-07-31 (v0.3.1607)

New Features

  • #15308 add platform-specific runnable environment variables.

Fixes

  • #15356 fix bad unwrap in eager_macro_recur.
  • #15357 do not create function-like macro calls with non-fn expanders.
  • #15271 properly infer types with type casts.
  • #15360 fix up path fragments upon MBE transcription.
  • #15353 add manual implementation of clone for tuples in MIR interpreter and fence intrinsics.
  • #15363 support Self without field in MIR lowering.
  • #15349 show anonymous FnDef types as function pointers.
  • #15359 include proc macro server spawn errors in the status text.

See also the changelog post.

2023-07-24

24 Jul 06:37
Compare
Choose a tag to compare

Changelog #191

Commit: 99718d0
Release: 2023-07-24 (v0.3.1599)

New Features

  • #15303 fix highlighting of byte escape sequences.

Fixes

  • #15277 (first contribution) limit change_visibility assist to top-level items.
  • #15312 don't follow raw pointer derefs when considering method receiver candidates.
  • #15317 look up supertraits in is_dyn_method.
  • #15320 report incorrect-ident-case for inner items.
  • #15325 normalize expected type in call arguments.

Internal Improvements

  • #15290 (first contribution) use notification command links for debugger installation.
  • #15313 (first contribution) add configuration example for Kate.
  • #15301 support reading uncompressed proc macro metadata.
  • #15287 remove crate visibility modifier.
  • #15316 pass TraitEnvironment into layout_ty and const_eval.
  • #15323 optimize DepKindInfo to DepKind conversion.
  • #15304 use .kind(Interner) instead of .data(Interner).kind.
  • #15281 break down VS Code extension CI steps to make them clearer.

See also the changelog post.

2023-07-17

17 Jul 05:17
Compare
Choose a tag to compare

Changelog #190

Commit: d824511
Release: 2023-07-17 (v0.3.1591)

Fixes

  • #15248 fix eager token mapping panics.
  • #15297 normalize type alias in projected_ty.
  • #15258 support getrandom syscall in MIR.
  • #15268 add write_bytes and ctlz intrinsics.
  • #15282 add type_name intrinsic and give real discriminant_type to chalk.
  • #15284 add sched_getaffinity and enable cfg(miri) in analysis.

Internal Improvements

  • #15257 (first contribution) ignore Content-Length header case in lsp-server.
  • #15270 (first contribution) make fields of mir::Terminator public.
  • #15292 (first contribution) fix typo in command line help.
  • #15295 (first contribution) fix rust-analzyer ssr help message.
  • #15251 skip building subtrees for built-in derives.
  • #15231, #15260 migrate more assists to use the structured snippet API.
  • #15263 enable derive feature for serde in lsp-server.
  • #15267 mark MIR execution limit test as slow.
  • #15252 enable useUnknownInCatchVariables TypeScript option.
  • #15259 use type imports.
  • #15254 add FIXME for exactOptionalPropertyTypes.
  • #15264, #15265 bump npm dependencies.
  • #15266 set .editorconfig default indent size to 4.
  • #15275 default to stable toolchain in the metrics workflow.

See also the changelog post.

2023-07-10

10 Jul 05:39
Compare
Choose a tag to compare

Changelog #189

Commit: ff15634
Release: 2023-07-10 (v0.3.1583)

New Features

  • #15081 (first contribution) add a memory layout viewer:

    Screenshot showing a memory layout view for a struct with i32, u8, Vec<bool> and usize fields.

  • #15152 add Generate trait from impl assist:

    Screen recording showing the assist generating a trait from an impl block

  • #14990 map our diagnostics to the rustc and clippy ones.

  • #15186 don't add panics to error jump list by default.

Fixes

  • #15118 (first contribution) follow raw pointers in autoderef chain when resolving methods with custom receiver.
  • #15235 (first contribution) don't insert semicolon when extracting match arm.
  • #15226 make Expand glob import work on enum imports.
  • #15211 support GATs in bounds for associated types.
  • #15223 don't show unresolved-field diagnostic for missing names.
  • #15216 don't mark braces around self imports as unnecessary.
  • #15212 recover from missing associated items and generic const defaults.
  • #15245 fix missing terminator in pattern matching of consts.
  • #15222 fix size_of_val and support min_align_of_val intrinsic.
  • #15244 support read_via_copy intrinsic.
  • #15228 implement recursion in MIR interpreter without recursion.
  • #15230 use Debug impl for const eval result rendering.
  • #15227 indent after pressing enter on a blank line.

Internal Improvements

  • #15202 don't diagnose built-in derives.
  • #15204 add analysis-stats flag to trigger some IDE features.
  • #15149 speed up line index calculation via SSE2.
  • #15219 unify Generate getter and setter assists.
  • #15205 split out project loading capabilities from the rust-analyzer crate.
  • #15203 shuffle some proc_macro_expand query things around.
  • #15209 use stronger typing for AstId and AstIdMap.
  • #15181 clean up ImportMap.
  • #15210 remove CfgExpander.
  • #15206 format let-else.
  • #15224 replace x with it.
  • #15160 enable noUncheckedIndexedAccess and noPropertyAccessFromIndexSignature TypeScript options.
  • #15234 remind user to check PATH after installation.

See also the changelog post.

2023-07-03

03 Jul 05:49
Compare
Choose a tag to compare

Changelog #188

Commit: ff485b6
Release: 2023-07-03 (v0.3.1575)

New Features

  • #15136 (first contribution) drop matching brace key binding.
  • #15185 bump chalk.
  • #15151 update VS Code extension dependencies and require 1.78.

Fixes

  • #15148 fix self and super path resolution in block modules.
  • #15157 fix runnable detection for #[tokio::test].
  • #15173 fix data layout of reference to nested unsized structs.
  • #15184 disable MIR interpreter for targets with different pointer size from host.
  • #15168 fix MIR realloc allocating a smaller destination.
  • #15189 fix overflow checking in shift operator.
  • #15194 fix layout of SIMD types and respect alignment in MIR interpreter.
  • #15101, #15177, #15180 check client workspace.workspaceEdit.resourceOperations capability.
  • #15138 rename runnableEnv to runnables.extraEnv.

Internal Improvements

  • #15030, #15163 (first contribution) run metrics on parallel.
  • #15172 support #[derive_const(Trait)].
  • #15140 add comment explaining why HasSource::source() returns Option.
  • #15161 add library fixture meta.
  • #15175 drop cross-env npm dep.
  • #15174 switch to @vscode/vsce.
  • #15153 clean up Code extension activationEvents.
  • #15154 use @tsconfig/strictest for type checking rules.
  • #15159 enable noImplicitOverride.
  • #15169 use anonymous lifetime where possible.
  • #15142 rename crates after removing libs from workspace.
  • #15195 don't specify proc-macro-test version.

See also the changelog post.

2023-06-26

26 Jun 05:45
Compare
Choose a tag to compare

Changelog #187

Commit: 4a2ceef
Release: 2023-06-26 (v0.3.1566)

New Features

  • #14948 add "generate delegate impl" assist:

    Screen recording showing the assist generating code that delegates a trait implementation to a field.

  • #15116 remove Markdown injection grammar.

Fixes

  • #15105 (first contribution) fix display of negative integers.
  • #15074 fix inlining of async functions.
  • #15112 support manual implementation of Fn traits in the MIR interpreter.
  • #15119 support more intrinsics in the MIR interpreter.
  • #15135 fix some unsizing problems in MIR.
  • #15085 include project path in workspace loading errors.
  • #15104 skip mutability diagnostics on synthetic bindings.

Internal Improvements

  • #15093 use ArgumentV1 instead of Argument.
  • #15071, #15089 remove spurious regex dependency.
  • #15087, #15097, #15100 use consistent style for error handling.
  • #15086 intern use and extern crate items like other items.
  • #15095 change in-tree libs to workspace dependencies and bump versions.
  • #15098 use lib crates from crates.io.
  • #15070 report metric timings for file item trees and crate def map creation.
  • #15110 add run-tests CLI command.

See also the changelog post.