diff options
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/assists.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md index 94b5ef85d..754131f6f 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -56,6 +56,32 @@ fn main() { | |||
56 | } | 56 | } |
57 | ``` | 57 | ``` |
58 | 58 | ||
59 | ## `add_function` | ||
60 | |||
61 | Adds a stub function with a signature matching the function under the cursor. | ||
62 | |||
63 | ```rust | ||
64 | // BEFORE | ||
65 | struct Baz; | ||
66 | fn baz() -> Baz { Baz } | ||
67 | fn foo() { | ||
68 | bar┃("", baz()); | ||
69 | } | ||
70 | |||
71 | |||
72 | // AFTER | ||
73 | struct Baz; | ||
74 | fn baz() -> Baz { Baz } | ||
75 | fn foo() { | ||
76 | bar("", baz()); | ||
77 | } | ||
78 | |||
79 | fn bar(arg: &str, baz: Baz) { | ||
80 | unimplemented!() | ||
81 | } | ||
82 | |||
83 | ``` | ||
84 | |||
59 | ## `add_hash` | 85 | ## `add_hash` |
60 | 86 | ||
61 | Adds a hash to a raw string literal. | 87 | Adds a hash to a raw string literal. |