Skip to content

Commit 2a25326

Browse files
committed
Add a regression test for issue 17199 that causes stack overflow
1 parent af8575e commit 2a25326

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/tests/regression.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,3 +1999,22 @@ where
19991999
"#,
20002000
);
20012001
}
2002+
2003+
#[test]
2004+
fn tait_async_stack_overflow_17199() {
2005+
check_types(
2006+
r#"
2007+
//- minicore: fmt, future
2008+
type Foo = impl core::fmt::Debug;
2009+
2010+
async fn foo() -> Foo {
2011+
()
2012+
}
2013+
2014+
async fn test() {
2015+
let t = foo().await;
2016+
// ^ impl Debug
2017+
}
2018+
"#,
2019+
);
2020+
}

0 commit comments

Comments
 (0)