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.
Become a sponsor: opencollective.com/rust-analyzer
New Features
rust-analyzer ssr '$a.foo($b) ==> bar($a, $b)'
-
#5161add initial support for placeholder constraints in structural search replace. -
#5142allow parallel type inference in batch mode (rust-analyzer analysis-stats). -
#5178emit folding ranges for multiline calls. -
#5149implement Chalk variable kinds, which improves type inference for primitives. -
#5116set categories for code actions. -
#5192takerust-analyzer.cargo.featuresinto account when generating run configurations. -
#5202allow 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 } } ]
-
#4864Add optional target to crates in json project
Fixes
-
#5122fix "Run | Debug" lens for examples. -
#5124partially fix handling of type params depending on type params. -
#5211partially fix inference of indexing argument. -
#5096fix handling of whitespace when applying SSR within macro expansions. -
#5110fix call hierarchy. -
#5179lower fields despite invalid type. -
#5089disable auto-complete on comments. -
#5189record and suggest assoc. items of traits via ImportMap. -
#5212fix renaming of nested out of line modulesmod outer { mod inner; }.
Internal Improvements
-
#5136split namespace maps inItemScope, reducing memory usage of the CrateDefMap query by ~130 MB (50%) on r-a. -
#5175more memory-efficient impl collection. This saves roughly 90 MB inImplsFromDepsQuery, which used to copy the list of all impls from libcore into every crate in the graph. -
#5127improve test infra for type inference test. -
#5126useFxHash{Map,Set}consistently. -
#5101add expect — a lighter-weight alternative to theinstasnapshot testing library. -
#5137make gotodef tests more data-driven. -
#5138refactor runnable tests. -
#5153,#5156,#5157,#5162remove some generics fromra_hirinterface. -
#5158correctly distinguish between semantical and display crate names. -
#5176update expand macro tests. -
#5193movecargo metadataoff the main loop. -
#5199,#5200,#5201,#5205,#5214,#5215,#5219,#5221,#5226refactor completion tests. -
#5197SSR internal refactors. -
#5222add "rehighlight after adding a new top-level function" to the set of benchmarks.