Changelog #35
Commit: 8ff40af
Release: 2020-07-27
Sponsors
Become a sponsor: opencollective.com/rust-analyzer
New Features
-
#5524
allow opting out of experimental diagnostics like MismatchedArgCount. -
#5518
use 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::Bar
will render as justBar
inside the modulefoo
, but might render asbaz::foo::Bar
from 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.
-
-
#5527
track internal metrics: https://rust-analyzer.github.io/metrics/. -
#5470
usecargo.target
forcheckOnSave
. -
#5451
highlight more cases punctuation characters. -
#5475
supportTrait as _
imports. -
#5492
use symbol tags. -
#5500
problem matcher auto detects relative/absolute paths and matches VSCode LSP’s owner and source. -
#5473
new format ofrust-project.json
— configuration file for non Cargo-based projects.