Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/tests/generated.rs')
| -rw-r--r-- | crates/ide-assists/src/tests/generated.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/crates/ide-assists/src/tests/generated.rs b/crates/ide-assists/src/tests/generated.rs index 5ecce3cbb6..eec1087e2d 100644 --- a/crates/ide-assists/src/tests/generated.rs +++ b/crates/ide-assists/src/tests/generated.rs @@ -816,6 +816,24 @@ fn main() { } #[test] +fn doctest_desugar_async_into_impl_future() { + check_doc_test( + "desugar_async_into_impl_future", + r#####" +//- minicore: future +pub as$0ync fn foo() -> usize { + 0 +} +"#####, + r#####" +pub fn foo() -> impl core::future::Future<Output = usize> { + 0 +} +"#####, + ) +} + +#[test] fn doctest_desugar_doc_comment() { check_doc_test( "desugar_doc_comment", @@ -3036,6 +3054,24 @@ use std::{collections::HashMap}; } #[test] +fn doctest_sugar_impl_future_into_async() { + check_doc_test( + "sugar_impl_future_into_async", + r#####" +//- minicore: future +pub fn foo() -> impl core::future::F$0uture<Output = usize> { + async { 0 } +} +"#####, + r#####" +pub async fn foo() -> usize { + async { 0 } +} +"#####, + ) +} + +#[test] fn doctest_toggle_ignore() { check_doc_test( "toggle_ignore", |