aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/user/assists.md26
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
61Adds a stub function with a signature matching the function under the cursor.
62
63```rust
64// BEFORE
65struct Baz;
66fn baz() -> Baz { Baz }
67fn foo() {
68 bar┃("", baz());
69}
70
71
72// AFTER
73struct Baz;
74fn baz() -> Baz { Baz }
75fn foo() {
76 bar("", baz());
77}
78
79fn bar(arg: &str, baz: Baz) {
80 unimplemented!()
81}
82
83```
84
59## `add_hash` 85## `add_hash`
60 86
61Adds a hash to a raw string literal. 87Adds a hash to a raw string literal.