Unnamed repository; edit this file 'description' to name the repository.
Add a regression test for issue 17199 that causes stack overflow
Shoyu Vanilla 2024-06-27
parent 4e836c6 · commit 50b7678
-rw-r--r--crates/hir-ty/src/tests/regression.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/regression.rs b/crates/hir-ty/src/tests/regression.rs
index 3aa94be755..4fcb6062b6 100644
--- a/crates/hir-ty/src/tests/regression.rs
+++ b/crates/hir-ty/src/tests/regression.rs
@@ -1999,3 +1999,22 @@ where
"#,
);
}
+
+#[test]
+fn tait_async_stack_overflow_17199() {
+ check_types(
+ r#"
+ //- minicore: fmt, future
+ type Foo = impl core::fmt::Debug;
+
+ async fn foo() -> Foo {
+ ()
+ }
+
+ async fn test() {
+ let t = foo().await;
+ // ^ impl Debug
+ }
+"#,
+ );
+}