diff options
author | Dmitry <[email protected]> | 2020-08-18 13:37:22 +0100 |
---|---|---|
committer | Dmitry <[email protected]> | 2020-08-18 13:37:22 +0100 |
commit | e18748ed152989953e39492a6b44f8001267ce5f (patch) | |
tree | 300dc7ce2998d9521319ff76f4df6ec2d165d0a1 /crates/ssr/src/lib.rs | |
parent | 73315c9168901ef6d676f017daaa9b4976380c03 (diff) | |
parent | b8dfc331abbfce6aad0c248c91c57bd9890a668f (diff) |
Merge remote-tracking branch 'rust-analyzer/master'
Diffstat (limited to 'crates/ssr/src/lib.rs')
-rw-r--r-- | crates/ssr/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ssr/src/lib.rs b/crates/ssr/src/lib.rs index 292bd5b9a..ba669fd56 100644 --- a/crates/ssr/src/lib.rs +++ b/crates/ssr/src/lib.rs | |||
@@ -21,7 +21,10 @@ | |||
21 | // code in the `foo` module, we'll insert just `Bar`. | 21 | // code in the `foo` module, we'll insert just `Bar`. |
22 | // | 22 | // |
23 | // Inherent method calls should generally be written in UFCS form. e.g. `foo::Bar::baz($s, $a)` will | 23 | // Inherent method calls should generally be written in UFCS form. e.g. `foo::Bar::baz($s, $a)` will |
24 | // match `$s.baz($a)`, provided the method call `baz` resolves to the method `foo::Bar::baz`. | 24 | // match `$s.baz($a)`, provided the method call `baz` resolves to the method `foo::Bar::baz`. When a |
25 | // placeholder is the receiver of a method call in the search pattern (e.g. `$s.foo()`), but not in | ||
26 | // the replacement template (e.g. `bar($s)`), then *, & and &mut will be added as needed to mirror | ||
27 | // whatever autoderef and autoref was happening implicitly in the matched code. | ||
25 | // | 28 | // |
26 | // The scope of the search / replace will be restricted to the current selection if any, otherwise | 29 | // The scope of the search / replace will be restricted to the current selection if any, otherwise |
27 | // it will apply to the whole workspace. | 30 | // it will apply to the whole workspace. |