diff options
author | Paulo Lieuthier <[email protected]> | 2019-10-19 12:19:06 +0100 |
---|---|---|
committer | Paulo Lieuthier <[email protected]> | 2019-11-28 20:36:40 +0000 |
commit | 5b2d52c8df5235fce9d2ae78adc3182a9659b268 (patch) | |
tree | fb791abbbd5ad7505282113939b48d9a88f9d6e6 /docs/user | |
parent | 439080f0274cf4def3f393f466ceb05c8cb8bcd2 (diff) |
docs: describe new feature 'add custom impl for derived trait'
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 6f4c30bee..334ba450f 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -3,6 +3,24 @@ | |||
3 | Cursor position or selection is signified by `┃` character. | 3 | Cursor position or selection is signified by `┃` character. |
4 | 4 | ||
5 | 5 | ||
6 | ## `add_custom_impl` | ||
7 | |||
8 | Adds impl block for derived trait. | ||
9 | |||
10 | ```rust | ||
11 | // BEFORE | ||
12 | #[derive(Deb┃ug, Display)] | ||
13 | struct S; | ||
14 | |||
15 | // AFTER | ||
16 | #[derive(Display)] | ||
17 | struct S; | ||
18 | |||
19 | impl Debug for S { | ||
20 | |||
21 | } | ||
22 | ``` | ||
23 | |||
6 | ## `add_derive` | 24 | ## `add_derive` |
7 | 25 | ||
8 | Adds a new `#[derive()]` clause to a struct or enum. | 26 | Adds a new `#[derive()]` clause to a struct or enum. |