@@ -416,6 +416,25 @@ pub(crate) fn frobnicate() {}
416
416
```
417
417
418
418
419
+ [discrete]
420
+ === `comment_to_doc`
421
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_comment_from_or_to_doc.rs#L9[convert_comment_from_or_to_doc.rs]
422
+
423
+ Converts comments to documentation.
424
+
425
+ .Before
426
+ ```rust
427
+ // Wow what ┃a nice module
428
+ // I sure hope this shows up when I hover over it
429
+ ```
430
+
431
+ .After
432
+ ```rust
433
+ //! Wow what a nice module
434
+ //! I sure hope this shows up when I hover over it
435
+ ```
436
+
437
+
419
438
[discrete]
420
439
=== `convert_bool_then_to_if`
421
440
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_bool_then.rs#L131[convert_bool_then.rs]
@@ -937,6 +956,29 @@ fn main() {
937
956
```
938
957
939
958
959
+ [discrete]
960
+ === `desugar_async_into_impl_future`
961
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/toggle_async_sugar.rs#L103[toggle_async_sugar.rs]
962
+
963
+ Rewrites asynchronous function from `async fn` into `-> impl Future`.
964
+ This action does not touch the function body and therefore `0`
965
+ block does not transform to `async { 0 }`.
966
+
967
+ .Before
968
+ ```rust
969
+ pub as┃ync fn foo() -> usize {
970
+ 0
971
+ }
972
+ ```
973
+
974
+ .After
975
+ ```rust
976
+ pub fn foo() -> impl core::future::Future<Output = usize> {
977
+ 0
978
+ }
979
+ ```
980
+
981
+
940
982
[discrete]
941
983
=== `desugar_doc_comment`
942
984
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/desugar_doc_comment.rs#L14[desugar_doc_comment.rs]
@@ -3492,6 +3534,29 @@ use std::{collections::HashMap};
3492
3534
```
3493
3535
3494
3536
3537
+ [discrete]
3538
+ === `sugar_impl_future_into_async`
3539
+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/toggle_async_sugar.rs#L13[toggle_async_sugar.rs]
3540
+
3541
+ Rewrites asynchronous function from `-> impl Future` into `async fn`.
3542
+ This action does not touch the function body and therefore `async { 0 }`
3543
+ block does not transform to just `0`.
3544
+
3545
+ .Before
3546
+ ```rust
3547
+ pub fn foo() -> impl core::future::F┃uture<Output = usize> {
3548
+ async { 0 }
3549
+ }
3550
+ ```
3551
+
3552
+ .After
3553
+ ```rust
3554
+ pub async fn foo() -> usize {
3555
+ async { 0 }
3556
+ }
3557
+ ```
3558
+
3559
+
3495
3560
[discrete]
3496
3561
=== `toggle_ignore`
3497
3562
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/toggle_ignore.rs#L8[toggle_ignore.rs]
0 commit comments