diff options
author | Aleksey Kladov <[email protected]> | 2020-05-20 12:33:13 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-20 12:33:13 +0100 |
commit | cec773926f08e2d46b05d923165f8e73c420aa8c (patch) | |
tree | 4bc15c3e4bab37a2eb8b261aaab107ea60e6a1b9 /docs | |
parent | e3373629cd80404388c5da52f991e18f2d715d8d (diff) |
Split change_ and fix_ visibility assists
Diffstat (limited to 'docs')
-rw-r--r-- | docs/user/assists.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md index 006ec4d54..0ae242389 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -331,6 +331,28 @@ fn handle(action: Action) { | |||
331 | } | 331 | } |
332 | ``` | 332 | ``` |
333 | 333 | ||
334 | ## `fix_visibility` | ||
335 | |||
336 | Makes inaccessible item public. | ||
337 | |||
338 | ```rust | ||
339 | // BEFORE | ||
340 | mod m { | ||
341 | fn frobnicate() {} | ||
342 | } | ||
343 | fn main() { | ||
344 | m::frobnicate┃() {} | ||
345 | } | ||
346 | |||
347 | // AFTER | ||
348 | mod m { | ||
349 | pub(crate) fn frobnicate() {} | ||
350 | } | ||
351 | fn main() { | ||
352 | m::frobnicate() {} | ||
353 | } | ||
354 | ``` | ||
355 | |||
334 | ## `flip_binexpr` | 356 | ## `flip_binexpr` |
335 | 357 | ||
336 | Flips operands of a binary expression. | 358 | Flips operands of a binary expression. |