From 80545e5d3a72ef05a77ff9584234f030c69bfe9f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 May 2020 00:07:00 +0200 Subject: New assist: add turbo fish --- docs/user/assists.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs/user') 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 Ctx { ``` +## `add_turbo_fish` + +Adds `::<_>` to a call of a generic method or function. + +```rust +// BEFORE +fn make() -> T { todo!() } +fn main() { + let x = make┃(); +} + +// AFTER +fn make() -> T { todo!() } +fn main() { + let x = make::<${0:_}>(); +} +``` + ## `apply_demorgan` Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws). -- cgit v1.2.3