aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/assists.md28
-rw-r--r--docs/user/readme.adoc2
2 files changed, 26 insertions, 4 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 006ec4d54..4ad7ea59d 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -325,12 +325,34 @@ enum Action { Move { distance: u32 }, Stop }
325 325
326fn handle(action: Action) { 326fn handle(action: Action) {
327 match action { 327 match action {
328 Action::Move { distance } => {} 328 $0Action::Move { distance } => {}
329 Action::Stop => {} 329 Action::Stop => {}
330 } 330 }
331} 331}
332``` 332```
333 333
334## `fix_visibility`
335
336Makes inaccessible item public.
337
338```rust
339// BEFORE
340mod m {
341 fn frobnicate() {}
342}
343fn main() {
344 m::frobnicate┃() {}
345}
346
347// AFTER
348mod m {
349 $0pub(crate) fn frobnicate() {}
350}
351fn main() {
352 m::frobnicate() {}
353}
354```
355
334## `flip_binexpr` 356## `flip_binexpr`
335 357
336Flips operands of a binary expression. 358Flips operands of a binary expression.
@@ -404,7 +426,7 @@ fn main() {
404 426
405// AFTER 427// AFTER
406fn main() { 428fn main() {
407 let var_name = (1 + 2); 429 let $0var_name = (1 + 2);
408 var_name * 4; 430 var_name * 4;
409} 431}
410``` 432```
@@ -711,7 +733,7 @@ fn main() {
711 let x: Result<i32, i32> = Result::Ok(92); 733 let x: Result<i32, i32> = Result::Ok(92);
712 let y = match x { 734 let y = match x {
713 Ok(a) => a, 735 Ok(a) => a,
714 _ => unreachable!(), 736 $0_ => unreachable!(),
715 }; 737 };
716} 738}
717``` 739```
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc
index 03836e6e2..40ed54809 100644
--- a/docs/user/readme.adoc
+++ b/docs/user/readme.adoc
@@ -249,7 +249,7 @@ If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side
249 249
250If you get an error saying `No such file or directory: 'rust-analyzer'`, see the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>> section on installing the language server binary. 250If you get an error saying `No such file or directory: 'rust-analyzer'`, see the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>> section on installing the language server binary.
251 251
252=== Gnome Builder 252=== GNOME Builder
253 253
254Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>. 254Prerequisites: You have installed the <<rust-analyzer-language-server-binary,`rust-analyzer` binary>>.
255 255