aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-02 15:52:11 +0000
committerGitHub <[email protected]>2019-12-02 15:52:11 +0000
commit3376c08052a563a5d2db487c458972378edebf44 (patch)
treeb36bc027c62ac8dd4cf89fe8415b89666f501b5d /docs/user
parentc5b322e3df0f3c9d81676bece76bcb76eac6e1ba (diff)
parent5b2d52c8df5235fce9d2ae78adc3182a9659b268 (diff)
Merge #2018
2018: assists: add assist for custom implementation for derived trait r=matklad a=paulolieuthier Please, tell me if something could be more idiomatic or efficient. Fixes #1256. Co-authored-by: Paulo Lieuthier <[email protected]>
Diffstat (limited to 'docs/user')
-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 6f4c30bee..334ba450f 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -3,6 +3,24 @@
3Cursor position or selection is signified by `┃` character. 3Cursor position or selection is signified by `┃` character.
4 4
5 5
6## `add_custom_impl`
7
8Adds impl block for derived trait.
9
10```rust
11// BEFORE
12#[derive(Deb┃ug, Display)]
13struct S;
14
15// AFTER
16#[derive(Display)]
17struct S;
18
19impl Debug for S {
20
21}
22```
23
6## `add_derive` 24## `add_derive`
7 25
8Adds a new `#[derive()]` clause to a struct or enum. 26Adds a new `#[derive()]` clause to a struct or enum.