Sponsor Docs Blog Changelog

Changelog #32

Commit: 8b0983e
Release: 2020-07-06

Sponsors

This week we’d like to thank one of our individual sponsors, @anp.

@anp maintains moxie project: a lightweight platform-agnostic declarative UI runtime, because incremental feedback latency and quality are core to building interactive software.

New Features

  • #5169, #5188 initial support for dynamic workspace reloading.

    86605844 8335b480 bfa7 11ea 964f 72e06f535607
  • #5119 show notification while SSR is in progress.

  • #5120, #5154 add a simple SSR subcommand to the rust-analyzer command line binary:

rust-analyzer ssr '$a.foo($b) ==> bar($a, $b)'
  • #5161 add initial support for placeholder constraints in structural search replace.

  • #5142 allow parallel type inference in batch mode (rust-analyzer analysis-stats).

  • #5178 emit folding ranges for multiline calls.

  • #5149 implement Chalk variable kinds, which improves type inference for primitives.

  • #5116 set categories for code actions.

  • #5192 take rust-analyzer.cargo.features into account when generating run configurations.

  • #5202 allow to set default environment for run configurations (docs):

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    
    "rust-analyzer.runnableEnv": [
      {
        // null mask means that this rule will be applied for all runnables
        // "mask": null,
        env: {
          "APP_ID": "1",
          "APP_DATA": "asdf"
        }
      },
      {
        "mask": "test_name",
        "env": {
          "APP_ID": "2", // overwrites only APP_ID
        }
      }
    ]
    
  • #4864 Add optional target to crates in json project

Fixes

  • #5122 fix "Run | Debug" lens for examples.

  • #5124 partially fix handling of type params depending on type params.

  • #5211 partially fix inference of indexing argument.

  • #5096 fix handling of whitespace when applying SSR within macro expansions.

  • #5110 fix call hierarchy.

  • #5179 lower fields despite invalid type.

  • #5089 disable auto-complete on comments.

  • #5189 record and suggest assoc. items of traits via ImportMap.

  • #5212 fix renaming of nested out of line modules mod outer { mod inner; }.

Internal Improvements

  • #5136 split namespace maps in ItemScope, reducing memory usage of the CrateDefMap query by ~130 MB (50%) on r-a.

  • #5175 more memory-efficient impl collection. This saves roughly 90 MB in ImplsFromDepsQuery, which used to copy the list of all impls from libcore into every crate in the graph.

  • #5127 improve test infra for type inference test.

  • #5126 use FxHash{Map,Set} consistently.

  • #5101 add expect — a lighter-weight alternative to the insta snapshot testing library.

  • #5137 make gotodef tests more data-driven.

  • #5138 refactor runnable tests.

  • #5146, #5151 simplify inlay hints tests.

  • #5153, #5156, #5157, #5162 remove some generics from ra_hir interface.

  • #5158 correctly distinguish between semantical and display crate names.

  • #5160, #5167 reuse caches in more cases.

  • #5176 update expand macro tests.

  • #5193 move cargo metadata off the main loop.

  • #5199, #5200, #5201, #5205, #5214, #5215, #5219, #5221, #5226 refactor completion tests.

  • #5197 SSR internal refactors.

  • #5222 add "rehighlight after adding a new top-level function" to the set of bechmarks.