Changelog #35
Commit: 8ff40af
Release: 2020-07-27
Sponsors
Become a sponsor: opencollective.com/rust-analyzer
New Features
-
#5524allow opting out of experimental diagnostics like MismatchedArgCount. -
#5518use resolved paths in SSR rules. The main user-visible changes are:-
SSR now matches paths based on whether they resolve to the same thing instead of whether they’re written the same.
-
So
foo()won’t matchfoo()if it’s a different functionfoo(), but will matchbar::foo()if it’s the samefoo.
-
-
Paths in the replacement will now be rendered with appropriate qualification for their context.
-
For example
foo::Barwill render as justBarinside the modulefoo, but might render asbaz::foo::Barfrom elsewhere.
-
-
This means that all paths in the search pattern and replacement template must be able to be resolved.
-
It now also matters where you invoke SSR from, since paths are resolved relative to wherever that is.
-
Search now uses find-uses on paths to locate places to try matching. This means that when a path is present in the pattern, search will generally be pretty fast.
-
Function calls can now match method calls again, but this time only if they resolve to the same function.
-
-
#5527track internal metrics: https://rust-analyzer.github.io/metrics/. -
#5470usecargo.targetforcheckOnSave. -
#5451highlight more cases punctuation characters. -
#5475supportTrait as _imports. -
#5492use symbol tags. -
#5500problem matcher auto detects relative/absolute paths and matches VSCode LSP’s owner and source. -
#5473new format ofrust-project.json— configuration file for non Cargo-based projects.