aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-19 23:07:00 +0100
committerAleksey Kladov <[email protected]>2020-05-19 23:27:10 +0100
commit80545e5d3a72ef05a77ff9584234f030c69bfe9f (patch)
tree72b770193eb81853cab75a97e19d46eba12c44d8 /docs
parent1bc1f28bc58b2dbcf8f8f548c277e2c90e3075cd (diff)
New assist: add turbo fish
Diffstat (limited to 'docs')
-rw-r--r--docs/user/assists.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 41c5df528..c72b50a4d 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -203,6 +203,24 @@ impl<T: Clone> Ctx<T> {
203 203
204``` 204```
205 205
206## `add_turbo_fish`
207
208Adds `::<_>` to a call of a generic method or function.
209
210```rust
211// BEFORE
212fn make<T>() -> T { todo!() }
213fn main() {
214 let x = make┃();
215}
216
217// AFTER
218fn make<T>() -> T { todo!() }
219fn main() {
220 let x = make::<${0:_}>();
221}
222```
223
206## `apply_demorgan` 224## `apply_demorgan`
207 225
208Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws). 226Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws).