diff options
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/assists.md | 18 |
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 | |||
208 | Adds `::<_>` to a call of a generic method or function. | ||
209 | |||
210 | ```rust | ||
211 | // BEFORE | ||
212 | fn make<T>() -> T { todo!() } | ||
213 | fn main() { | ||
214 | let x = make┃(); | ||
215 | } | ||
216 | |||
217 | // AFTER | ||
218 | fn make<T>() -> T { todo!() } | ||
219 | fn main() { | ||
220 | let x = make::<${0:_}>(); | ||
221 | } | ||
222 | ``` | ||
223 | |||
206 | ## `apply_demorgan` | 224 | ## `apply_demorgan` |
207 | 225 | ||
208 | Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws). | 226 | Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws). |