Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/bind_pat.rs')
-rw-r--r--crates/ide/src/inlay_hints/bind_pat.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints/bind_pat.rs b/crates/ide/src/inlay_hints/bind_pat.rs
index 0cb8c485b2..3311bb48ad 100644
--- a/crates/ide/src/inlay_hints/bind_pat.rs
+++ b/crates/ide/src/inlay_hints/bind_pat.rs
@@ -1120,4 +1120,30 @@ fn test() {
"#,
);
}
+
+ #[test]
+ fn type_hints_async_block() {
+ check_types(
+ r#"
+//- minicore: future
+async fn main() {
+ let _x = async { 8_i32 };
+ //^^ impl Future<Output = i32>
+}"#,
+ );
+ }
+
+ #[test]
+ fn type_hints_async_block_with_tail_return_exp() {
+ check_types(
+ r#"
+//- minicore: future
+async fn main() {
+ let _x = async {
+ //^^ impl Future<Output = i32>
+ return 8_i32;
+ };
+}"#,
+ );
+ }
}