@@ -223,7 +223,7 @@ image::https://user-images.githubusercontent.com/48062697/113020654-b42fc800-917
223
223
224
224
225
225
=== Find All References
226
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/references.rs#L44 [references.rs]
226
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/references.rs#L42 [references.rs]
227
227
228
228
Shows all references of the item at the cursor location
229
229
@@ -334,7 +334,7 @@ Note: `?`, `|` and `->` do not currently trigger this behavior in the VSCode edi
334
334
335
335
336
336
=== Hover
337
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/hover.rs#L98 [hover.rs]
337
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/hover.rs#L100 [hover.rs]
338
338
339
339
Shows additional information, like the type of an expression or the documentation for a definition when "focusing" code.
340
340
Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
@@ -343,7 +343,7 @@ image::https://user-images.githubusercontent.com/48062697/113020658-b5f98b80-917
343
343
344
344
345
345
=== Inlay Hints
346
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L433 [inlay_hints.rs]
346
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L442 [inlay_hints.rs]
347
347
348
348
rust-analyzer shows additional information inline with the source code.
349
349
Editors usually render this using read-only virtual text snippets interspersed with code.
@@ -414,6 +414,7 @@ There are postfix completions, which can be triggered by typing something like
414
414
- `expr.ref` -> `&expr`
415
415
- `expr.refm` -> `&mut expr`
416
416
- `expr.let` -> `let $0 = expr;`
417
+ - `expr.lete` -> `let $1 = expr else { $0 };`
417
418
- `expr.letm` -> `let mut $0 = expr;`
418
419
- `expr.not` -> `!expr`
419
420
- `expr.dbg` -> `dbg!(expr)`
@@ -463,7 +464,7 @@ image::https://user-images.githubusercontent.com/48062697/113065573-04298180-91b
463
464
464
465
465
466
=== Memory Usage
466
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-db/src/apply_change.rs#L43 [apply_change.rs]
467
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-db/src/apply_change.rs#L44 [apply_change.rs]
467
468
468
469
Clears rust-analyzer's internal database and prints memory usage statistics.
469
470
@@ -556,7 +557,7 @@ image::https://user-images.githubusercontent.com/48062697/113171066-105c2000-923
556
557
557
558
558
559
=== Open Docs
559
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L122 [doc_links.rs]
560
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L120 [doc_links.rs]
560
561
561
562
Retrieve a links to documentation for the given symbol.
562
563
@@ -585,7 +586,7 @@ image::https://user-images.githubusercontent.com/48062697/113065580-04c21800-91b
585
586
586
587
587
588
=== Related Tests
588
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L195 [runnables.rs]
589
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L199 [runnables.rs]
589
590
590
591
Provides a sneak peek of all tests where the current item is used.
591
592
@@ -600,7 +601,7 @@ the selected item. The context menu opens. Select **Peek Related Tests**.
600
601
601
602
602
603
=== Rename
603
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/rename.rs#L72 [rename.rs]
604
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/rename.rs#L73 [rename.rs]
604
605
605
606
Renames the item below the cursor and all of its references
606
607
@@ -614,7 +615,7 @@ image::https://user-images.githubusercontent.com/48062697/113065582-055aae80-91b
614
615
615
616
616
617
=== Run
617
- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L111 [runnables.rs]
618
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L113 [runnables.rs]
618
619
619
620
Shows a popup suggesting to run a test/benchmark/binary **at the current cursor
620
621
location**. Super useful for repeatedly running just a single test. Do bind this
0 commit comments